Added support do do a push-state ajax request with forms

This commit is contained in:
markusfluer
2017-09-18 14:13:39 +02:00
parent 109e78347f
commit 86e5a2281a
10 changed files with 214 additions and 14 deletions

View File

@@ -4,6 +4,11 @@ var evalScript = require("./eval-script")
// Needed since innerHTML does not run scripts
module.exports = function(el) {
// console.log("going to execute scripts for ", el)
if (el.tagName.toLowerCase() === "script") {
evalScript(el);
}
forEachEls(el.querySelectorAll("script"), function(script) {
if (!script.type || script.type.toLowerCase() === "text/javascript") {
if (script.parentNode) {