MCPcopy Create free account
hub / github.com/codrops/RainEffect / createDict

Function createDict

demo/js/index3.js:1789–1807  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1787
1788// Create object with `null` prototype: use iframe Object with cleared prototype
1789var createDict = function(){
1790 // Thrash, waste and sodomy: IE GC bug
1791 var iframe = cel('iframe')
1792 , i = keysLen1
1793 , gt = '>'
1794 , iframeDocument;
1795 iframe.style.display = 'none';
1796 html.appendChild(iframe);
1797 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
1798 // createDict = iframe.contentWindow.Object;
1799 // html.removeChild(iframe);
1800 iframeDocument = iframe.contentWindow.document;
1801 iframeDocument.open();
1802 iframeDocument.write('<script>document.F=Object</script' + gt);
1803 iframeDocument.close();
1804 createDict = iframeDocument.F;
1805 while(i--)delete createDict.prototype[keys1[i]];
1806 return createDict();
1807};
1808var createGetKeys = function(names, length){
1809 return function(object){
1810 var O = toIObject(object)

Callers 1

index3.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected