TeaBrowser开发手册

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

TeaBrowser javascript API manual

Properties:

Name Description
window.hostWidthSet window width pixels
window.hostHeightSet window height pixels
window.hostTopSet window top pixels
window.hostLeftSet window left pixels
window.hostBorderStyleSet 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.hostRoundCornerSet window round corner radius in pixels.
The property only available when window.hostBorderStyle=0
window.hostOpacitySet window Opacity from 0 to 1

Functions

NameDescription
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

nameDescription
window.onexitFire 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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值