@pelagiccreatures/sargasso
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -118,3 +118,19 @@ /** | ||
processScripts (scripts) { | ||
Array.from(scripts).forEach((script) => { | ||
script.remove() | ||
const id = script.getAttribute('id') | ||
if (!document.getElementById(id)) { | ||
// script.onload = function () {} | ||
document.getElementsByTagName('head')[0].appendChild(script) | ||
} | ||
}) | ||
} | ||
mergePage (html) { | ||
const ephemerals = document.querySelectorAll('[data-ephemeral]') | ||
Array.from(ephemerals).forEach((ephemeral) => { | ||
ephemeral.remove() | ||
}) | ||
const doc = html.split(/(<body[^>]*>|<\/body>)/ig) | ||
@@ -127,2 +143,3 @@ const fragment = makeFragment(doc[2]) | ||
const replace = fragment.getElementById(id) | ||
this.processScripts(replace.querySelectorAll('script')) | ||
const frame = () => { | ||
@@ -129,0 +146,0 @@ container.parentNode.replaceChild(replace, container) |
{ | ||
"name": "@pelagiccreatures/sargasso", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Simple, Fast, Reactive, supervised Javascript controllers for html elements.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
619566
32
9496