shadow-dom-element
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -7,3 +7,3 @@ { | ||
"kind": "javascript-module", | ||
"path": "dist/shadow-dom-element.js", | ||
"path": "shadow-dom-element.js", | ||
"declarations": [ | ||
@@ -65,3 +65,3 @@ { | ||
"name": "ShadowDomElement", | ||
"module": "dist/shadow-dom-element.js" | ||
"module": "shadow-dom-element.js" | ||
} | ||
@@ -68,0 +68,0 @@ } |
{ | ||
"name": "shadow-dom-element", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "shadow-dom-element web component to render local and remote template", | ||
@@ -41,3 +41,4 @@ "author": { | ||
"url": "https://www.patreon.com/sashafirsov" | ||
} | ||
}, | ||
"customElements": "custom-elements.json" | ||
} |
@@ -12,3 +12,3 @@ # shadow-dom-element | ||
[![git](https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg) GitHub](https://github.com/sashafirsov/shadow-dom-element) | ||
| Demo: [shadow-dom-element](https://unpkg.com/shadow-dom-element@0.0.3/demo/index.html) | ||
| Demo: [shadow-dom-element](https://unpkg.com/shadow-dom-element@0.0.4/demo/index.html) | ||
| [tests project](https://github.com/sashafirsov/light-dom-element-test) | ||
@@ -78,3 +78,3 @@ | ||
[npm-url]: https://npmjs.org/package/shadow-dom-element | ||
[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 | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.4/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.4/coverage/lcov-report/index.html |
/// <reference lib="dom" /> | ||
/** | ||
* Web Component to populate html slots into template using Shadow DOM. | ||
* Slots content and template could be local in the page or pointed via URL. | ||
*/ | ||
export default class ShadowDomElement extends HTMLElement { | ||
@@ -9,3 +13,3 @@ /** | ||
/** | ||
* applies template content and renders slots | ||
* applies template content and renders slots, called from `slotsInit()` | ||
* @param templateElement | ||
@@ -25,2 +29,3 @@ * @returns this | ||
* reads payload and template from body or by attributes, apply template and renders slots | ||
* , called from constructor | ||
* @returns promise resolved when template and payload is rendered | ||
@@ -27,0 +32,0 @@ */ |
@@ -51,2 +51,2 @@ export default class ShadowDomElement extends HTMLElement | ||
window.customElements.get('shadow-dom-element') || window.customElements.define('shadow-dom-element', ShadowDomElement); | ||
window.customElements.define('shadow-dom-element', ShadowDomElement); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 8 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125599
103
149
57