shadow-dom-element
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "shadow-dom-element", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "shadow-dom-element web component to render local and remote template", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -12,3 +12,3 @@ # shadow-dom-element | ||
[ GitHub](https://github.com/sashafirsov/shadow-dom-element) | ||
| Demo: [shadow-dom-element](https://unpkg.com/shadow-dom-element@0.0.2/demo/index.html) | ||
| Demo: [shadow-dom-element](https://unpkg.com/shadow-dom-element@0.0.3/demo/index.html) | ||
| [tests project](https://github.com/sashafirsov/light-dom-element-test) | ||
@@ -46,3 +46,3 @@ | ||
* `slotsInit()` initiates template and slots reading and rendering, returns `Promise<this>` | ||
* `fetch( url )` to override id want to load and process URL before returning a HTML string with data within slots. | ||
* `fetch( url )` override to load and process URL before returning a HTML string with data within slots. | ||
Handy to use the JSON or XML as data source. Note, there is no error handling, you have to cover that case by template | ||
@@ -79,3 +79,3 @@ and error slots. For that you could find [slotted-element](https://github.com/sashafirsov/slotted-element) handy as it | ||
[npm-url]: https://npmjs.org/package/shadow-dom-element | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.2/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.2/coverage/lcov-report/index.html | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.3/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.3/coverage/lcov-report/index.html |
@@ -6,3 +6,3 @@ /// <reference lib="dom" /> | ||
*/ | ||
promise: Promise<this>; | ||
promise: Promise<ShadowDomElement>; | ||
@@ -17,2 +17,9 @@ /** | ||
/** | ||
* override to load and process URL before returning a HTML string with data within slots. | ||
* @param url: string | ||
* @returns Promise<string> | ||
*/ | ||
fetch( url:string ): Promise<string>; | ||
/** | ||
* reads payload and template from body or by attributes, apply template and renders slots | ||
@@ -19,0 +26,0 @@ * @returns promise resolved when template and payload is rendered |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
118448
94
144