Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ungap/custom-elements-builtin

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ungap/custom-elements-builtin - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

2

package.json
{
"name": "@ungap/custom-elements-builtin",
"version": "0.6.4",
"version": "0.6.5",
"description": "A polyfill for Custom Elements builtin extends",

@@ -5,0 +5,0 @@ "main": "./cjs/index.js",

@@ -8,23 +8,1 @@ # Custom Elements with Builtin Extends

The current polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which includes all features detection in it.
However, a quick and dirty approach could now be based on the following detection:
```html
<!-- top of your HTML document -->
<script>
if (!self.customElements || !(self.chrome || self.navigator))
document.write('<script src="//unpkg.com/@ungap/custom-elements"><\x2fscript>');
</script>
```
If you really want to use only *builtin extends*, then you can write this instead:
```html
<!-- top of your HTML document -->
<script>
if (!(self.chrome || self.navigator))
document.write('<script src="//unpkg.com/@webreflection/custom-elements-builtin"><\x2fscript>');
</script>
```
**However**, keep in mind the whole polyfill is both more reliable, in terms of features detection, and it also patches other browsers with latest `whenDefined` behavior.
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