diff --git a/bricks/build.sh b/bricks/build.sh index 996c3aa..73fe17b 100755 --- a/bricks/build.sh +++ b/bricks/build.sh @@ -1,4 +1,4 @@ -SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.js \ +SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.js domelement.js \ i18n.js widget.js layout.js bricks.js image.js \ jsoncall.js myoperator.js scroll.js menu.js modal.js running.js \ markdown_viewer.js video.js audio.js toolbar.js tab.js \ diff --git a/bricks/donelement.js b/bricks/donelement.js new file mode 100644 index 0000000..6320955 --- /dev/null +++ b/bricks/donelement.js @@ -0,0 +1,14 @@ +var bricks = window.bricks || {}; + +bricks.DomElement = class extends bricks.JsWidget { + /* + { + html: + } + constructor(opts){ + super(opts); + this.dom_element.interHtml = opts.html; + } +} + +bricks.Factory.register('DomElement', bricks.DomElement); diff --git a/examples/domelement.ui b/examples/domelement.ui new file mode 100644 index 0000000..de99b0b --- /dev/null +++ b/examples/domelement.ui @@ -0,0 +1,6 @@ +{ + "widgettype":"DomElement", + "options":{ + "html":"
Test domelement
" + } +}