Boulevard / vampire

Slots without shadows.
MIT License
26 stars 3 forks source link

Add check before defining custom v-slot element #2

Closed kevinmpowell closed 5 years ago

kevinmpowell commented 5 years ago

This prevents errors when multiple vampire-slot components from different libraries land on the same page at the same time.

@daniel-nagy I can't get any of the tests to pass on a fresh clone, but this is a pretty common pattern I've seen when defining custom elements. Thoughts on including this?

daniel-nagy commented 5 years ago

I can’t get any of the tests to pass on a fresh clone.

This is the reason https://github.com/webcomponents/custom-elements/pull/180

You’ll need to open the custom elements polyfill and edit the minified code to change a instanceof Object to typeof a === 'object' and then the tests should work.