Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
AOverlayWebWindow displays an HTML window inside Interface.Properties
| Name | Type | Summary |
|---|---|---|
| url | string |
The URL of the HTML displayed in the window. Read-only. |
| position | Vec2 |
The position of the window, in pixels. |
| size | Vec2 |
The size of the window interior, in pixels. |
| visible | boolean |
|
| Constructor | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
new OverlayWebWindow( titleOrPropertiesopt, sourceopt, widthopt, heightopt )
Parameters
|
Methods
| Name | Return Value | Summary |
|---|---|---|
clearDebugWindow
|
None |
Deprecated: This method is deprecated and will be removed. |
close
|
None |
Closes the window. Note: The window also closes when the script ends. |
emitScriptEvent
|
None |
Sends a message to the HTML page. To receive the message, the HTML page's script must connect to the
|
emitWebEvent
|
None |
Deprecated: This function is deprecated and will be removed. |
getEventBridge
|
object |
Deprecated: This method is deprecated and will be removed. |
getPosition
|
Vec2 |
Gets the position of the window. |
getSize
|
Vec2 |
Gets the size of the window interior. |
getURL
|
string |
Gets the URL of the HTML displayed. |
hasClosed
|
None |
Deprecated: This method is deprecated and will be removed. |
hasMoved
|
None |
Deprecated: This method is deprecated and will be removed. |
initQml
|
None |
Deprecated: This method is deprecated and will be removed. |
isVisible
|
boolean |
Gets whether the window is shown or hidden. |
qmlToScript
|
None |
Deprecated: This method is deprecated and will be removed. |
raise
|
None |
Raises the window to the top. |
sendToQML
|
None |
Deprecated: This method is deprecated and will be removed. |
setPosition
|
None |
Sets the position of the window, from a Vec2. |
setPosition
|
None |
Sets the position of the window, from a pair of numbers. |
setScriptURL
|
None |
Injects a script into the HTML page, replacing any currently injected script. |
setSize
|
None |
Sets the size of the window interior, from a Vec2. |
setSize
|
None |
Sets the size of the window interior, from a pair of numbers. |
setTitle
|
None |
Sets the window title. |
setURL
|
None |
Loads HTML into the window, replacing current window content. |
setVisible
|
None |
Shows or hides the window. |
Signals
| Name | Summary |
|---|---|
closed
|
Triggered when the window is closed. |
fromQML
|
Deprecated: This signal is deprecated and will be removed. |
moved
|
Triggered when the window changes position. |
positionChanged
|
Triggered when the window changes position. |
resized
|
Triggered when the window changes size. |
scriptEventReceived
|
Deprecated: This signal is deprecated and will be removed. |
sizeChanged
|
Triggered when the window changes size. |
urlChanged
|
Triggered when the window's URL changes. |
visibleChanged
|
Triggered when the window is hidden or shown. |
webEventReceived
|
Triggered when a message from the HTML page is received. The HTML page can send a message by calling:
|
Method Details
| (static) clearDebugWindow( ) |
|---|
|
Deprecated: This method is deprecated and will be removed. |
| (static) close( ) |
|---|
|
Closes the window. Note: The window also closes when the script ends. |
| (static) emitScriptEvent( message ) | ||||||
|---|---|---|---|---|---|---|
|
Sends a message to the HTML page. To receive the message, the HTML page's script must connect to the
Parameters
ExamplesSend and receive messages with an HTML window.
|
| (static) emitWebEvent( message ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This function is deprecated and will be removed. Parameters
|
|
(static) getEventBridge( ) → {object}
Returns: Object. |
|---|
|
Deprecated: This method is deprecated and will be removed. |
|
(static) getPosition( ) → {Vec2}
Returns: The position of the window, in pixels. |
|---|
|
Gets the position of the window. |
|
(static) getSize( ) → {Vec2}
Returns: The size of the window interior, in pixels. |
|---|
|
Gets the size of the window interior. |
|
(static) getURL( ) → {string}
Returns: - The URL of the HTML page displayed. |
|---|
|
Gets the URL of the HTML displayed. |
| (static) hasClosed( ) |
|---|
|
Deprecated: This method is deprecated and will be removed. |
| (static) hasMoved( position ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This method is deprecated and will be removed. Parameters
|
| (static) initQml( properties ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This method is deprecated and will be removed. Parameters
|
|
(static) isVisible( ) → {boolean}
Returns: code>true if the window is shown, false if it is hidden.
|
|---|
|
Gets whether the window is shown or hidden. |
| (static) qmlToScript( message ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This method is deprecated and will be removed. Parameters
|
| (static) raise( ) |
|---|
|
Raises the window to the top. |
| (static) sendToQML( message ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This method is deprecated and will be removed. Parameters
|
| (static) setPosition( position ) | ||||||
|---|---|---|---|---|---|---|
|
Sets the position of the window, from a Vec2. Parameters
|
| (static) setPosition( x, y ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets the position of the window, from a pair of numbers. Parameters
|
| (static) setScriptURL( url ) | ||||||
|---|---|---|---|---|---|---|
|
Injects a script into the HTML page, replacing any currently injected script. Parameters
|
| (static) setSize( size ) | ||||||
|---|---|---|---|---|---|---|
|
Sets the size of the window interior, from a Vec2. Parameters
|
| (static) setSize( width, height ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets the size of the window interior, from a pair of numbers. Parameters
|
| (static) setTitle( title ) | ||||||
|---|---|---|---|---|---|---|
|
Sets the window title. Parameters
|
| (static) setURL( url ) | ||||||
|---|---|---|---|---|---|---|
|
Loads HTML into the window, replacing current window content. Parameters
|
| (static) setVisible( visible ) | ||||||
|---|---|---|---|---|---|---|
|
Shows or hides the window. Parameters
|
Signal Details
|
closed(
)
Returns: Signal |
|---|
|
Triggered when the window is closed. |
|
fromQML(
message
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Deprecated: This signal is deprecated and will be removed. Parameters
|
|
moved(
position
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Triggered when the window changes position. Parameters
|
|
positionChanged(
)
Returns: Signal |
|---|
|
Triggered when the window changes position. |
|
resized(
size
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Triggered when the window changes size. Parameters
|
|
scriptEventReceived(
message
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Deprecated: This signal is deprecated and will be removed. Parameters
|
|
sizeChanged(
)
Returns: Signal |
|---|
|
Triggered when the window changes size. |
|
urlChanged(
)
Returns: Signal |
|---|
|
Triggered when the window's URL changes. |
|
visibleChanged(
)
Returns: Signal |
|---|
|
Triggered when the window is hidden or shown. |
|
webEventReceived(
message
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Triggered when a message from the HTML page is received. The HTML page can send a message by calling:
Parameters
|