redefine-custom-elements icon indicating copy to clipboard operation
redefine-custom-elements copied to clipboard

Separate code out into an implementaiton file that does not activate when imported.

Open rictic opened this issue 3 years ago • 1 comments

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 avatar Sep 15 '22 01:09 rictic

@rictic thanks for the PR, I'm fine with this separation.

caridy avatar Nov 30 '22 03:11 caridy