set id of DOM container, in case server-side returned a different eTemplate

This commit is contained in:
Ralf Becker 2020-07-21 22:04:51 +02:00
parent 382a9576c7
commit 8e213a7de5
2 changed files with 4 additions and 0 deletions

View File

@ -996,6 +996,8 @@ var etemplate2 = /** @class */ (function () {
// @ts-ignore // @ts-ignore
if (this && typeof this.load == 'function') { if (this && typeof this.load == 'function') {
// Called from etemplate // Called from etemplate
// set id in case serverside returned a different template
this._DOMContainer.id = this.uniqueId = data.DOMNodeID;
// @ts-ignore // @ts-ignore
this.load(data.name, data.url, data.data); this.load(data.name, data.url, data.data);
return true; return true;

View File

@ -1284,6 +1284,8 @@ export class etemplate2
if (this && typeof this.load == 'function') if (this && typeof this.load == 'function')
{ {
// Called from etemplate // Called from etemplate
// set id in case serverside returned a different template
this._DOMContainer.id = this.uniqueId = data.DOMNodeID;
// @ts-ignore // @ts-ignore
this.load(data.name, data.url, data.data); this.load(data.name, data.url, data.data);
return true; return true;