-
Notifications
You must be signed in to change notification settings - Fork 29
PKUTIL.loadHTML
kerrishotts edited this page Nov 13, 2012
·
1 revision
(part of PKUTIL)
Return Type: void
Parameters: theFileName ( string ), options ( object ), completion ( function )
Loads a local or remote resource and calls the completion function when complete. Because the idea is to load HTML and inject it into the DOM, the options parameter specifies the creation options for a surrounding DIV
:
{ "id": the ID of the surrounding DIV,
"className": the class to attach to the DIV,
"attachTo": which element the new DIV should become a child of.
}
Any SCRIPT
tags found within the loaded HTML will also be appended to the DOM.
The completion will be called with a single parameter indicating success or failure.
For example:
PKUTIL.loadHTML ( "./views/testView.html", { id: "testView", className: "container",
attachTo: "rootContainer" }, doSomethingWhenDone );
0.1 Introduced
0.2 Docs Valid