redefine-custom-elements
redefine-custom-elements copied to clipboard
Separate code out into an implementaiton file that does not activate when imported.
The main index file behaves the same so this is backwards compatible.
I'm working on using this library at google, and I want to make sure we only use it in development (using a technique similar to if (process.env === 'dev') { activate() }). We also patch HTMLElement in the custom elements es5 shim, and we need to apply that patch before we apply this one, and exporting the activate function makes it somewhat easier to ensure that the patches are applied in the correct order.
@rictic thanks for the PR, I'm fine with this separation.