开发者

Re-insertion of <script> tags

  1. Insertion of a file's tag, thus executing the file's code.
  2. Removal of the file's tag.
  3. Insertion of the same file's tag.

Firebug does not seem to acknowledge and does not show the reinserted tag when the file's has alread开发者_如何学运维y been inserted before. It does upon new insertions, of course.

EDIT: Is this a problem of some kind? (the file still reloads apparently, but my tests only rely on logging some simple stuff)


Would simply evaling the code be sufficient for your purposes?

eval(script_element.innerText);

Update: Reappending the script seems to work.


Apparently, FireBug not showing the reinserted tag after removing it (probably LAB's fault) does not bring any side effects or problems which could need any atenttion.

Even the code gets rerun, so I guess problem solved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜