Open
Bug 1722896
Opened 3 years ago
Updated 11 months ago
Take aboutNetError.js into the 21st century
Categories
(Firefox :: Security, task)
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox92 | --- | affected |
People
(Reporter: Gijs, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
There are a lot of unfortunate things happening in this file
In no particular order, and not limited to:
- we wait for DOMContentLoaded to set the page up. There's no particular reason we need to do this. The script is loaded as a module at the end of the page, so any elements we need are guaranteed to be present.
- The parameters we need are repeatedly extracted from the query string - we could just do that once.
- The file is 1000+ lines of toplevel functions, with the main
initPage
one somewhere in the middle; they should be organized better - The logic for classes, descriptions, etc. is completely higgledy-piggledy, so it's very hard to determine what errors get treated in what way.
- It uses CSSOM where it should be using classes that get used by CSS, or the
hidden
property where applicable. - We use innerHTML for DTD-based strings, that should be converted to fluent. We should have a central mapping of error codes to error message identifiers, and stick to it. This will likely mean we also need to update the docshell versions of this page & script.
- Passing arbitrary localized text content from the docshell side to the main page is 😬
Updated•11 months ago
|
Blocks: necko-error
You need to log in
before you can comment on or make changes to this bug.
Description
•