Closed trusktr closed 7 years ago
I can try to fill what I think I might know:
SomeMixin(class extends BuiltinClass)
When should I use document-register-element ?
Whenever you need a customElements polyfill.
When should I use babel-plugin-transform-builtin-classes ?
Whenever you transpile classes that extends native builtins.
Native builtins are Array
, HTMLElement
, String
etcetera.
Both projects have nothing to do with each other so when you need custom elements and you need to extend builtin classes, you inevitably need both if you transpile code and your target need a polyfill.
I think I see: I need this transform in case
document-register-element
isn't loaded, because in that case the transpiled code won't work with native CE v1 even if we had followed the caveat workarounds. Is this right?It may be helpful for people to have the following details written somewhere:
It's been hard to piece everything together by trial and error over the course of a few days and lots of fiddling, so basically I may have forgotten some details, and you probably know it all best.