@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/demo/ss.html CHANGED
@@ -1,5 +1,14 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <dce-root data-dce-id="1" value="123"
3
- xmlns="http://www.w3.org/1999/xhtml" xmlns:dce="urn:schemas-epa-wg:dce" xmlns:xhtml="http://www.w3.org/1999/xhtml"><label data-dce-id="2">
4
- <dce-text data-dce-id="3"/>
5
- <input data-dce-id="4" slice="selected" slice-event="input" value="123"/></label></dce-root>
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)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "name": "@epa-wg/custom-element",
4
- "version": "0.0.32",
4
+ "version": "0.0.34",
5
5
  "js-types-syntax": "typescript",
6
6
  "description-markup": "markdown",
7
7
  "contributions": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "name": "@epa-wg/custom-element",
4
- "version": "0.0.32",
4
+ "version": "0.0.34",
5
5
  "js-types-syntax": "typescript",
6
6
  "description-markup": "markdown",
7
7
  "contributions": {
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/parameters.html" >attributes </a> |
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epa-wg/custom-element",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
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",