mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tests: Update domEqual()
to work with jQuery git
jQuery now returns `null` for empty attributes instead of `undefined`. Ref gh-1516
This commit is contained in:
parent
12643739a9
commit
e4363ab82d
@ -305,11 +305,11 @@ window.domEqual = function( selector, modifier, message ) {
|
|||||||
result = {};
|
result = {};
|
||||||
$.each( properties, function( index, attr ) {
|
$.each( properties, function( index, attr ) {
|
||||||
var value = elem.prop( attr );
|
var value = elem.prop( attr );
|
||||||
result[ attr ] = value !== undefined ? value : "";
|
result[ attr ] = value != null ? value : "";
|
||||||
});
|
});
|
||||||
$.each( attributes, function( index, attr ) {
|
$.each( attributes, function( index, attr ) {
|
||||||
var value = elem.attr( attr );
|
var value = elem.attr( attr );
|
||||||
result[ attr ] = value !== undefined ? value : "";
|
result[ attr ] = value != null ? value : "";
|
||||||
});
|
});
|
||||||
result.style = getElementStyles( elem[ 0 ] );
|
result.style = getElementStyles( elem[ 0 ] );
|
||||||
result.events = $._data( elem[ 0 ], "events" );
|
result.events = $._data( elem[ 0 ], "events" );
|
||||||
|
Loading…
Reference in New Issue
Block a user