blob: dad662e4fd21e8f4642d31e9fb3ff0c5e67e41f9 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001define( function() {
2 "use strict";
3
4 return function isFunction( obj ) {
5
6 // Support: Chrome <=57, Firefox <=52
7 // In some browsers, typeof returns "function" for HTML <object> elements
8 // (i.e., `typeof document.createElement( "object" ) === "function"`).
9 // We don't want to classify *any* DOM node as a function.
10 return typeof obj === "function" && typeof obj.nodeType !== "number";
11 };
12
13} );