fixup! Don't mark dynamically-created scripts parser-inserted

enum code cleanup (addresses review comment).
Implement cloning steps for script element
fixup! Infrastructure for synchronous script loading

Re-use `Text()`
fixup! Infrastructure for synchronous script loading

Check `is_in_doc` before calling `prepare`
Test for sync script loading