shadow-dom-element
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -0,0 +0,0 @@ { |
{ | ||
"name": "shadow-dom-element", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "shadow-dom-element web component to render local and remote template", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -13,3 +13,3 @@ # shadow-dom-element | ||
| Try in [Sandbox][sandbox-url] | ||
| Live Demo: [shadow-dom-element](https://unpkg.com/shadow-dom-element@0.0.6/index.html) | ||
| Live Demo: [shadow-dom-element](https://unpkg.com/shadow-dom-element@0.0.7/index.html) | ||
| [tests project](https://github.com/sashafirsov/light-dom-element-test) | ||
@@ -28,3 +28,3 @@ | ||
as most of "components" could be expressed via template in own file. | ||
[There is a live sample](https://unpkg.com/shadow-dom-element@0.0.6/demo/ananke/content/en/index.html) | ||
[There is a live sample](https://unpkg.com/shadow-dom-element@0.0.7/demo/ananke/content/en/index.html) | ||
of `shadow-dom-element` based templates for Ananke site generator. | ||
@@ -104,4 +104,4 @@ While it is not a good example of shadow dom css styling, | ||
[npm-url]: https://npmjs.org/package/shadow-dom-element | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.6/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.6/coverage/lcov-report/index.html | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.7/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.7/coverage/lcov-report/index.html | ||
[sandbox-url]: https://stackblitz.com/github/sashafirsov/shadow-dom-element |
@@ -33,1 +33,4 @@ /// <reference lib="dom" /> | ||
} | ||
interface HTMLElementTagNameMap { | ||
'shadow-dom-element': ShadowDomElement; | ||
} |
@@ -16,5 +16,9 @@ const attr = (el, name)=>el.getAttribute(name); | ||
{ | ||
// @ts-ignore | ||
const s = this.shadowRoot; | ||
s.appendChild( t.content.cloneNode( true ) ); | ||
this.postTemplateCallback( s ); | ||
return this; | ||
} | ||
postTemplateCallback(s) | ||
{ | ||
s.querySelectorAll('slot[attribute]').forEach( a => | ||
@@ -26,8 +30,6 @@ { let f = attr(a,'for') | ||
, a.assignedElements().map( l=>attr( l, 'href') | ||
|| attr( l, 'src') | ||
|| l.innerText).join('')) | ||
|| attr( l, 'src') | ||
|| l.innerText).join('')) | ||
}); | ||
return this; | ||
} | ||
async slotsInit() | ||
@@ -34,0 +36,0 @@ { |
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
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
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 163 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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
966863
281
165
208