https://bugzilla.wikimedia.org/show_bug.cgi?id=69924

--- Comment #20 from Krinkle <[email protected]> ---
(In reply to Krinkle from comment #19)
> Another solution would be to return early instead of wrap the whole thing.
> 
> While a return statement is not allowed in the global scope, a throw works
> fine.
> 
> 
>  if (!cond)
>   throw '';
>  .. rest of script ..
>  .. mw/$ ..
> 
> This doesn't cause much disruption since javascript keeps running. The throw
> only aborts the current script, which is the user/site script we want to
> unload.

Hm.. continuing the monolog; while exceptions are harmless indeed, that's what
we started with. Execute the script and let it fail on mw/$ undefined.

This wasn't really a problem. Except that old IE tends to actually expose
script errors to regular users through an alert, so I guess we can't do this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to