GCWindowInitializer() constructor
About the constructor
Creates a constructor that creates a Graycrown child window instance.
GCWindowInitializer(url, width, height)
url
= the designated URL (mandatory, object type: string)
width
= the intended width (optional, object type: integer)
height
= the intended height (optional, object type: integer)
Example:
const window = new GCWindowInitializer('https://example.com', 1024, 600)
Functions
GCWindowInitializer().OpenWindow()
GCWindowInitializer().OpenWindow()
Opens the window alongside the intended URL.
Use case
const window = new GCWindowInitializer('https://example.com', 1024, 600)
// Onclick event firing here is just an example, you may replace with
// various other JavaScript on-based events.
button.onclick = () => {
window.OpenWindow()
}
GCWindowInitializer().ChangeURL(url)
(WIP, planned)
GCWindowInitializer().ChangeURL(url)
(WIP, planned)Changes the URL to another URL, then OpenWindow()
can be fired.
url
= Designated URL (mandatory)
Use case
const window = new GCWindowInitializer('https://example.com', 1024, 600)
// Onclick event firing here is just an example, you may replace with
// various other JavaScript on-based events.
button.onclick = () => {
window.ChangeURL('https://example2.com');
// ChangeURL only changes the URL, it does not fire the
// OpenWindow() function by default. You have to call and fire
// the function again to reopen the window with a different URL
window.OpenWindow()
}
Last updated