Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some smaller changes, mostly layout.
- Loading branch information
Showing
4 changed files
with
58 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
Window Event: domready | ||
======================== | ||
## Window Event: domready | ||
|
||
Contains the window [Event][] 'domready', which executes when the DOM is loaded. | ||
|
||
To ensure that DOM elements exist when the code attempts to access them is executed, they need to be placed within the 'domready' event. | ||
|
||
### Note: | ||
|
||
This event is only available to the window element. | ||
|
||
### Example: | ||
#### Example: | ||
|
||
window.addEvent('domready', function() { | ||
alert('The DOM is ready!'); | ||
}); | ||
|
||
#### Note: | ||
|
||
This event is only available to the window element. | ||
|
||
### See Also: | ||
[Element.Event][] | ||
[Element.Event][Event] | ||
|
||
[Event]: /core/Element/Element.Event | ||
[Element.Event]: /core/Element/Element.Event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,56 @@ | ||
Object: JSON {#JSON} | ||
==================== | ||
## Object: JSON {#JSON} | ||
|
||
JSON decoder and encoder. | ||
|
||
### See Also: | ||
|
||
- [JSON (JavaScript Object Notation)][] | ||
|
||
JSON Method: encode {#JSON:encode} | ||
---------------------------------- | ||
### JSON Method: encode {#JSON:encode} | ||
|
||
Converts an object or array to a JSON string. | ||
|
||
### Syntax: | ||
#### Syntax: | ||
|
||
var myJSON = JSON.encode(obj); | ||
|
||
### Arguments: | ||
#### Arguments: | ||
|
||
1. obj - (*object*) The object to convert to string. | ||
|
||
### Returns: | ||
#### Returns: | ||
|
||
* (*string*) A JSON string. | ||
|
||
### Examples: | ||
#### Examples: | ||
|
||
var fruitsJSON = JSON.encode({apple: 'red', lemon: 'yellow'}); // returns: '{"apple":"red","lemon":"yellow"}' | ||
|
||
|
||
|
||
JSON Method: decode {#JSON:decode} | ||
---------------------------------- | ||
### JSON Method: decode {#JSON:decode} | ||
|
||
Converts a JSON string into a JavaScript object. | ||
|
||
### Syntax: | ||
#### Syntax: | ||
|
||
var object = JSON.decode(string[, secure]); | ||
|
||
### Arguments: | ||
#### Arguments: | ||
|
||
1. string - (*string*) The string to evaluate. | ||
2. secure - (*boolean*, optional: defaults to false) If set to true, checks for any hazardous syntax and returns null if any found. | ||
|
||
### Returns: | ||
#### Returns: | ||
|
||
* (*object*) The object represented by the JSON string. | ||
|
||
### Examples: | ||
#### Examples: | ||
|
||
var myObject = JSON.decode('{"apple":"red","lemon":"yellow"}'); // returns: {apple: 'red', lemon: 'yellow'} | ||
|
||
### See Also: | ||
|
||
- [JSON (JavaScript Object Notation)][] | ||
|
||
### Credits: | ||
|
||
- JSON test regular expression by [Douglas Crockford][] and [Tobie Langel][]. | ||
|
||
[JSON (JavaScript Object Notation)]: http://www.json.org/ | ||
[Douglas Crockford]: http://crockford.com/ | ||
[JSON (JavaScript Object Notation)]: http://www.json.org/ | ||
[Tobie Langel]: http://tobielangel.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters