Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
natipo committed Jul 27, 2020
1 parent fe40980 commit bf1430a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/var/isFunction.js
Expand Up @@ -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";
};

} );

0 comments on commit bf1430a

Please sign in to comment.