Closed
Bug 1280263
Opened 10 years ago
Closed 2 years ago
Add an async version of nsIDOMWindowUtils.loadSheet() API
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
DUPLICATE
of bug 1280265
People
(Reporter: jwkbugzilla, Unassigned)
References
Details
Currently, nsIDOMWindowUtils.loadSheet() method will load stylesheets synchronously. While this probably makes the timing more predictable, the requirement to retrieve the data synchronously is rather awkward with E10S.
Adblock Plus will soon use that API with a custom protocol scheme, to work around bug 1187099 among other things. However, the data is in the parent process so in order to implement nsIChannel.open() we'll have to message the parent process synchronously. This means that we'll block the entire content process whenever a new document is created - not a huge issue but still unnecessary.
IMHO, it should be possible to add nsIDOMWindowUtils.loadSheetAsync() which would do the same thing but load and insert the stylesheet asynchronously. That function probably needs an additional callback to indicate that the operation completed, Adblock Plus wouldn't need it however.
| Reporter | ||
Updated•10 years ago
|
Severity: normal → enhancement
Updated•8 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
Comment 1•2 years ago
|
||
This can be implemented if preload sheet supports async operations, which is indeed possible. I'll close this as a duplicate of bug 1280265, which in turn will be closed as a duplicate of another one.
Note: extensions cannot use any of these APIs; CSS stylesheets registered through content_scripts and other declarative "content script APIs already use the same internal mechanisms.
You need to log in
before you can comment on or make changes to this bug.
Description
•