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
本文档详细介绍了 TeaBrowser 中可用的 JavaScript API,包括设置窗口尺寸、位置、样式等属性的方法,以及显示、隐藏、关闭窗口等功能的函数。此外,还提供了获取窗口状态、暂停当前进程等功能。

1716

被折叠的 条评论
为什么被折叠?



