It could be helpful for the preXX links to have an ondone event.
Concrete example of how this could be useful:
Imagine an application with an integrated chat application (eg, Facebook Messenger, Google Talk). The application does not want the (large) JS and CSS associated with the chat functionality to waste bandwidth while the site is just starting up. However, they would like to initiate the download of this JS and CSS as soon as they can.
They could rel=preload tags for the resources associated with this application. When those resources were loaded, they could use the ondone event to insert them into the DOM. In fact, maybe it would even make sense to provide an API for the user to do this explicitly (eg, you could have a makeIntoRealResource() api on the which would transform it into a real JS script or CSS stylesheet. This would be a synchronous api, equivalent to inserting an inline JS/CSS stylesheet)
It could be helpful for the preXX links to have an ondone event.
Concrete example of how this could be useful:
Imagine an application with an integrated chat application (eg, Facebook Messenger, Google Talk). The application does not want the (large) JS and CSS associated with the chat functionality to waste bandwidth while the site is just starting up. However, they would like to initiate the download of this JS and CSS as soon as they can.
They could rel=preload tags for the resources associated with this application. When those resources were loaded, they could use the ondone event to insert them into the DOM. In fact, maybe it would even make sense to provide an API for the user to do this explicitly (eg, you could have a makeIntoRealResource() api on the which would transform it into a real JS script or CSS stylesheet. This would be a synchronous api, equivalent to inserting an inline JS/CSS stylesheet)