Closed Bug 1618292 Opened 1 year ago Closed 1 year ago

[rel=preload] Update `ScriptLoader` to use `PreloaderBase` and `Document.PreloadService`

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mayhemer, Assigned: mayhemer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Part of Design documentation for rel=preload

Please follow this “script” type design.

This depends on the PreloaderBase class being implemented. The idea is to let the script load handler derive from it and let the loader register it in Document.PreloadService.

Note that script loader will never be called more than once to start a speculative load, neither preload or regular, so there is no need to add any more coalescing than we already have in the HTML5 parser (the caller to the loader) and the script loader itself.

Stealing from the DOM team. I want to verify the API and have an example implementation other can refer to.

Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Pushed by honzab.moz@firemni.cz:
https://hg.mozilla.org/integration/autoland/rev/a7541ff8e630
Make ScriptLoadRequest derive and use PreloaderBase to support new preload as speculative load feature, r=smaug
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Regressions: 1658571
You need to log in before you can comment on or make changes to this bug.