Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time. Cannot retrieve contributors at this time
26 lines (18 sloc) 494 Bytes
'use strict';
var d = global.document;
function poser (type) {
var iframe = d.createElement('iframe');
iframe.style.display = 'none';
d.body.appendChild(iframe);
return map(type, iframe.contentWindow);
}
function map (type, source) { // forward polyfills to the stolen reference!
var original = window[type].prototype;
var value = source[type];
var prop;
for (prop in original) {
value.prototype[prop] = original[prop];
}
return value;
}
module.exports = poser;
You can’t perform that action at this time.