Objects »

Tab Object

The tab object is automatically created when Sandcat starts and is always connected to the active tab.

Methods

tab:clearheaders()

Clears the live headers

tab:clearlog()

Clears the contents of the Log tab

tab:goback()

Goes back in history

tab:goforward()

Goes forward in history

tab:gotosrcline(int)

Goes to the source page and scrolls to a given line number

tab:gotourl(url[,source])

Goes to the supplied url. The source parameter is optional - if supplied, the page will be loaded from it.

tab:loadrequest(method,url[,postdata])

Sends a HTTP request, loads its response and adds the request to the Live Headers list. The third parameter is optional; can be used in POST requests. This method can alternatively be called with a single table parameter (see below).

tab:loadrequest(luatable)

Sends a custom HTTP request, loads its response and adds the request to the Live Headers list.
See Request for details.

tab:loadsourcefile(filename)

Loads the contents of source page from a file.

tab:loadx(html[,tablename])

Loads an extension page. The second parameter is optional - if supplied, associates the HTML elements of the page with a Lua table. See UI Manipulation for details.

tab:log(s)

Prints a line to the Log page.

tab:logerror(componenttitle,linenumber,msg)

Manually adds an error item to the Script Errors screen.

tab:logrequest(json[,responsetext])

Manually logs a request from a custom HTTP client class to the Live Headers. The second parameter is optional and can contain the response text.
See Request for details.

tab:reload(ignorecache)

Reloads the page. If the first parameter is supplied and is true, the cache will be ignored.

tab:runjs(jscode[,url,startline,reporterrors])

Executes a JavaScript code in the loaded page. The last three parameters are optional.

tab:runluaonlog(msg,luacode)

Sets a Lua script to be executed after a certain message is received through the JS console.log() method. This method should be used with caution.

tab:runtask(luacode[,json,menuhtml])

Executes a Lua code in an isolated process. The second parameter is optional and can be used to pass parameters to the task process.

tab:search(s)

Performs a search using the active search engine

tab:sendrequest(method,url[,postdata])

Sends a HTTP request and adds the request to the Live Headers list. The third parameter is optional. This method can alternatively be called with a single table parameter (see below).

tab:sendrequest(luatable)

Sends a custom HTTP request and adds the request to the Live Headers list.
See Request for details.

tab:showauthdialog([username,password])

Displays the basic authentication dialog. The username and password parameters are optional. If supplied, they are used as default values in the dialog.

tab:stopload()

Stops loading a page.

tab:viewsource()

Views the page source in an external editor.

Properties

capturebooleanEnables or disables the live headers capture
capturebrowserbooleanEnables or disables the live headers capture just for browser requests
downloadfilesbooleanEnables or disables the download capability
headersfilterstringGets or sets the live headers filter
iconstringGets or sets the tab icon
lastjslogmsgstringGets the last message from a JS console.log() call
loadendstringSets a Lua script to be executed after the page finishes loading
loadendjsstringSets a JavaScript to be executed after the page finishes loading
logtextstringGets or sets the contents of the Log page
namestringGets the unique ID of the tab
resliststringGets the list of resources (images, CSS files, etc) of the loaded page
screenshotstringTakes a screenshot of the loaded page and returns its temporary filename
sourcestringGets or sets the source of the loaded page
statusstringGets or sets the status bar text
titlestringGets or sets the tab title
urlstringGets the URL of the loaded page
zoomleveldoubleGets or sets the zoom level

Developer

Language

Page last modified on November 20, 2015, at 02:09 PM
© 2013 Syhunt