Add hook for finalizing js_preload.

Useful if things generated in multiple places need to be coalesced into
a single preload URL.
This commit is contained in:
Neil Williams
2013-03-29 15:38:21 -07:00
parent 61ebe06837
commit 02a72a27cb

View File

@@ -170,6 +170,8 @@ class JSPreload(js.DataSource):
self.data[url] = data
def use(self):
hooks.get_hook("js_preload.use").call(js_preload=self)
if self.data:
return js.DataSource.use(self)
else: