Browser::active
Client-Side Function
JavaScript |
---|
JavaScript Syntax
Change or get browser active state. Active state is true by default when creating a browser, setting a browser's active property to false will hide it, and true will show it.
Params
- enable: boolean
Return value
- boolean
Syntax
browser.active; //getter
browser.active = value; //setter
Example
const mybrowser = mp.browsers.new('http://package/page/index.html');
mp.events.add('client::browser:changeState', (state) => {
mybrowser.active = state;
mp.console.logInfo(`You have ${state ? "enabled" : "disabled"} browser id ${mybrowser.id}`)
})
See also
- Functions:
- Properies: