mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Core: Bring back QtWebKit support for jQuery 3.x
Allow jQuery to recognize that DOM types such as HTMLCollection or NodeList are not functions. Fixes gh-4756 Closes gh-4757
This commit is contained in:
parent
fe4098005e
commit
bf1430a7e6
@ -7,7 +7,11 @@ define( function() {
|
||||
// In some browsers, typeof returns "function" for HTML <object> elements
|
||||
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
||||
// We don't want to classify *any* DOM node as a function.
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
||||
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
|
||||
// Plus for old WebKit, typeof returns "function" for HTML collections
|
||||
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
||||
typeof obj.item !== "function";
|
||||
};
|
||||
|
||||
} );
|
||||
|
Loading…
Reference in New Issue
Block a user