@epa-wg/custom-element 0.0.32 → 0.0.34
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/.idea/copilot.data.migration.agent.xml +6 -0
- package/README.md +5 -5
- package/bin/xslDtd2Ide.mjs +160 -160
- package/custom-element.d.ts +4 -0
- package/custom-element.js +119 -50
- package/demo/a.html +10 -3
- package/demo/{parameters.html → attributes.html} +71 -7
- package/demo/html-template.html +5 -4
- package/demo/s.xml +3859 -7
- package/demo/s.xslt +13 -48
- package/demo/s1.xml +3706 -0
- package/demo/ss.html +13 -4
- package/http-request.js +7 -0
- package/ide/web-types-dce.json +1 -1
- package/ide/web-types-xsl.json +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
package/demo/ss.html
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<dce-root data-dce-id="1"
|
|
3
|
-
xmlns="http://www.w3.org/1999/xhtml"
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<dce-root data-dce-id="1" xmlns="http://www.w3.org/1999/xhtml" xmlns:dce="urn:schemas-epa-wg:dce"
|
|
3
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"><label data-dce-id="2" xmlns=""><input data-dce-id="3"
|
|
4
|
+
slice="disabled-slice"
|
|
5
|
+
type="checkbox"
|
|
6
|
+
value="disabled"/>
|
|
7
|
+
<dce-text data-dce-id="4">disabled</dce-text>
|
|
8
|
+
</label>
|
|
9
|
+
<cem-input data-dce-id="6" value="123"/>
|
|
10
|
+
<button data-dce-id="7">Next</button>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
</p></form>
|
|
14
|
+
</dce-root>
|
package/http-request.js
CHANGED
|
@@ -66,6 +66,13 @@ export class HttpRequestElement extends HTMLElement
|
|
|
66
66
|
{ slice.data = await response.json();
|
|
67
67
|
update();
|
|
68
68
|
}catch(_e){}
|
|
69
|
+
if( r.headers['content-type']?.includes('xml'))
|
|
70
|
+
try
|
|
71
|
+
{ const s = await response.text();
|
|
72
|
+
const parser = new DOMParser();
|
|
73
|
+
slice.data = parser.parseFromString(s, 'application/xml')?.documentElement;
|
|
74
|
+
update();
|
|
75
|
+
}catch(_e){}
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
attributeChangedCallback(name, oldValue, newValue)
|
package/ide/web-types-dce.json
CHANGED
package/ide/web-types-xsl.json
CHANGED
package/index.html
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<a href="./demo/module-url.html" >importmap </a> <br/>
|
|
52
52
|
<a href="./demo/hex-grid.html" >hex grid lib </a> |
|
|
53
53
|
<a href="./demo/scoped-css.html" >scoped CSS </a> |
|
|
54
|
-
<a href="./demo/
|
|
54
|
+
<a href="./demo/attributes.html" >attributes </a> |
|
|
55
55
|
<a href="./demo/data-slices.html" >data slices/events </a> |
|
|
56
56
|
<a href="./demo/form.html" >Form validation </a> |
|
|
57
57
|
<a href="./demo/dom-merge.html" >DOM merge on dynamic update </a><br/>
|
package/package.json
CHANGED