Page tree
Skip to end of metadata
Go to start of metadata

The display.isOpen() function returns a boolean value based on whether the display file has previously been opened. The display file can be opened explicitly with the method or implicitly by the system, which happens when a rich display file is declared without the userOpen configuration property set to true.

Return Value

true (boolean): The display file was opened with and has not been closed with display.close(), or the display file was opened implicitly by the system. 

false (boolean): The display file has not yet been opened or was closed after being opened.  


pjs.defineDisplay("display", "screen.json", { userOpen: true });

// display.isOpen() evaluates to false below because the display
// file has not yet been opened
if (!display.isOpen()) {;

// Code to operate on the display file can go here

// display.isOpen() evaluates to true because the display was 
// previously opened
if (display.isOpen()){
// display.isOpen() will evaluate to false here because the display file
// is now closed


RPG Equivalent