Ready event fired multiple times if an unhandled exception occurs
|Reported by:||Michael Warning||Owned by:|
|Keywords:||ready exception error-handling||Cc:|
If a ready handler causes an unhandled exception then the ready list will be run twice. I'm testing with 1.4.3 in both Firefox and Safari. e.g.:
alert('in ready'); window.frooble();
This appears to happen because two callbacks are registered via addEventListener ("DOMContentLoaded" and "load"). The DOMContentLoaded handler cleans up after itself but it doesn't cleanup the load handler as well.
Alternatively, the ready list is null'd out after it is processed instead of making a copy, nulling the original, and only then walking the list.
Change History (10)
comment:1 Changed 6 years ago by SlexAxton
- Component changed from unfiled to core
- Keywords ready exception error-handling added
- Resolution set to wontfix
- Status changed from new to closed