* Cross-frame instanceof check. * * @param {string} type Instance type * @param {object} obj Object instance * @returns {boolean} Returns true if the object is of the given instance.
(type, obj)
| 83 | * @returns {boolean} Returns true if the object is of the given instance. |
| 84 | */ |
| 85 | function isInstanceOf(type, obj) { |
| 86 | // Cross-frame instanceof check |
| 87 | return Object.prototype.toString.call(obj) === '[object ' + type + ']' |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * @typedef { HTMLImageElement|HTMLCanvasElement } Result |
no outgoing calls
no test coverage detected