vanilla-poc-mm
v1.0.0
Published
A vanilla web component for including external media
Downloads
1
Maintainers
Readme
A Vanilla Web Component for including external media, like an iFrame but better
Installation
npm i @vanillawc/wc-include
Then import the index.js
file at the root of the package.
Usage
Attributes
- shadow - if present the contents are contained in a shadowDOM
Basic Usage
The src
attribute imports the contents of the file into the lightDOM.
<wc-include src="./sample.html"></wc-include>
'shadow' Attribute Usage
When the shadow
attribute is specified, the imported contents will be encapsulated in a shadowDOM.
<wc-include src="./sample.html" shadow></wc-include>