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

@webcomponents/shadydom

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webcomponents/shadydom - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

2

package.json
{
"name": "@webcomponents/shadydom",
"version": "1.4.2",
"version": "1.4.3",
"description": "Shadow DOM polyfill",

@@ -5,0 +5,0 @@ "main": "shadydom.min.js",

@@ -56,1 +56,3 @@ # ShadyDOM

call `ShadyDOM.patch(node)` prior to setting `textContent` or `innerHTML`.
For additional information about Web Component polyfills, including browser compatibility, please see [the webcomponentsjs repository](https://github.com/webcomponents/webcomponentsjs).

@@ -81,3 +81,3 @@ (function(){/*

set slot(a){this.__shady_setAttribute("slot",a)},get shadowRoot(){var a=u(this);return a&&a.K||null},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){if(this.ownerDocument!==hc)this.__shady_native_setAttribute(a,b);else{var c;(c=H())&&"class"===a?(c.setElementClass(this,b),c=!0):c=!1;c||(this.__shady_native_setAttribute(a,b),ic(this,a))}},removeAttribute:function(a){this.__shady_native_removeAttribute(a);ic(this,
a)},attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");return new N(mb,this,a)}});var kc=A({blur:function(){var a=u(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Wb.forEach(function(a){kc[a]={set:function(b){var c=t(this),d=a.substring(2);c.o[a]&&this.removeEventListener(d,c.o[a]);this.__shady_addEventListener(d,b);c.o[a]=b},get:function(){var b=u(this);return b&&b.o[a]},configurable:!0}});var lc=A({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&x(b)&&pb(b);return(b=u(this))?(a&&a.flatten?b.g:b.assignedNodes)||[]:[]}}});var mc=window.document,nc=A({importNode:function(a,b){if(a.ownerDocument!==mc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b){a=a.__shady_childNodes;b=0;for(var d;b<a.length;b++)d=this.__shady_importNode(a[b],!0),c.__shady_appendChild(d)}return c}});var oc=A({addEventListener:Nb.bind(window),removeEventListener:Pb.bind(window)});var Y={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Y.parentElement=J.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Y.contains=J.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Y.children=K.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Y.innerHTML=jb.innerHTML);
a)},attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");return new N(mb,this,a)}});var kc=A({blur:function(){var a=u(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Wb.forEach(function(a){kc[a]={set:function(b){var c=t(this),d=a.substring(2);c.o[a]&&this.removeEventListener(d,c.o[a]);this.__shady_addEventListener(d,b);c.o[a]=b},get:function(){var b=u(this);return b&&b.o[a]},configurable:!0}});var lc=A({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&x(b)&&pb(b);return(b=u(this))?(a&&a.flatten?b.g:b.assignedNodes)||[]:[]}}});var mc=window.document,nc=A({importNode:function(a,b){if(a.ownerDocument!==mc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b){a=a.__shady_childNodes;b=0;for(var d;b<a.length;b++)d=this.__shady_importNode(a[b],!0),c.__shady_appendChild(d)}return c}});var oc=A({addEventListener:Nb.bind(window),removeEventListener:Pb.bind(window)});var Y={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Y.parentElement=J.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Y.contains=J.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Y.children=K.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Y.innerHTML=jb.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Y.className=jc.className);
var pc={EventTarget:[ec],Node:[J,window.EventTarget?null:ec],Text:[fc],Element:[jc,K,fc,!v.c||"innerHTML"in Element.prototype?jb:null,window.HTMLSlotElement?null:lc],HTMLElement:[kc,Y],HTMLSlotElement:[lc],DocumentFragment:[Ya,Za],Document:[nc,Ya,Za,$a],Window:[oc]},qc=v.c?null:["innerHTML","textContent"];function rc(a){var b=a?null:qc,c={},d;for(d in pc)c.A=window[d]&&window[d].prototype,pc[d].forEach(function(c){return function(d){return c.A&&d&&z(c.A,d,a,b)}}(c)),c={A:c.A}};function Z(a){this.node=a}m=Z.prototype;m.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};m.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};m.appendChild=function(a){return this.node.__shady_appendChild(a)};m.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};m.removeChild=function(a){return this.node.__shady_removeChild(a)};m.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)};

@@ -84,0 +84,0 @@ m.cloneNode=function(a){return this.node.__shady_cloneNode(a)};m.getRootNode=function(a){return this.node.__shady_getRootNode(a)};m.contains=function(a){return this.node.__shady_contains(a)};m.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};m.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b)};m.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};m.removeAttribute=function(a){this.node.__shady_removeAttribute(a)};m.attachShadow=function(a){return this.node.__shady_attachShadow(a)};

@@ -44,2 +44,6 @@ /**

if (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'className')) {
NonStandardHTMLElement.className = ElementPatches.className;
}
// Avoid patching `innerHTML` if it does not exist on Element (IE)

@@ -46,0 +50,0 @@ // and we can patch accessors (hasDescriptors).

Sorry, the diff of this file is not supported yet

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