Container.attach override.
Namespace: MindFusion.Common.UI
File: WindowHost.js
JavaScript Copy Code |
---|
function attach () |
Each Control object needs to be associated with an HTMLElement. You can specify one in the constructor. When you use the constructor without parameters the library creates a <DIV> element automatically for the new Control. You have to add it by adding the new Control to the tree of DOM elements of your web page, between the calls of its draw and attach methods.
The following code creates a new WindowHost and calles its attach method:
JavaScript Copy Code |
---|
// Create a new WindowHost control. document.body.appendChild(host.draw()); |