Browser::orderId: Difference between revisions
(Created page with "{{ClientsideJsFunction}} {{JSContainer| This property controls the browser's `orderId`, which acts like a z-index for determining the rendering order of browser instances. Higher `orderId` values display in front of those with lower values. Useful for managing overlapping UIs. ==Syntax== <syntaxhighlight lang="javascript"> browser.orderId = value; // Sets the orderId let value = browser.orderId; // Gets the current orderId </syntaxhighlight> === Required Arguments ===...") |
No edit summary |
||
| Line 27: | Line 27: | ||
}} | }} | ||
==See also== | ==See also== | ||
{{ | {{Browser_definition_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Latest revision as of 21:59, 2 November 2024
Client-Side Function
JavaScript Syntax
This property controls the browser's `orderId`, which acts like a z-index for determining the rendering order of browser instances. Higher `orderId` values display in front of those with lower values. Useful for managing overlapping UIs.
Syntax
browser.orderId = value; // Sets the orderId
let value = browser.orderId; // Gets the current orderId
Required Arguments
- value: Integer - Specifies the orderId level.
Return value
- Undefined (when setting); Integer (when getting)
Example
// Create two browsers with different z-ordering
const browser1 = mp.browsers.new("package://ui/index.html");
browser1.orderId = 1; // Set lower orderId
const browser2 = mp.browsers.new("package://ui/overlay.html");
browser2.orderId = 10; // Set higher orderId to display in front
See also
- Functions:
- Properies: