New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for extending DOM classes #87
Comments
From johnjbar...@chromium.org on May 08, 2012 19:23:24 http://code.google.com/p/traceur-compiler/source/detail?r=671339c959178f3d12f584dbdb2a2375b80ab2cc |
+ for that. class CustomElement extends HTMLDivElement{
constructor(){
var self = document.createElement('div');
self.__proto__ = this.__proto__;
return self;
}
customMethod(){
//`this` here is the div element
}
} ? |
That is what we used to do. The new way is based on Symbol.create and I have an old branch for that. It has some severe performance issues so I never finished that work. https://github.com/arv/traceur-compiler/tree/new-new-behavior |
|
For anyone else who comes here in search of extending |
Original author: arv@chromium.org (April 07, 2012 05:32:14)
With the change to max-min classes we lost the ability to extend DOM classes. We should add that hack again because it is really awesome.
Original issue: http://code.google.com/p/traceur-compiler/issues/detail?id=84
The text was updated successfully, but these errors were encountered: