From 75bc4a8ca5a9dbfc94687291522785c0f035d8a2 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 7 Dec 2016 19:19:53 +1300 Subject: [PATCH] Don't publish uiFragmentVersion until the DOM nodes are up in the page. --- js/src/ui.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/src/ui.js b/js/src/ui.js index 91e2dc7..fde6f6e 100644 --- a/js/src/ui.js +++ b/js/src/ui.js @@ -245,10 +245,8 @@ function UIFragment(fragmentId) { this.name = ['uiFragment', fragmentId]; } -var nextVersion = 0; UIFragment.prototype.boot = function () { return Patch.sub(Trie.projectionToPattern(this.demandProj)) // track demand - .andThen(Patch.assert(uiFragmentVersion(this.fragmentId, nextVersion++))) // assert presence .andThen(Patch.sub(Trie.projectionToPattern(this.eventDemandProj))) // ^ track demand for fragment-specific events ; @@ -394,6 +392,7 @@ UIFragment.prototype.updateContent = function (newSelector, newHtml, newOrderBy) }); }; +var nextVersion = 0; UIFragment.prototype.handleEvent = function (e) { var self = this;