Last active
December 11, 2015 23:18
-
-
Save arv/4675415 to your computer and use it in GitHub Desktop.
document.register with classes
This file contains 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 characters
// Create is defined in the latest ES6 spec. Foo[create]() is used to create the instance | |
// when you do "new Foo". This instance is then passed to Foo.call(instance, <args>) | |
import {create} from '@reflect'; | |
Element[create] = function() { | |
return documemt.createElementNS(this.prototype.namespaceURI, this.prototype.localName) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment