fix empty script tags
-
Thatcher
Ah good catch, definitely shouldn't barf. empty script tags still do some
crazy stuff in browsers (empty tags with src attributes wont load for
example) -
nickg
My commit which rejiggered how [before|after]ScriptLoad is invoked does not have this problem.
http://github.com/client9/env-js/commit/9d5bdb6accb90a9668ec639fe5b...
or cutnpaste the file from
http://github.com/client9/env-js/blob/9d5bdb6accb90a9668ec639fe5b4a...
I understand this might not be the end-all be all of the API, but it's better and solves Brians problem.
-
nickg
- State changed from new to resolved
- Assigned user changed from Thatcher to nickg
Thanks for filling this since it uncovered some juicy bugs!
The problem is actually with HTMLScriptElement in that ascript.text can return NULL when it should return ''. Also it could return a partial script fragment instead of the whole script (unlikely but possible with very large scripts).
setting script.text was also incorrect.
Corrected, with lots of notes from spec, and a few unit tests. See commit http://github.com/thatcher/env-js/commit/d07dbde5c11bb4c80e9147bcc8... for more info (not happy with how git does diffs, but oh well).
Let me know if this doesn't fix the issues.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.