2
0
mirror of https://github.com/esiur/iui.git synced 2026-04-04 15:08:21 +00:00
This commit is contained in:
2021-10-29 17:09:15 +03:00
parent 1e8ae99d39
commit b3479dbdbd
35 changed files with 857 additions and 166 deletions

View File

@@ -1,4 +1,5 @@
import IUIElement from "./IUIElement.js";
import { IUI } from "./IUI.js";
export const BindingType = {
IUIElement: 0, // this will never happen !
@@ -260,7 +261,10 @@ export class Binding {
}
// Content Attribute
else if (this.type == BindingType.ContentAttribute) {
let d = await this._execute(this.target.ownerElement, data);
let targetElement = this.target.ownerElement;
let d = await this._execute(targetElement, data);
if (d === undefined)
return false;
@@ -268,7 +272,17 @@ export class Binding {
//if (d instanceof Promise)
// d = await d;
this.target.ownerElement.innerHTML = d;
targetElement.innerHTML = d;
if (window?.app?.loaded)
{
await IUI.create(targetElement);
await IUI.created(targetElement);
IUI.bind(targetElement, targetElement, "content");
await IUI.render(targetElement, targetElement._data, true);
}
//await IUI.updateTree(targetElement);
}
else if (this.type == BindingType.IfAttribute)
{