You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
8.6 KiB
HTML

<!doctype html>
<html>
<head>
<style>
body {
background-color: #F5F5F5;
font-family: sans-serif;
margin-right: 40px;
}
h2, h3, h4, h5, h6, h7
{
margin-top: 16px;
margin-bottom: 4px;
}
.children { padding-left: 40px; }
.definition
{
font-weight: bold;
margin-bottom: 32px;
}
.example
{
padding: 5px 6px;
font-weight: bold;
font-size: 15px;
background-color: #E6E6E6;
margin-top: 11px;
}
.example > .children
{
padding-top: 11px;
padding-left: 10px;
}
.example > .children > h7
{
font-size: 13px;
}
h7
{
font-size: 14px;
font-weight: bold;
margin-bottom: 2px;
}
pre
{
margin-top: 0px;
padding: 6px 7px;
background-color: #D9D9D9;
font-weight: normal;
font-size: 13px;
}
dl
{
margin: 5px 0px;
}
dt
{
font-weight: bold;
}
dd
{
font-size: 14px;
font-weight: normal;
margin-left: 8px;
}
dd > .children
{
font-size: 95%;
}
dd > .children > dl > dd
{
margin-left: 13px;
}
.exclamation
{
padding: 7px 8px;
margin: 11px 0px;
background-color: #FFE9AA;
border: 1px solid yellow;
font-size: 15px;
font-weight: normal;
}
.text
{
font-size: 15px;
font-weight: normal;
margin-bottom: 14px;
margin-top: 10px;
}
.toc
{
border: 1px solid gray;
background-color: #E6E6E6;
padding: 8px 9px;
font-size: 15px;
margin-bottom: 12px;
}
.toc h2
{
margin: 0px 0px 3px 0px;
font-size: 19px;
}
.toc ul
{
margin-top: 0px;
margin-bottom: 0px;
padding-left: 25px;
}
.toc li
{
margin-bottom: 2px;
}
.toc .alternatives
{
font-size: 12px;
}
.toc a
{
color: #292722;
}
.toc a:hover
{
color: black;
}
.fixed
{
font-family: monospace;
background-color: white;
padding: 1px 4px;
border: 1px solid silver;
border-radius: 4px;
}
</style>
</head>
<body>
<div class="children"><h1>JSDE API Reference</h1><div class="toc"><h2>Table of contents</h2><ul><li><a href="#_getWindow">$.getWindow()</a> Returns the JsdeWindow that the applicable element exists in. Useful to do... </li><li><a href="#JsdeWindow_id">JsdeWindow.id</a> Holds the unique ID of the window. </li><li><a href="#JsdeWindow_x">JsdeWindow.x</a> Holds the current X position of the window. </li><li><a href="#JsdeWindow_y">JsdeWindow.y</a> Holds the current Y position of the window. </li><li><a href="#JsdeWindow_z">JsdeWindow.z</a> Holds the current Z-index of the window. </li><li><a href="#JsdeWindow_width">JsdeWindow.width</a> Holds the current width of the window. </li><li><a href="#JsdeWindow_height">JsdeWindow.height</a> Holds the current height of the window. </li><li><a href="#JsdeWindow__inner">JsdeWindow._inner</a> Holds a reference to the DOM element containing the window contents. </li><li><a href="#JsdeWindow_SetPositionxy">JsdeWindow.SetPosition(x, y)</a> Sets the current position of a window. </li><li><a href="#JsdeWindow_GetPosition">JsdeWindow.GetPosition()</a> Retrieves the current position of a window. </li><li><a href="#JsdeWindow_SetSizewidthheight">JsdeWindow.SetSize(width, height)</a> Sets the current size of a window. </li><li><a href="#JsdeWindow_GetTitle">JsdeWindow.GetTitle()</a> Returns the current title of the window. </li><li><a href="#JsdeWindow_SetTitletitle">JsdeWindow.SetTitle(title)</a> Sets the current title of the window. </li><li><a href="#JsdeWindow_GetContents">JsdeWindow.GetContents()</a> Returns the current contents of the window. </li><li><a href="#JsdeWindow_SetContentscontents">JsdeWindow.SetContents(contents)</a> Sets the contents of the window. </li></ul></div><h2>jQuery extensions</h2><div class="definition"><a name="_getWindow">$.getWindow() <div class="children"><div class="text">Returns the JsdeWindow that the applicable element exists in. Useful to do things like dynamically updating windows from an AJAX response.</div></div></a></div><h2>JsdeWindow</h2><h3>Member variables</h3><div class="definition"><a name="JsdeWindow_id">JsdeWindow.id <div class="children"><div class="text">Holds the unique ID of the window.</div></div></a></div><div class="definition"><a name="JsdeWindow_x">JsdeWindow.x <div class="children"><div class="text">Holds the current X position of the window.</div></div></a></div><div class="definition"><a name="JsdeWindow_y">JsdeWindow.y <div class="children"><div class="text">Holds the current Y position of the window.</div></div></a></div><div class="definition"><a name="JsdeWindow_z">JsdeWindow.z <div class="children"><div class="text">Holds the current Z-index of the window.</div></div></a></div><div class="definition"><a name="JsdeWindow_width">JsdeWindow.width <div class="children"><div class="text">Holds the current width of the window.</div></div></a></div><div class="definition"><a name="JsdeWindow_height">JsdeWindow.height <div class="children"><div class="text">Holds the current height of the window.</div></div></a></div><div class="definition"><a name="JsdeWindow__inner">JsdeWindow._inner <div class="children"><div class="exclamation"><strong>Important:</strong> Do <strong>not</strong> use this to set the window contents, use JsdeWindow.SetContents() instead! <div class="children"></div></div><div class="text">Holds a reference to the DOM element containing the window contents.</div></div></a></div><h3>Member functions</h3><div class="definition"><a name="JsdeWindow_SetPositionxy">JsdeWindow.SetPosition(<em>x</em>, <em>y</em>) <div class="children"><div class="text">Sets the current position of a window.</div><dl><dt>x</dt><dd>The X coordinate.<div class="children"></div></dd></dl><dl><dt>y</dt><dd>The Y coordinate.<div class="children"></div></dd></dl><div class="example">Example: Setting the window position <div class="children"><h7>Code:</h7><pre class="code">win.SetPosition(100, 110);</pre></div></div></div></a></div><div class="definition"><a name="JsdeWindow_GetPosition">JsdeWindow.GetPosition() <div class="children"><div class="text">Retrieves the current position of a window.</div><div class="text">Returns an object with an <span class="fixed">x</span> and a <span class="fixed">y</span> key.</div></div></a></div><div class="definition"><a name="JsdeWindow_SetSizewidthheight">JsdeWindow.SetSize(<em>width</em>, <em>height</em>) <div class="children"><div class="text">Sets the current size of a window.</div><dl><dt>width</dt><dd>The new width.<div class="children"></div></dd></dl><dl><dt>height</dt><dd>The new height.<div class="children"></div></dd></dl><div class="example">Example: Setting the window size <div class="children"><h7>Code:</h7><pre class="code">win.SetSize(400, 350);</pre></div></div></div></a></div><div class="definition"><a name="JsdeWindow_GetTitle">JsdeWindow.GetTitle() <div class="children"><div class="text">Returns the current title of the window.</div><div class="example">Example: Retrieving the window title <div class="children"><h7>Code:</h7><pre class="code">console.log(win.GetTitle());</pre><h7>Output:</h7><pre class="output">"Example window title"</pre></div></div></div></a></div><div class="definition"><a name="JsdeWindow_SetTitletitle">JsdeWindow.SetTitle(<em>title</em>) <div class="children"><div class="text">Sets the current title of the window.</div><dl><dt>title</dt><dd>The title to set.<div class="children"></div></dd></dl><div class="example">Example: Setting the window title <div class="children"><h7>Code:</h7><pre class="code">win.SetTitle("Fancy new window title");</pre></div></div></div></a></div><div class="definition"><a name="JsdeWindow_GetContents">JsdeWindow.GetContents() <div class="children"><div class="text">Returns the current contents of the window.</div><div class="example">Example: Retrieving the window contents <div class="children"><h7>Code:</h7><pre class="code">console.log(win.GetContents());</pre><h7>Output:</h7><pre class="output">"These are some example contents that could hypothetically be in a &lt;strong&gt;JSDE window&lt;/strong&gt;."</pre></div></div></div></a></div><div class="definition"><a name="JsdeWindow_SetContentscontents">JsdeWindow.SetContents(<em>contents</em>) <div class="children"><div class="text">Sets the contents of the window.</div><dl><dt>contents</dt><dd>The new window contents.<div class="children"></div></dd></dl><div class="example">Example: Setting the window contents <div class="children"><h7>Code:</h7><pre class="code">win.SetContents("These are &lt;em&gt;new&lt;/em&gt; hypothetical contents for a window.");</pre></div></div></div></a></div></div>
</body>
</html>