jsdom
Version:
A JavaScript implementation of many web standards
10 lines (8 loc) • 387 B
JavaScript
;
const idlUtils = require("../../../generated/idl/utils");
// Window is implemented outside webidl2js, and callers can supply either its wrapper or its EventTarget implementation.
module.exports = value => {
const impl = idlUtils.tryImplForWrapper(value);
const wrapper = idlUtils.wrapperForImpl(impl);
return wrapper !== null && wrapper === wrapper._globalProxy;
};