New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-demo-element

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-demo-element

Webcomponent inserts prism JS syntax colored HTML in demo-element before actual dom

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
38
increased by18.75%
Maintainers
1
Weekly downloads
 
Created
Source

html-demo-element

inserts prism JS syntax colored HTML in demo-element before actual dom

npm package

Published on webcomponents.org

Dependent prism script located on unpkg.com CDN.

Sample

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.0/html-demo-element.js"></script>
<script type="module" src="https://unpkg.com/slotted-element@1.0.0/slotted-element.js"></script>

renders following content: screenshot

Use

Include the script BEFORE inner content is modified. I.e. immediately after HTML and before scripts with components.

Live demo

https://unpkg.com/slotted-element@1.0.0/demo/index.html

FAQs

Package last updated on 22 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc