Don't publish uiFragmentVersion until the DOM nodes are up in the page.

This commit is contained in:
Tony Garnock-Jones 2016-12-07 19:19:53 +13:00
parent 7067c06961
commit 75bc4a8ca5
1 changed files with 1 additions and 2 deletions

View File

@ -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;