Difference between revisions of "lure.load"
(→Arguments) |
(→Return value) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Desc | Desc | ||
− | + | == Syntax/Usage == | |
− | ==== Arguments | + | <source lang="lua"> |
+ | require("lure.lua") | ||
+ | |||
+ | htmlDoc = lure.load("test.html") | ||
+ | |||
+ | print(htmlDoc) | ||
+ | --OUTPUT: [object]:DOCUMENT_NODE | ||
+ | </source> | ||
+ | |||
+ | == Arguments == | ||
{| | {| | ||
Line 12: | Line 21: | ||
|- | |- | ||
| pObj | | pObj | ||
+ | | align="left" style="padding-left:10px;" | Any | ||
| align="left" style="padding-left:10px;" | The object to load into the lure.document scope. Can be a file/DOM Object/or xml/html text. If no arguments are specified, the function will return an empty DOM Object | | align="left" style="padding-left:10px;" | The object to load into the lure.document scope. Can be a file/DOM Object/or xml/html text. If no arguments are specified, the function will return an empty DOM Object | ||
| align="left" style="padding-left:10px;" | No | | align="left" style="padding-left:10px;" | No | ||
|} | |} | ||
− | + | == Return value == | |
{| | {| | ||
Line 22: | Line 32: | ||
! align="left" style="padding-left:10px;" | Description | ! align="left" style="padding-left:10px;" | Description | ||
|- | |- | ||
− | | | + | | DOM Object |
| align="left" style="padding-left:10px;" | On successful completion of the the load function, it will return a valid DOM Object, or nil on failure | | align="left" style="padding-left:10px;" | On successful completion of the the load function, it will return a valid DOM Object, or nil on failure | ||
|} | |} |
Latest revision as of 05:43, 3 December 2011
Desc
Syntax/Usage
require("lure.lua")
htmlDoc = lure.load("test.html")
print(htmlDoc)
--OUTPUT: [object]:DOCUMENT_NODE
Arguments
Name | Type | Decription | Required |
---|---|---|---|
pObj | Any | The object to load into the lure.document scope. Can be a file/DOM Object/or xml/html text. If no arguments are specified, the function will return an empty DOM Object | No |
Return value
Return Type | Description |
---|---|
DOM Object | On successful completion of the the load function, it will return a valid DOM Object, or nil on failure |