![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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 legend="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 legend="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>
source
- the source code node. If omitted it would be taken either from embedded template
content or
from embedded into html-demo-element
dom.text
- placeholder where the highlighted code would be rendered. If omitted the text would be rendered on
top of template or top of html-demo-element
content.demo
- placeholder where the code would be moved into for displaying live DOM( for HTML type ).
If omitted it would be placed beneath of text
slotlegend
- placeholder where the value of legend
attribute would be rendered as H3.
When omitted, it would be placed on top.source
- the source code text. If the attribute is not defined, it would be initialized from source
slot ^^type
- one of prism js supported languages.
html
, css
, js
imported by default. When omitted, assumed html
.legend
- optional heading for html-demo-element
FAQs
Webcomponent inserts prism JS syntax colored HTML in html-demo-element before actual dom
The npm package html-demo-element receives a total of 38 weekly downloads. As such, html-demo-element popularity was classified as not popular.
We found that html-demo-element demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.