@ampify/aquery
Advanced tools
Comparing version 1.5.6 to 2.0.0
{ | ||
"name": "@ampify/aquery", | ||
"version": "1.5.6", | ||
"version": "2.0.0", | ||
"main": "./dist/aquery.js", | ||
@@ -36,4 +36,3 @@ "module": "./src", | ||
"access": "public" | ||
}, | ||
"gitHead": "7493696d9129abcc6d2438daf6db9a1ba548502d" | ||
} | ||
} |
@@ -197,9 +197,2 @@ import jQuery from 'jquery'; | ||
}); | ||
for (const node of this.nodes) { | ||
if (node.nodeType === 1 && node !== document.body) { | ||
node.setAttribute('ampify-keep', ''); | ||
} | ||
} | ||
return this.proxy; | ||
@@ -388,8 +381,2 @@ } | ||
for (const node of this.nodes) { | ||
if (node.nodeType === 1 && node !== document.body) { | ||
node.setAttribute('ampify-keep', ''); | ||
} | ||
} | ||
this.proxy = new Proxy(this, { | ||
@@ -550,3 +537,2 @@ get(target, prop) { | ||
const div = document.createElement('div'); | ||
div.setAttribute('ampify-keep', ''); | ||
div.id = genId(div); | ||
@@ -605,8 +591,2 @@ | ||
for (const node of this.nodes) { | ||
if (node.nodeType === 1 && node !== document.body) { | ||
node.setAttribute('ampify-keep', ''); | ||
} | ||
} | ||
addEffectsCss(); | ||
@@ -773,2 +753,14 @@ | ||
}; | ||
aQuery.keep = (selectors) => { | ||
selectors.forEach(selector => { | ||
const elements = document.querySelectorAll(selector); | ||
if (elements && elements.length > 0) { | ||
elements.forEach(element => { | ||
element.setAttribute('ampify-keep', ''); | ||
}); | ||
} | ||
}); | ||
}; | ||
aQuery.injectCss = injectCss; | ||
@@ -775,0 +767,0 @@ |
@@ -81,3 +81,2 @@ import randomId from './randomId'; | ||
dialog.setAttribute('hidden', ''); | ||
dialog.setAttribute('ampify-keep', ''); | ||
dialog.setAttribute( | ||
@@ -84,0 +83,0 @@ 'data-amp-bind-hidden', |
@@ -81,3 +81,2 @@ import randomId from './randomId'; | ||
dialog.setAttribute('hidden', ''); | ||
dialog.setAttribute('ampify-keep', ''); | ||
dialog.setAttribute( | ||
@@ -84,0 +83,0 @@ 'data-amp-bind-hidden', |
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
48524
1538