paper-badge
paper-badge copied to clipboard
Collision with iron-meta
Description
Importing paper-badge (3.0.1) and iron-meta (3.0.1) causes different errors with different browsers, but fails in any case. Unfortunately, this also affects modules that import iron-meta, e.g. iron-icons.
Expected outcome
Both can be imported at the same time.
Actual outcome
An error is thrown: Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry
in Chrome.
In Firefox, it's NotSupportedError: Operation is not supported
In Edge, it's SCRIPT5007: SCRIPT5007: Unable to get property 'polyfillWrapFlushCallback' of undefined or null reference
I did not try with other browsers
Steps to reproduce
Use this index.html: `<!doctype html>
Use this src/test.js
import '@polymer/polymer/polymer-legacy.js';
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import '@polymer/paper-badge/paper-badge';
import '@polymer/iron-meta/iron-meta';
class Test extends PolymerElement {
static get is() {
return 'my-element';
}
}
customElements.define(Test.is, Test);
Use this package.json:
{
"dependencies": {
"@polymer/paper-badge": "3.0.1",
"@polymer/iron-meta": "3.0.1"
}
}
Run npm install Run polymer serve Open served page
Browsers Affected
- [x] Chrome
- [x] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [x] Edge
- [ ] IE 11
- [ ] IE 10