Open Bug 1280263 Opened 4 years ago Updated 2 years ago
Add an async version of ns
IDOMWindow Utils .load Sheet() API
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.
You need to log in before you can comment on or make changes to this bug.