
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
declarative-shadow-dom
Advanced tools
Custom Element to create Shadow DOM in a declarative manner
Custom Element to create Shadow DOM in a declarative manner
Install the component using Bower:
$ bower install declarative-shadow-dom --save
Or download as ZIP.
Import polyfill:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
Import custom element:
<link rel="import" href="bower_components/declarative-shadow-dom/declarative-shadow-dom.html">
Start using it!
<anyelement>
<template is="declarative-shadow-dom">
Shadow Content here
<slot></slot>
</template>
Light DOM content here
</anyelement>
Attribute | Options | Default | Description |
---|---|---|---|
disabled | Boolean | false | if set to true, the element will not stamp itself |
stamped | Boolean | attribute that reflects whether the element is stamped or not, you can change it to stamp or clear the Shadow DOM |
Method | Parameters | Returns | Description |
---|---|---|---|
appendToParentsShadowRoot() | None. | Nothing. | Appends content to parent element's shadow root, create one if needed. |
Event | Description |
---|---|
declarative-shadow-dom-stamped | Triggers when Shadow DOM is stamped |
For detailed changelog, check Releases.
MIT
FAQs
Custom Element to create Shadow DOM in a declarative manner
The npm package declarative-shadow-dom receives a total of 1 weekly downloads. As such, declarative-shadow-dom popularity was classified as not popular.
We found that declarative-shadow-dom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.