From e690dfe2c176ceb050aecfe62f550c9d8150d76b Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 18 Jun 2019 22:10:50 -0700 Subject: [PATCH] Runtime stamped dom-if --- lib/elements/dom-if.js | 138 ++++++++++++++++++++----------- lib/elements/dom-repeat.js | 5 +- lib/mixins/property-effects.js | 98 ++++++++++++++-------- lib/mixins/template-stamp.js | 14 ++-- lib/utils/settings.js | 40 +++++++++ lib/utils/templatize.js | 122 +++++++++++++++------------ test/runner.html | 4 + test/unit/dom-if.html | 5 ++ test/unit/dom-repeat-elements.js | 4 +- test/unit/dom-repeat.html | 5 +- 10 files changed, 295 insertions(+), 140 deletions(-) diff --git a/lib/elements/dom-if.js b/lib/elements/dom-if.js index 70289708dd..8c09d91293 100644 --- a/lib/elements/dom-if.js +++ b/lib/elements/dom-if.js @@ -16,6 +16,8 @@ import { microTask } from '../utils/async.js'; import { root } from '../utils/path.js'; import { wrap } from '../utils/wrap.js'; import { hideElementsGlobally } from '../utils/hide-template-controls.js'; +import { fastDomIf, strictTemplatePolicy } from '../utils/settings.js'; +import { showHideChildren } from '../utils/templatize.js'; /** * The `` element will stamp a light-dom `