@ungap/custom-elements-builtin
Advanced tools
Comparing version 0.6.4 to 0.6.5
{ | ||
"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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33365
8