Browser::orderId
Client-Side Function
JavaScript |
---|
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: