tangy-form
Advanced tools
Comparing version 1.4.0 to 1.5.0
{ | ||
"name": "tangy-form", | ||
"description": "A form element for lazy loaded multipage forms", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"main": "tangy-form.js", | ||
"scripts": { | ||
"start": "polymer serve", | ||
"test": "polymer test -p -l chrome" | ||
"test": "polymer test -l chrome" | ||
}, | ||
@@ -10,0 +10,0 @@ "dependencies": { |
@@ -171,4 +171,5 @@ import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
super() | ||
this._innerHTML = this.innerHTML | ||
this.innerHTML = '' | ||
if (this.querySelector('template')) { | ||
this.template = this.querySelector('template').innerHTML | ||
} | ||
} | ||
@@ -333,4 +334,4 @@ | ||
// Open it, but only if empty because we might be stuck. | ||
if (open === true && this.$.content.innerHTML === '' && this._innerHTML) { | ||
this.openWithContent(this._innerHTML) | ||
if (open === true && this.$.content.innerHTML === '' && this.template) { | ||
this.openWithContent(this.template) | ||
} | ||
@@ -366,3 +367,3 @@ else if (open === true && this.$.content.innerHTML === '') { | ||
let form = this.shadowRoot.querySelector('form') | ||
if (open === true && form && form.getAttribute('on-open')) { | ||
if (this.open === true && form && form.getAttribute('on-open')) { | ||
this.fireHook('on-open') | ||
@@ -369,0 +370,0 @@ this.fireHook('on-change') |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4
238701
4953