@epa-wg/custom-element 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -144,6 +144,6 @@ within template
144
144
  [github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
145
145
  [npm-image]: https://img.shields.io/npm/v/@epa-wg/custom-element.svg
146
146
  [npm-url]: https://npmjs.org/package/@epa-wg/custom-element
147
- [coverage-image]: https://unpkg.com/@epa-wg/custom-element-test@0.0.2/coverage/coverage.svg
148
- [coverage-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.2/coverage/lcov-report/index.html
147
+ [coverage-image]: https://unpkg.com/@epa-wg/custom-element-test@0.0.3/coverage/coverage.svg
148
+ [coverage-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.3/coverage/lcov-report/index.html
149
149
  [sandbox-url]: https://stackblitz.com/github/EPA-WG/custom-element?file=index.html
package/custom-element.js CHANGED
@@ -59,8 +59,8 @@ export class CustomElement extends HTMLElement
59
59
  </xsl:template>
60
60
 
61
61
  </xsl:stylesheet>` ) );
62
-
63
- window.customElements.define( this.getAttribute( 'tag' ), class extends HTMLElement
62
+ const tag = this.getAttribute( 'tag' );
63
+ tag && window.customElements.define( tag, class extends HTMLElement
64
64
  {
65
65
  constructor()
66
66
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epa-wg/custom-element",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Declarative Custom Element as W3C proposal PoC with native(XSLT) based templating",
5
5
  "browser": "custom-element.js",
6
6
  "module": "custom-element.js",
@@ -15,7 +15,7 @@
15
15
  "type": "module",
16
16
  "types": "./custom-element.d.ts",
17
17
  "scripts": {
18
- "start": "npm i @web/dev-server && web-dev-server --node-resolve",
18
+ "start": "npm i --no-save @web/dev-server && web-dev-server --node-resolve",
19
19
  "test": "echo \"test would reside in https://github.com/EPA-WG/custom-element-test\" && exit 0",
20
20
  "typings": "npx -p typescript tsc custom-element.js --declaration --allowJs --emitDeclarationOnly "
21
21
  },
@@ -43,8 +43,5 @@
43
43
  "funding": {
44
44
  "type": "patreon",
45
45
  "url": "https://www.patreon.com/sashafirsov"
46
- },
47
- "dependencies": {
48
- "@web/dev-server": "^0.1.35"
49
46
  }
50
47
  }