webview の領域と階層情報を取得する (webview.frame)
宣言
frame = webview.frame([ id ])
パラメータ
- id
整数。省略可能。現在の webview の id を指定します。範囲は 1 ~ 1000、デフォルトは 1 です。
戻り値
- frame
テーブル。現在の webview の領域と階層情報を返します。
説明
webview の領域と階層情報を取得します。
使用例
local frame = webview.frame(1)
sys.alert(
"位置为:".."("..frame.x..","..frame.y..")\n"..
"大小为:".."(宽:"..frame.width..",高:"..frame.height..")\n"..
"层级为:".."("..frame.level..")"
)
注記:上記のコードでは、本章で扱っていない関数 sys.alert を使用しています。