luci-base: xhr.js: defer starting poll queue
authorJo-Philipp Wich <jo@mein.io>
Fri, 22 Jun 2018 07:39:30 +0000 (09:39 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 22 Jun 2018 07:42:15 +0000 (09:42 +0200)
commit69782ccbccd67bac08f43b692c2a05afddb41bf0
treebc875cd1d45d4c631a228795909766110e47b961
parente380cf51f8d60193f5743651f3c683389e4ef211
luci-base: xhr.js: defer starting poll queue

Defer the start of the queue poll loop until the document has been loaded.

This allows all XHR.poll() invocations on the page to register their
handlers before the first batch of requests is made.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/xhr.js