TeaBrowser javascript API manual
Properties:
Name | Description |
---|---|
window.hostWidth | Set window width pixels |
window.hostHeight | Set window height pixels |
window.hostTop | Set window top pixels |
window.hostLeft | Set window left pixels |
window.hostBorderStyle | Set window border style,Value:0,1,2,3 0, No border 1,Resizable,Minimize,Maximize available 2,Fixed,Maximize disable 3,Fixed,Only close button available. |
window.hostRoundCorner | Set window round corner radius in pixels. The property only available when window.hostBorderStyle=0 |
window.hostOpacity | Set window Opacity from 0 to 1 |
Functions
Name | Description |
---|---|
window.show() | show window |
window.hide() | hide window |
window.close() | close window |
window.maximize() | maximize window |
window.minimize() | minimize window |
window.restore() | restore window |
window.moveTo(x,y) | Move Window to the specified location. |
window.moveBy(dx,dy) | Move Window by the specified amount. |
window.resizeTo(w,h) | Resize the window to specified size |
window.resizeBy(dw,dh) | Resize the window by specified amount. |
window.getHostStatus() | update window status. after call the function ,you can get window status by: window.hostWidth window.hostHeight window.hostTop window.hostLeft window.hostVisible (true or false) |
window.sleep(t); | sleep current process (milliseconds) |
Events
name | Description |
---|---|
window.onexit | Fire when user exit the application. return false, can cancel the action return true, exit the application. |
Notes:
To multi-frames web page , the extension only available to top window.
The index.html in INSTALL directory is the default page, you can redirect to other page.
www.teabrowser.com
2007-5-20