Libraries »

Browser Library

browser.addlibinfo(name,version,author [,luacode])

Adds information about a library to the About Sandcat screen. Should be called by extensions during startup
version - the library version. If 'file:[dllfilename]' is used as version, the browser will read the version from the DLL file.
luacode - A code to be executed when the library information icon is clicked. This parameter is optional.


Adds a page to the bookmarks. This function bookmarks the page of the active tab if no parameters are provided.


Clears browsing data. The type parameter can be: cache, appcache, cookies, databases, history, settings


Closes an extension page by its name


Closes a tab by its name. If no param is supplied, closes the active tab


Closes all tabs. If a tab name is supplied as parameter, closes all tabs except the specified tab.
E.g. browser.closetabs( will close all but active tab.


Runs a Lua script.


Closes the browser


Gets the contents of a file that is inside an extension package
returns: string


Gets details about a Sandcat Task, launched using the tab:runtask() function
returns: table


Goes to the specified tab

browser.loadpagex(pagename,html [,tablename])

Loads an extension page in a separate page. The third parameter is optional. If supplied, associates the HTML elements of the page with a Lua table. See UI Manipulation for details.

browser.newtab(url [,source])

Opens an URL in a new tab. The source parameter is optional - if specified, the page will be loaded from it.


Creates a custom extension tab. Returns the tab number
returns: integer
The following keys can be provided (all of them optional):
activepage - the active tab page (ex: browser, source, log...)
icon - an icon url
html - page contents
shownavbar - if false, hides the navigation bar.
table - the name of a Lua table. Associates the HTML elements of the page with the table. See UI Manipulation for details.
tag - an unique string to identify the tab. If newtabx() is called again and a tab with the supplied tag has been already created, Sandcat goes to the tab instead of creating a new one. Additionaly, if a loadnew key is supplied and is true, the tab page is reloaded from the HTML string supplied as the second parameter.
title - the tab title
toolbar - a custom toolbar source (eg: MyExtension.scx#MyToolbar.html)


Opens a new browser window. If a URL is provided as parameter, opens the URL.


Stops and removes a Sandcat Task from the tasks list.


Sets the active page by its name (eg, browser, source, log, etc).


Sets a new search engine


Loads the Request Builder bar.

browser.showurl(url [,source])

Loads an URL in the bottom bar. The source parameter is optional - if supplied, the page will be loaded from it.

browser.stoptask(taskid [,reason])

Stops a Sandcat Task. The second parameter is optional, can be used to explain the reason of the stop.


Suspends a Sandcat Task. The second parameter is optional - if supplied and true, resumes the task.


  • browser.jsvalues - stores temporary values.
  • browser.options - allows to set the visibility of special UI parts

See also



Page last modified on October 23, 2015, at 10:55 PM
© 2023 Syhunt