mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix #13809: Avoid collisions with words reserved by any version of ECMA-262
This commit is contained in:
parent
d8f7e83712
commit
ad71f47b27
@ -305,7 +305,7 @@ jQuery.extend({
|
|||||||
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
hooks = jQuery.attrHooks[ name ] ||
|
hooks = jQuery.attrHooks[ name ] ||
|
||||||
( jQuery.expr.match.boolean.test( name ) ? boolHook : nodeHook );
|
( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( value !== undefined ) {
|
if ( value !== undefined ) {
|
||||||
@ -344,7 +344,7 @@ jQuery.extend({
|
|||||||
propName = jQuery.propFix[ name ] || name;
|
propName = jQuery.propFix[ name ] || name;
|
||||||
|
|
||||||
// Boolean attributes get special treatment (#10870)
|
// Boolean attributes get special treatment (#10870)
|
||||||
if ( jQuery.expr.match.boolean.test( name ) ) {
|
if ( jQuery.expr.match.bool.test( name ) ) {
|
||||||
// Set corresponding property to false
|
// Set corresponding property to false
|
||||||
elem[ propName ] = false;
|
elem[ propName ] = false;
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ boolHook = {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
jQuery.each( jQuery.expr.match.boolean.source.match( /\w+/g ), function( i, name ) {
|
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
||||||
var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
|
var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
|
||||||
|
|
||||||
jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) {
|
jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) {
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 84a24c9fea7c5cd0874c4ba61a1ef77e0b37e08f
|
Subproject commit b8789b87f1ecb00f0de82b2a13a3474dabdab406
|
Loading…
Reference in New Issue
Block a user