Re-insertion of [removed] tags

2019-07-19 07:17发布

问题:

  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 already 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)

回答1:

Would simply evaling the code be sufficient for your purposes?

eval(script_element.innerText);

Update: Reappending the script seems to work.



回答2:

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.