Closed domenic closed 9 years ago
Also, that workaround will not work once the ES6 changes land.
Why wouldn't the delete work around work in with ES6?
I ... don't really remember what I was thinking when I wrote that. It does seem that the flow will still look for C.prototype.createdCallback
and transfer it to a safe place. Even eliminating @@create
doesn't seem to make a difference. So that is probably OK...
I might not be understanding the custom element spec entirely, but it seems like I am supposed to define createdCallback et al. on my prototype. This will then be user-observable:
CustomHRElement.prototype.createdCallback
will be present, whereas of courseHTMLHRElement.prototype.createdCallback
does not exist.I think it might be possible to work around this by
delete
ing thecreatedCallback
property after registration, since registering seems to transfer the callbacks to a safe place. This is kind of lame though.It would be better if I could have passed those callbacks in as part of the options object...