MCPcopy
hub / github.com/layui/layui / isFunction

Function isFunction

src/modules/jquery.js:72–85  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

70 var support = {};
71
72 var isFunction = function isFunction(obj) {
73 // Support: Chrome <=57, Firefox <=52
74 // In some browsers, typeof returns "function" for HTML <object> elements
75 // (i.e., `typeof document.createElement( "object" ) === "function"`).
76 // We don't want to classify *any* DOM node as a function.
77 // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
78 // Plus for old WebKit, typeof returns "function" for HTML collections
79 // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
80 return (
81 typeof obj === 'function' &&
82 typeof obj.nodeType !== 'number' &&
83 typeof obj.item !== 'function'
84 );
85 };
86
87 var isWindow = function isWindow(obj) {
88 return obj != null && obj === obj.window;

Callers 10

jquery.jsFile · 0.85
isArrayLikeFunction · 0.85
winnowFunction · 0.85
adoptValueFunction · 0.85
mightThrowFunction · 0.85
accessFunction · 0.85
domManipFunction · 0.85
AnimationFunction · 0.85
addFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected