Basically, the browser does the following when it executes <script> on the page:
If the script <script> not been executed before it does the following:
- Accepts text from
<script> ; - Call
eval(thatScriptText) ; - Marks the
<script> DOM node as done;
When you clone a node, it also receives an internal "executable" flag, which prevents subsequent script executions.
Solution: if you want to restart the script, follow steps # 1 and # 2. In this case, cloning is not required.
c-smile
source share