diff --git a/docs/api.html b/docs/api.html index 64f5e94..4663487 100644 --- a/docs/api.html +++ b/docs/api.html @@ -156,6 +156,6 @@ -

JSDE API Reference

Table of contents

JsdeWindow

Member variables

JsdeWindow.id
Holds the unique ID of the window.
JsdeWindow.x
Holds the current X position of the window.
JsdeWindow.y
Holds the current Y position of the window.
JsdeWindow.z
Holds the current Z-index of the window.
JsdeWindow.width
Holds the current width of the window.
JsdeWindow.height
Holds the current height of the window.
JsdeWindow._inner
Important: Do not use this to set the window contents, use JsdeWindow.SetContents() instead!
Holds a reference to the DOM element containing the window contents.

Member functions

JsdeWindow.SetPosition(x, y)
Sets the current position of a window.
x
The X coordinate.
y
The Y coordinate.
Example: Setting the window position
Code:
win.SetPosition(100, 110);
JsdeWindow.SetSize(width, height)
Sets the current size of a window.
width
The new width.
height
The new height.
Example: Setting the window size
Code:
win.SetSize(400, 350);
JsdeWindow.GetTitle()
Returns the current title of the window.
Example: Retrieving the window title
Code:
console.log(win.GetTitle());
Output:
"Example window title"
JsdeWindow.SetTitle(title)
Sets the current title of the window.
title
The title to set.
Example: Setting the window title
Code:
win.SetTitle("Fancy new window title");
JsdeWindow.GetContents()
Returns the current contents of the window.
Example: Retrieving the window contents
Code:
console.log(win.GetContents());
Output:
"These are some example contents that could hypothetically be in a <strong>JSDE window</strong>."
JsdeWindow.SetContents(contents)
Sets the contents of the window.
contents
The new window contents.
Example: Setting the window contents
Code:
win.SetContents("These are <em>new</em> hypothetical contents for a window.");
+

JSDE API Reference

Table of contents

JsdeWindow

Member variables

JsdeWindow.id
Holds the unique ID of the window.
JsdeWindow.x
Holds the current X position of the window.
JsdeWindow.y
Holds the current Y position of the window.
JsdeWindow.z
Holds the current Z-index of the window.
JsdeWindow.width
Holds the current width of the window.
JsdeWindow.height
Holds the current height of the window.
JsdeWindow._inner
Important: Do not use this to set the window contents, use JsdeWindow.SetContents() instead!
Holds a reference to the DOM element containing the window contents.

Member functions

JsdeWindow.SetPosition(x, y)
Sets the current position of a window.
x
The X coordinate.
y
The Y coordinate.
Example: Setting the window position
Code:
win.SetPosition(100, 110);
JsdeWindow.GetPosition()
Retrieves the current position of a window.
Returns an object with an x and a y key.
JsdeWindow.SetSize(width, height)
Sets the current size of a window.
width
The new width.
height
The new height.
Example: Setting the window size
Code:
win.SetSize(400, 350);
JsdeWindow.GetTitle()
Returns the current title of the window.
Example: Retrieving the window title
Code:
console.log(win.GetTitle());
Output:
"Example window title"
JsdeWindow.SetTitle(title)
Sets the current title of the window.
title
The title to set.
Example: Setting the window title
Code:
win.SetTitle("Fancy new window title");
JsdeWindow.GetContents()
Returns the current contents of the window.
Example: Retrieving the window contents
Code:
console.log(win.GetContents());
Output:
"These are some example contents that could hypothetically be in a <strong>JSDE window</strong>."
JsdeWindow.SetContents(contents)
Sets the contents of the window.
contents
The new window contents.
Example: Setting the window contents
Code:
win.SetContents("These are <em>new</em> hypothetical contents for a window.");
diff --git a/docs/api.zpy b/docs/api.zpy index c7cdae5..b415ff1 100644 --- a/docs/api.zpy +++ b/docs/api.zpy @@ -52,6 +52,12 @@ $ win.SetPosition(100, 110); +^ JsdeWindow.GetPosition() + + Retrieves the current position of a window. + + Returns an object with an `x` and a `y` key. + ^ JsdeWindow.SetSize(**width**, **height**) Sets the current size of a window.