Permalink
Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…
Cannot retrieve contributors at this time.
Cannot retrieve contributors at this time
| '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; |