* Use DOM API to create Order Attribution inputs * Add changelog entry * Delete unnecessary changelog --------- Co-authored-by: Tomek Wytrębowicz <tomalecpub@gmail.com>
This commit is contained in:
parent
f1badbfb4b
commit
deb15d201e
|
@ -166,12 +166,16 @@
|
||||||
* but it's not yet supported in Safari.
|
* but it's not yet supported in Safari.
|
||||||
*/
|
*/
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
let inputs = '';
|
this.innerHTML = '';
|
||||||
|
const inputs = new DocumentFragment();
|
||||||
for( const fieldName of this._fieldNames ) {
|
for( const fieldName of this._fieldNames ) {
|
||||||
const value = stringifyFalsyInputValue( ( this.values && this.values[ fieldName ] ) || '' );
|
const input = document.createElement( 'input' );
|
||||||
inputs += `<input type="hidden" name="${params.prefix}${fieldName}" value="${value}"/>`;
|
input.type = 'hidden';
|
||||||
|
input.name = `${params.prefix}${fieldName}`;
|
||||||
|
input.value = stringifyFalsyInputValue( ( this.values && this.values[ fieldName ] ) || '' );
|
||||||
|
inputs.appendChild( input );
|
||||||
}
|
}
|
||||||
this.innerHTML = inputs;
|
this.appendChild( inputs );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue