Created
December 27, 2011 16:10
-
-
Save aerith/1524167 to your computer and use it in GitHub Desktop.
Revisions
-
aerith created this gist
Dec 27, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ <html> <body> <script type="text/javascript"> var hoge = function (name) { function f () {} var e = document.createElement(name); f.prototype = e; f.prototype.__super__ = e; f.prototype.__super__.constructor = e; return new f(); } var e = new hoge('div'); var d = document.createElement('div'); d.innerHTML = 'hoge'; e.appendChild(d); document.body.appendChild(e); </script> </body> </html>