Control.attach override.
Namespace: MindFusion.Common.UI
File: WindowBase.js
JavaScript Copy Code |
---|
function attach () |
The following code uses the attach method in a function that creates a Window, which derives from WindowBase, programmatically:
JavaScript Copy Code |
---|
document.addEventListener("DOMContentLoaded", function () { var window = new ui.Window(); window.top = ui.Unit.percentage(25); window.left = ui.Unit.percentage(25); window.minWidth = ui.Unit.pixel(600); window.minHeight = ui.Unit.pixel(600); window.useFrameTitle = true; window.data = chartItem.item; window.templateUrl = "ChatWindow.html"; window.iconSrc = "icons\chart.png"; document.querySelector("#window_element").appendChild(window.draw()); window.attach(); } |