javascript - How to reload script tag -
javascript - How to reload script tag -
i'm dynamically changing script
tag's src attribute using javascript.
problem is, i'd "undo" previous javascript before re-executing it. way this?
thanks,
g3
i can describe method used accomplish partial undo in project. ugly, might useful. first, may need refactor script work within iframe, and/or wrap in with
statement give easy access objects in parent (don't think of with(opener)
; you'll want more precise with({someobject: opener.someobject})
.
when script runs, can utilize iframe's global scope , dom freely. then, instead of reloading <script>
tag, overwrite whole iframe, reset script did within iframe.
javascript polymer web-component
Comments
Post a Comment