@epa-wg/custom-element 0.0.15 → 0.0.16
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 +3 -3
- package/custom-element.js +4 -2
- package/demo/z.html +5 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -308,9 +308,9 @@ within template
|
|
|
308
308
|
[github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
|
|
309
309
|
[npm-image]: https://img.shields.io/npm/v/@epa-wg/custom-element.svg
|
|
310
310
|
[npm-url]: https://npmjs.org/package/@epa-wg/custom-element
|
|
311
|
-
[coverage-image]: https://unpkg.com/@epa-wg/custom-element-test@0.0.
|
|
312
|
-
[coverage-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.
|
|
313
|
-
[storybook-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.
|
|
311
|
+
[coverage-image]: https://unpkg.com/@epa-wg/custom-element-test@0.0.16/coverage/coverage.svg
|
|
312
|
+
[coverage-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.16/coverage/lcov-report/index.html
|
|
313
|
+
[storybook-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.16/storybook-static/index.html?path=/story/welcome--introduction
|
|
314
314
|
[sandbox-url]: https://stackblitz.com/github/EPA-WG/custom-element?file=index.html
|
|
315
315
|
[webcomponents-url]: https://www.webcomponents.org/element/@epa-wg/custom-element
|
|
316
316
|
[webcomponents-img]: https://img.shields.io/badge/webcomponents.org-published-blue.svg
|
package/custom-element.js
CHANGED
|
@@ -409,8 +409,10 @@ CustomElement extends HTMLElement
|
|
|
409
409
|
class DceElement extends HTMLElement
|
|
410
410
|
{
|
|
411
411
|
static get observedAttributes()
|
|
412
|
-
{
|
|
413
|
-
|
|
412
|
+
{ return templateDocs.reduce( (ret,t) =>
|
|
413
|
+
{ if( t.params ) ret.push( ...t.params.map(e=>attr(e,'name')) );
|
|
414
|
+
return ret;
|
|
415
|
+
}, [] );
|
|
414
416
|
}
|
|
415
417
|
connectedCallback()
|
|
416
418
|
{ if( this.firstElementChild?.tagName === 'TEMPLATE' )
|
package/demo/z.html
CHANGED
|
@@ -39,21 +39,12 @@
|
|
|
39
39
|
</head>
|
|
40
40
|
<body>
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
<
|
|
44
|
-
<xsl:param name="p1" select="//p1 ?? 'def_p1' " ></xsl:param>
|
|
45
|
-
<xsl:param name="p2" select="'always_p2'" ></xsl:param>
|
|
46
|
-
<xsl:param name="p3" >default_P3</xsl:param>
|
|
47
|
-
p1:{$p1} <br/> p2: {$p2} <br/> p3: {$p3}
|
|
42
|
+
<custom-element src="html-template.xhtml#embedded-xsl">
|
|
43
|
+
<template>whole XSLT is embedded into HTML body</template>
|
|
48
44
|
</custom-element>
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
<div><input id="i2" value="p2" /> <button onclick="dce2.setAttribute('p2',i2.value)"> set p2</button> </div>
|
|
53
|
-
<div><input id="i3" value="p3" /> <button onclick="dce2.setAttribute('p3',i3.value)"> set p3</button> </div>
|
|
54
|
-
</section>
|
|
55
|
-
<dce-link id="dce2" p1="123" p2="override ignored as select is defined"></dce-link> |
|
|
56
|
-
<dce-link id="dce3" p1="123" p3="qwe"></dce-link> |
|
|
45
|
+
<!--<custom-element src="html-template.html#none">-->
|
|
46
|
+
<!-- <template><i>element with id=none is missing in template</i></template>-->
|
|
47
|
+
<!--</custom-element>-->
|
|
57
48
|
|
|
58
49
|
</body>
|
|
59
50
|
</html>
|
package/package.json
CHANGED