Socket
Socket
Sign inDemoInstall

@lrnwebcomponents/hax-body-behaviors

Package Overview
Dependencies
Maintainers
2
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/hax-body-behaviors - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

78

hax-body-behaviors.es6.js

@@ -1,79 +0,5 @@

import { HAXWiring } from "./lib/HAXWiring.js";
class HaxBodyBehaviors extends HTMLElement {
getTemplate() {
return `
import{HAXWiring}from"./lib/HAXWiring.js";class HaxBodyBehaviors extends HTMLElement{getTemplate(){return`
<style>
</style>
`;
}
static get properties() {
return {};
}
static get tag() {
return "hax-body-behaviors";
}
get templateUrl() {
return "hax-body-behaviors.html";
}
get propertiesUrl() {
return "hax-body-behaviors-properties.json";
}
get styleUrl() {
return "hax-body-behaviors.css";
}
constructor(delayRender = !1) {
super();
this.tag = HaxBodyBehaviors.tag;
this.HAXWiring = new HAXWiring();
let obj = HaxBodyBehaviors.properties;
for (let p in obj) {
if (obj.hasOwnProperty(p)) {
this[p] = obj[p].value;
}
}
this._queue = [];
this.template = document.createElement("template");
this.attachShadow({ mode: "open" });
if (!delayRender) {
this.render();
}
}
connectedCallback() {
if (window.ShadyCSS) {
window.ShadyCSS.styleElement(this);
}
if (this._queue.length) {
this._processQueue();
}
}
_copyAttribute(name, to) {
const recipients = this.shadowRoot.querySelectorAll(to),
value = this.getAttribute(name),
fname = null == value ? "removeAttribute" : "setAttribute";
for (const node of recipients) {
node[fname](name, value);
}
}
_queueAction(action) {
this._queue.push(action);
}
_processQueue() {
this._queue.forEach(action => {
this[`_${action.type}`](action.data);
});
this._queue = [];
}
_setProperty({ name, value }) {
this[name] = value;
}
render() {
this.shadowRoot.innerHTML = null;
this.template.innerHTML = this.html;
if (window.ShadyCSS) {
window.ShadyCSS.prepareTemplate(this.template, this.tag);
}
this.shadowRoot.appendChild(this.template.content.cloneNode(!0));
}
}
window.customElements.define(HaxBodyBehaviors.tag, HaxBodyBehaviors);
`}static get properties(){return{}}static get tag(){return"hax-body-behaviors"}get templateUrl(){return"hax-body-behaviors.html"}get propertiesUrl(){return"hax-body-behaviors-properties.json"}get styleUrl(){return"hax-body-behaviors.css"}constructor(delayRender=!1){super();this.tag=HaxBodyBehaviors.tag;this.HAXWiring=new HAXWiring;let obj=HaxBodyBehaviors.properties;for(let p in obj){if(obj.hasOwnProperty(p)){this[p]=obj[p].value}}this._queue=[];this.template=document.createElement("template");this.attachShadow({mode:"open"});if(!delayRender){this.render()}}connectedCallback(){if(window.ShadyCSS){window.ShadyCSS.styleElement(this)}if(this._queue.length){this._processQueue()}}_copyAttribute(name,to){const recipients=this.shadowRoot.querySelectorAll(to),value=this.getAttribute(name),fname=null==value?"removeAttribute":"setAttribute";for(const node of recipients){node[fname](name,value)}}_queueAction(action){this._queue.push(action)}_processQueue(){this._queue.forEach(action=>{this[`_${action.type}`](action.data)});this._queue=[]}_setProperty({name,value}){this[name]=value}render(){this.shadowRoot.innerHTML=null;this.template.innerHTML=this.html;if(window.ShadyCSS){window.ShadyCSS.prepareTemplate(this.template,this.tag)}this.shadowRoot.appendChild(this.template.content.cloneNode(!0))}}window.customElements.define(HaxBodyBehaviors.tag,HaxBodyBehaviors);

4

package.json

@@ -9,3 +9,3 @@ {

},
"version": "0.0.19",
"version": "0.0.20",
"description": "Wire any element up to HAX",

@@ -51,3 +51,3 @@ "repository": {

},
"gitHead": "e7e556d70d4f43c46bfb1ec331dc5d9408464c03"
"gitHead": "ec3be2a2e69e26a379759cd94667ecb5c43bca8a"
}
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