
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
html-demo-element
Advanced tools
Webcomponent inserts prism JS syntax colored HTML in html-demo-element before actual dom
inserts prism JS syntax colored HTML in demo-element before actual dom
Dependent prism script located on unpkg.com CDN.
The code
<html-demo-element title="Error case">
<slotted-element src="https://badUrl.heck">
<p slot="loading" hidden>Loading... âł </p>
<p slot="error" hidden>Something went wrong. đ </p>
</slotted-element>
</html-demo-element>
<script type="module" src="https://unpkg.com/html-demo-element@1.0.2/html-demo-element.js"></script>
<script type="module" src="https://unpkg.com/slotted-element@1.0.2/slotted-element.js"></script>
renders following content:

If do not want to use template, include the script BEFORE inner content is modified. I.e. immediately after HTML and before scripts with components.
The use of template would defer the demo code injection after the source is rendered:
<html-demo-element title="Error case">
<template><i>Candle đŻď¸</i></template>
</html-demo-element>
When you want to control where the source is located and where to render the code text, use slots:
<html-demo-element>
<template>ignored</template>
<template slot="source"> <i>Croissant đĽď¸ </i></template>
<p><code>slot="source"</code> defines where to get code </p>
<p><code>slot="demo" </code> inject the html from source: </p>
<div slot="demo"> replaced with tasty demo </div>
<p><code>slot="text" </code> inject colored code text: </p>
<div slot="text"> replaced with colored code </div>
</html-demo-element>
https://unpkg.com/html-demo-element@1.0.2/demo/index.html https://unpkg.com/slotted-element@1.0.2/demo/index.html
FAQs
Webcomponent inserts prism JS syntax colored HTML in html-demo-element before actual dom
We found that html-demo-element 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.