Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add in docs generated with plovr

  • Loading branch information...
commit e3e62a4ae3cf3c74d115bad88071f67427fe9697 1 parent d684d42
Rhys Brett-Bowen authored
Showing with 1,670 additions and 0 deletions.
  1. +28 −0 docs/goog/Disposable.html
  2. +94 −0 docs/goog/History.html
  3. +13 −0 docs/goog/Timer.html
  4. +39 −0 docs/goog/Uri.html
  5. +16 −0 docs/goog/Uri/QueryData.html
  6. +55 −0 docs/goog/Uri/utils.html
  7. +129 −0 docs/goog/array.html
  8. +15 −0 docs/goog/asserts.html
  9. +1 −0  docs/goog/asserts/AssertionError.html
  10. +12 −0 docs/goog/debug.html
  11. +1 −0  docs/goog/debug/Error.html
  12. +2 −0  docs/goog/debug/LogBuffer.html
  13. +6 −0 docs/goog/debug/LogRecord.html
  14. +50 −0 docs/goog/debug/Logger.html
  15. +21 −0 docs/goog/debug/Logger/Level.html
  16. +12 −0 docs/goog/debug/entryPointRegistry.html
  17. +154 −0 docs/goog/dom.html
  18. +21 −0 docs/goog/dom/DomHelper.html
  19. +14 −0 docs/goog/dom/classes.html
  20. +26 −0 docs/goog/events.html
  21. +37 −0 docs/goog/events/BrowserEvent.html
  22. +26 −0 docs/goog/events/Event.html
  23. +9 −0 docs/goog/events/EventHandler.html
  24. +63 −0 docs/goog/events/EventTarget.html
  25. +1 −0  docs/goog/events/Listener.html
  26. +1 −0  docs/goog/history/Event.html
  27. +15 −0 docs/goog/history/Html5History.html
  28. +22 −0 docs/goog/iter.html
  29. +7 −0 docs/goog/iter/Iterator.html
  30. +7 −0 docs/goog/json.html
  31. +1 −0  docs/goog/json/Serializer.html
  32. +6 −0 docs/goog/math/Box.html
  33. +7 −0 docs/goog/math/Coordinate.html
  34. +13 −0 docs/goog/math/Rect.html
  35. +5 −0 docs/goog/math/Size.html
  36. +3 −0  docs/goog/net/DefaultXmlHttpFactory.html
  37. +3 −0  docs/goog/net/WrapperXmlHttpFactory.html
  38. +73 −0 docs/goog/net/XhrIo.html
  39. +2 −0  docs/goog/net/XhrIoPool.html
  40. +21 −0 docs/goog/net/XhrManager.html
  41. +21 −0 docs/goog/net/XhrManager/Event.html
  42. +22 −0 docs/goog/net/XhrManager/Request.html
  43. +2 −0  docs/goog/net/XmlHttpFactory.html
  44. +36 −0 docs/goog/object.html
  45. +6 −0 docs/goog/reflect.html
  46. +1 −0  docs/goog/storage/Storage.html
  47. +1 −0  docs/goog/storage/mechanism/HTML5LocalStorage.html
  48. +9 −0 docs/goog/storage/mechanism/HTML5WebStorage.html
  49. +8 −0 docs/goog/storage/mechanism/IterableMechanism.html
  50. +1 −0  docs/goog/storage/mechanism/Mechanism.html
  51. +102 −0 docs/goog/string.html
  52. +9 −0 docs/goog/structs.html
  53. +1 −0  docs/goog/structs/Heap.html
  54. +14 −0 docs/goog/structs/Map.html
  55. +2 −0  docs/goog/structs/Node.html
  56. +19 −0 docs/goog/structs/Pool.html
  57. +13 −0 docs/goog/structs/PriorityPool.html
  58. +1 −0  docs/goog/structs/PriorityQueue.html
  59. +1 −0  docs/goog/structs/Queue.html
  60. +20 −0 docs/goog/structs/Set.html
  61. +117 −0 docs/goog/style.html
  62. +126 −0 docs/goog/ui/Component.html
  63. +1 −0  docs/goog/ui/IdGenerator.html
  64. +13 −0 docs/goog/userAgent.html
  65. +1 −0  docs/index.html
  66. +6 −0 docs/mvc/AjaxSync.html
  67. +6 −0 docs/mvc/Collection.html
  68. +5 −0 docs/mvc/Control.html
  69. +1 −0  docs/mvc/LocalSync.html
  70. +5 −0 docs/mvc/Mediator.html
  71. +20 −0 docs/mvc/Model.html
  72. +2 −0  docs/mvc/Router.html
  73. +2 −0  docs/mvc/Store.html
  74. +45 −0 docs/stylesheet.css
28 docs/goog/Disposable.html
View
@@ -0,0 +1,28 @@
+<!doctype html><html><head><title>goog.Disposable</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class goog.Disposable</h1><p>Class that provides the basic implementation for disposable objects. If your
+class holds one or more references to COM objects, DOM nodes, or other
+disposable objects, it should extend this class or implement the disposable
+interface (defined in goog.disposable.IDisposable).</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dispose()</code><br><p class="method-description">Disposes of the object. If the object hasn't already been disposed of, calls
+{@link #disposeInternal}. Classes that extend {@code goog.Disposable} should
+override {@link #disposeInternal} in order to delete references to COM
+objects, DOM nodes, and other disposable objects. Reentrant.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Deletes or nulls out any references to COM objects, DOM nodes, or other
+disposable objects. Classes that extend {@code goog.Disposable} should
+override this method.
+Not reentrant. To avoid calling it twice, it must only be called from the
+subclass' {@code disposeInternal} method. Everywhere else the public
+{@code dispose} method must be used.
+For example:
+<pre>
+mypackage.MyClass = function() {
+goog.base(this);
+// Constructor logic specific to MyClass.
+...
+};
+goog.inherits(mypackage.MyClass, goog.Disposable);
+
+mypackage.MyClass.prototype.disposeInternal = function() {
+goog.base(this, 'disposeInternal');
+// Dispose logic specific to MyClass.
+...
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isDisposed() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>registerDisposable(?goog.disposable.IDisposable disposable)</code><br><p class="method-description">Associates a disposable object with this object so that they will be disposed
+together.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clearUndisposedObjects()</code><br><p class="method-description">Clears the registry of undisposed objects but doesn't dispose of them.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getUndisposedObjects() &#8658; !Array</code><br></td></tr></table></body></html>
94 docs/goog/History.html
View
@@ -0,0 +1,94 @@
+<!doctype html><html><head><title>goog.History</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class goog.History</h1><p>A history management object. Can be instantiated in user-visible mode (uses
+the address fragment to manage state) or in hidden mode. This object should
+be created from a script in the document body before the document has
+finished loading.
+
+To store the hidden states in browsers other than IE, a hidden iframe is
+used. It must point to a valid html page on the same domain (which can and
+probably should be blank.)
+
+Sample instantiation and usage:
+
+<pre>
+// Instantiate history to use the address bar for state.
+var h = new goog.History();
+goog.events.listen(h, goog.history.EventType.NAVIGATE, navCallback);
+h.setEnabled(true);
+
+// Any changes to the location hash will call the following function.
+function navCallback(e) {
+alert('Navigated to state "' + e.token + '"');
+}
+
+// The history token can also be set from code directly.
+h.setToken('foo');
+</pre></p>extends <a href="../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>check_(boolean isNavigation)</code><br><p class="method-description">Checks the state of the document fragment and the iframe title to detect
+navigation changes. If {@code goog.History.HAS_ONHASHCHANGE} is
+{@code false}, then this runs approximately twenty times per second.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Unattach listeners from this object. Classes that extend EventTarget may
+need to override this method in order to remove references to DOM Elements
+and additional listeners, it should be something like this:
+<pre>
+MyClass.prototype.disposeInternal = function() {
+MyClass.superClass_.disposeInternal.call(this);
+// Dispose logic for MyClass
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getIframeToken_() &#8658; ?string</code><br><p class="method-description">Return the current state string from the hidden iframe. On internet explorer,
+this is stored as a string in the document body. Other browsers use the
+location hash of the hidden iframe.
+
+Older versions of webkit cannot access the iframe location, so always return
+null in that case.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getLocationFragment_(?Window win) &#8658; string</code><br><p class="method-description">Gets the location fragment for the current URL. We don't use location.hash
+directly as the browser helpfully urlDecodes the string for us which can
+corrupt the tokens. For example, if we want to store: label/%2Froot it would
+be returned as label//root.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getToken() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>onDocumentLoaded()</code><br><p class="method-description">Callback for the window onload event in IE. This is necessary to read the
+value of the hidden input after restoring a history session. The value of
+input elements is not viewable until after window onload for some reason (the
+iframe state is similarly unavailable during the loading phase.) If
+setEnabled is called before the iframe has completed loading, the history
+object will actually be enabled at this point.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onHashChange_(?goog.events.BrowserEvent e)</code><br><p class="method-description">Handles HTML5 onhashchange events on browsers where it is supported.
+This is very similar to {@link #check_}, except that it is not executed
+continuously. It is only used when {@code goog.History.HAS_ONHASHCHANGE} is
+true.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onShow_(?goog.events.BrowserEvent e)</code><br><p class="method-description">Handler for the Gecko pageshow event. Restarts the history object so that the
+correct state can be restored in the hash or iframe.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>operaDefibrillator_()</code><br><p class="method-description">Opera cancels all outstanding timeouts and intervals after any rapid
+succession of navigation events, including the interval used to detect
+navigation events. This function restarts the interval so that navigation can
+continue. Ideally, only events which would be likely to cause a navigation
+change (mousedown and keydown) would be bound to this function. Since Opera
+seems to ignore keydown events while the alt key is pressed (such as
+alt-left or right arrow), this function is also bound to the much more
+frequent mousemove event. This way, when the update loop freezes, it will
+unstick itself as the user wiggles the mouse in frustration.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>replaceToken(string token, string= opt_title)</code><br><p class="method-description">Replaces the current history state without affecting the rest of the history
+stack.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setEnabled(boolean enable)</code><br><p class="method-description">Starts or stops the History polling loop. When enabled, the History object
+will immediately fire an event for the current location. The caller can set
+up event listeners between the call to the constructor and the call to
+setEnabled.
+
+On IE, actual startup may be delayed until the iframe and hidden input
+element have been loaded and can be polled. This behavior is transparent to
+the caller.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>setHash_(string token, boolean= opt_replace)</code><br><p class="method-description">Sets or replaces the URL fragment. The token does not need to be URL encoded
+according to the URL specification, though certain characters (like newline)
+are automatically stripped.
+
+If opt_replace is not set, non-IE browsers will append a new entry to the
+history list. Setting the hash does not affect the history stack in IE
+(unless there is a pre-existing named anchor for that hash.)
+
+Older versions of Webkit cannot query the location hash, but it still can be
+set. If we detect one of these versions, always replace instead of creating
+new history entries.
+
+window.location.replace replaces the current state from the history stack.
+http://www.whatwg.org/specs/web-apps/current-work/#dom-location-replace
+http://www.whatwg.org/specs/web-apps/current-work/#replacement-enabled</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>setHistoryState_(string token, boolean replace, string= opt_title)</code><br><p class="method-description">Sets the history state. When user visible states are used, the URL fragment
+will be set to the provided token. Setting opt_replace to true will cause the
+navigation to occur, but will replace the current history entry without
+affecting the length of the stack.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>setIframeToken_(string token, boolean= opt_replace, string= opt_title)</code><br><p class="method-description">Sets the hidden iframe state. On IE, this is accomplished by writing a new
+document into the iframe. In Firefox, the iframe's URL fragment stores the
+state instead.
+
+Older versions of webkit cannot set the iframe, so ignore those browsers.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>setLongerPolling_(boolean longerPolling)</code><br><p class="method-description">Sets if the history oject should use longer intervals when polling.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setToken(string token, string= opt_title)</code><br><p class="method-description">Sets the history state. When user visible states are used, the URL fragment
+will be set to the provided token. Sometimes it is necessary to set the
+history token before the document title has changed, in this case IE's
+history drop down can be out of sync with the token. To get around this
+problem, the app can pass in a title to use with the hidden iframe.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>update_(string token, boolean isNavigation)</code><br><p class="method-description">Updates the current history state with a given token. Called after a change
+to the location or the iframe state is detected by poll_.</p></td></tr></table></body></html>
13 docs/goog/Timer.html
View
@@ -0,0 +1,13 @@
+<!doctype html><html><head><title>goog.Timer</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class goog.Timer</h1><p>Class for handling timing events.</p>extends <a href="../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dispatchTick()</code><br><p class="method-description">Dispatches the TICK event. This is its own method so subclasses can override.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Unattach listeners from this object. Classes that extend EventTarget may
+need to override this method in order to remove references to DOM Elements
+and additional listeners, it should be something like this:
+<pre>
+MyClass.prototype.disposeInternal = function() {
+MyClass.superClass_.disposeInternal.call(this);
+// Dispose logic for MyClass
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getInterval() &#8658; number</code><br><p class="method-description">Gets the interval of the timer.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setInterval(number interval)</code><br><p class="method-description">Sets the interval of the timer.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>start()</code><br><p class="method-description">Starts the timer.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>stop()</code><br><p class="method-description">Stops the timer.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>tick_()</code><br><p class="method-description">Callback for the setTimeout used by the timer</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>callOnce(?Function listener, number= opt_delay, ?Object= opt_handler) &#8658; number</code><br><p class="method-description">Calls the given function once, after the optional pause.
+
+The function is always called asynchronously, even if the delay is 0. This
+is a common trick to schedule a function to run after a batch of browser
+event processing.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clear(?number timerId)</code><br><p class="method-description">Clears a timeout initiated by callOnce</p></td></tr></table></body></html>
39 docs/goog/Uri.html
View
@@ -0,0 +1,39 @@
+<!doctype html><html><head><title>goog.Uri</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class goog.Uri</h1><p>This class contains setters and getters for the parts of the URI.
+The <code>getXyz</code>/<code>setXyz</code> methods return the decoded part
+-- so<code>goog.Uri.parse('/foo%20bar').getPath()</code> will return the
+decoded path, <code>/foo bar</code>.
+
+The constructor accepts an optional unparsed, raw URI string. The parser
+is relaxed, so special characters that aren't escaped but don't cause
+ambiguities will not cause parse failures.
+
+All setters return <code>this</code> and so may be chained, a la
+<code>goog.Uri.parse('/foo').setFragment('part').toString()</code>.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone() &#8658; !goog.Uri</code><br><p class="method-description">Clones the URI instance.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>enforceReadOnly()</code><br><p class="method-description">Checks if this Uri has been marked as read only, and if so, throws an error.
+This should be called whenever any modifying function is called.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDecodedQuery() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDomain() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getEncodedQuery() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFragment() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getIgnoreCase() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParameterValue(string paramName) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Returns the first value for a given cgi parameter or undefined if the given
+parameter name does not appear in the query string.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParameterValues(string name) &#8658; ?Array</code><br><p class="method-description">Returns the value<b>s</b> for a given cgi parameter as a list of decoded
+query parameter values.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPath() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPort() &#8658; ?number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getQuery() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getQueryData() &#8658; ?goog.Uri.QueryData</code><br><p class="method-description">Returns the query data.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getScheme() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getUserInfo() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasDomain() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasFragment() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasPath() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasPort() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasQuery() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasSameDomainAs(?goog.Uri uri2) &#8658; boolean</code><br><p class="method-description">Returns true if this has the same domain as that of uri2.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasScheme() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasUserInfo() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isReadOnly() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>makeUnique() &#8658; !goog.Uri</code><br><p class="method-description">Adds a random parameter to the Uri.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeParameter(string key) &#8658; !goog.Uri</code><br><p class="method-description">Removes the named query parameter.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>resolve(?goog.Uri relativeUri) &#8658; !goog.Uri</code><br><p class="method-description">Resolves a relative url string to a this base uri.
+
+There are several kinds of relative urls:<br>
+1. foo - replaces the last part of the path, the whole query and fragment<br>
+2. /foo - replaces the the path, the query and fragment<br>
+3. //foo - replaces everything from the domain on. foo is a domain name<br>
+4. ?foo - replace the query and fragment<br>
+5. #foo - replace the fragment only
+
+Additionally, if relative url has a non-empty path, all ".." and "."
+segments will be resolved, as described in RFC 3986.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setDomain(string newDomain, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the domain.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setFragment(string newFragment, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the URI fragment.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setIgnoreCase(boolean ignoreCase) &#8658; !goog.Uri</code><br><p class="method-description">Sets whether to ignore case.
+NOTE: If there are already key/value pairs in the QueryData, and
+ignoreCase_ is set to false, the keys will all be lower-cased.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setParameterValue(string key, &lt;Any Type&gt; value) &#8658; !goog.Uri</code><br><p class="method-description">Sets the value of the named query parameters, clearing previous values for
+that key.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setParameterValues(string key, &lt;Any Type&gt; values) &#8658; !goog.Uri</code><br><p class="method-description">Sets the values of the named query parameters, clearing previous values for
+that key. Not new values will currently be moved to the end of the query
+string.
+
+So, <code>goog.Uri.parse('foo?a=b&c=d&e=f').setParameterValues('c', ['new'])
+</code> yields <tt>foo?a=b&e=f&c=new</tt>.</p></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setPath(string newPath, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the path.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setPort(&lt;Any Type&gt; newPort) &#8658; !goog.Uri</code><br><p class="method-description">Sets the port number.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setQuery(string newQuery, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the URI query.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setQueryData((goog.Uri.QueryData|null|string|undefined) queryData, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the query data.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setReadOnly(boolean isReadOnly) &#8658; !goog.Uri</code><br><p class="method-description">Sets whether Uri is read only. If this goog.Uri is read-only,
+enforceReadOnly_ will be called at the start of any function that may modify
+this Uri.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setScheme(string newScheme, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the scheme/protocol.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setUserInfo(string newUserInfo, boolean= opt_decode) &#8658; !goog.Uri</code><br><p class="method-description">Sets the userInfo.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>create(?string= opt_scheme, ?string= opt_userInfo, ?string= opt_domain, ?number= opt_port, ?string= opt_path, (goog.Uri.QueryData|null|string=) opt_query, ?string= opt_fragment, boolean= opt_ignoreCase) &#8658; !goog.Uri</code><br><p class="method-description">Creates a new goog.Uri object from unencoded parts.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>decodeOrEmpty_((string|undefined) val) &#8658; string</code><br><p class="method-description">Decodes a value or returns the empty string if it isn't defined or empty.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>encodeChar_(string ch) &#8658; string</code><br><p class="method-description">Converts a character in [\01-\177] to its unicode character equivalent.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>encodeSpecialChars_(&lt;Any Type&gt; unescapedPart, ?RegExp extra) &#8658; ?string</code><br><p class="method-description">If unescapedPart is non null, then escapes any characters in it that aren't
+valid characters in a url and also escapes any special characters that
+appear in extra.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>encodeString_(&lt;Any Type&gt; unescapedPart) &#8658; ?string</code><br><p class="method-description">URI encode a string, or return null if it's not a string.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>haveSameDomain(string uri1String, string uri2String) &#8658; boolean</code><br><p class="method-description">Checks whether two URIs have the same domain.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>parse(&lt;Any Type&gt; uri, boolean= opt_ignoreCase) &#8658; !goog.Uri</code><br><p class="method-description">Creates a uri from the string form. Basically an alias of new goog.Uri().
+If a Uri object is passed to parse then it will return a clone of the object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeDotSegments(string path) &#8658; string</code><br><p class="method-description">Removes dot segments in given path component, as described in
+RFC 3986, section 5.2.4.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>resolve(&lt;Any Type&gt; base, &lt;Any Type&gt; rel) &#8658; !goog.Uri</code><br><p class="method-description">Resolves a relative Uri against a base Uri, accepting both strings and
+Uri objects.</p></td></tr></table></body></html>
16 docs/goog/Uri/QueryData.html
View
@@ -0,0 +1,16 @@
+<!doctype html><html><head><title>goog.Uri.QueryData</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.Uri.QueryData</h1><p>Class used to represent URI query parameters. It is essentially a hash of
+name-value pairs, though a name can be present more than once.
+
+Has the same interface as the collections in goog.structs.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>add(string key, &lt;Any Type&gt; value) &#8658; !goog.Uri.QueryData</code><br><p class="method-description">Adds a key value pair.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clear()</code><br><p class="method-description">Clears the parameters.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone() &#8658; !goog.Uri.QueryData</code><br><p class="method-description">Clone the query data instance.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>containsKey(string key) &#8658; boolean</code><br><p class="method-description">Whether there is a parameter with the given name</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>containsValue(&lt;Any Type&gt; value) &#8658; boolean</code><br><p class="method-description">Whether there is a parameter with the given value.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>ensureKeyMapInitialized_()</code><br><p class="method-description">If the underlying key map is not yet initialized, it parses the
+query string and fills the map with parsed data.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>extend((Object|goog.Uri.QueryData|goog.structs.Map|null|undefined) var_args)</code><br><p class="method-description">Extends a query data object with another query data or map like object. This
+operates 'in-place', it does not create a new QueryData object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>filterKeys(?Array.&lt;string&gt; keys) &#8658; !goog.Uri.QueryData</code><br><p class="method-description">Removes all keys that are not in the provided list. (Modifies this object.)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>get(string key, &lt;Any Type&gt; opt_default) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Returns the first value associated with the key. If the query data has no
+such key this will return undefined or the optional default.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getCount() &#8658; ?number</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getKeyName_(&lt;Any Type&gt; arg) &#8658; string</code><br><p class="method-description">Helper function to get the key name from a JavaScript object. Converts
+the object to a string, and to lower case if necessary.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getKeys() &#8658; ?Array</code><br><p class="method-description">Returns all the keys of the parameters. If a key is used multiple times
+it will be included multiple times in the returned array</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getValues(string= opt_key) &#8658; ?Array</code><br><p class="method-description">Returns all the values of the parameters with the given name. If the query
+data has no such key this will return an empty array. If no key is given
+all values wil be returned.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>invalidateCache_()</code><br><p class="method-description">Invalidate the cache.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isEmpty() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove(string key) &#8658; boolean</code><br><p class="method-description">Removes all the params with the given key.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>set(string key, &lt;Any Type&gt; value) &#8658; !goog.Uri.QueryData</code><br><p class="method-description">Sets a key value pair and removes all other keys with the same value.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setIgnoreCase(boolean ignoreCase)</code><br><p class="method-description">Ignore case in parameter names.
+NOTE: If there are already key/value pairs in the QueryData, and
+ignoreCase_ is set to false, the keys will all be lower-cased.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setValues(string key, ?Array values)</code><br><p class="method-description">Sets the values for a key, if the key has already got values defined, this
+will override the existing values then remove any left over</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toDecodedString() &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createFromKeysValues(?Array.&lt;string&gt; keys, ?Array values, ?goog.Uri= opt_uri, boolean= opt_ignoreCase) &#8658; !goog.Uri.QueryData</code><br><p class="method-description">Creates a new query data instance from parallel arrays of parameter names
+and values. Allows for duplicate parameter names. Throws an error if the
+lengths of the arrays differ.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createFromMap((Object|goog.structs.Map) map, ?goog.Uri= opt_uri, boolean= opt_ignoreCase) &#8658; !goog.Uri.QueryData</code><br><p class="method-description">Creates a new query data instance from a map of names and values.</p></td></tr></table></body></html>
55 docs/goog/Uri/utils.html
View
@@ -0,0 +1,55 @@
+<!doctype html><html><head><title>goog.uri.utils</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Library goog.uri.utils</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>appendKeyValuePairs_(string key, ?goog.uri.utils.QueryValue value, !Array pairs)</code><br><p class="method-description">Appends key=value pairs to an array, supporting multi-valued objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>appendParam(string uri, string key, &lt;Any Type&gt; value) &#8658; string</code><br><p class="method-description">Appends a single URI parameter.
+
+Repeated calls to this can exhibit quadratic behavior in IE6 due to the
+way string append works, though it should be limited given the 2kb limit.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>appendParams(string uri, (goog.uri.utils.QueryArray|goog.uri.utils.QueryValue|null|string|undefined) var_args) &#8658; string</code><br><p class="method-description">Appends URI parameters to an existing URI.
+
+The variable arguments may contain alternating keys and values. Keys are
+assumed to be already URI encoded. The values should not be URI-encoded,
+and will instead be encoded by this function.
+<pre>
+appendParams('http://www.foo.com?existing=true',
+'key1', 'value1',
+'key2', 'value?willBeEncoded',
+'key3', ['valueA', 'valueB', 'valueC'],
+'key4', null);
+result: 'http://www.foo.com?existing=true&' +
+'key1=value1&' +
+'key2=value%3FwillBeEncoded&' +
+'key3=valueA&key3=valueB&key3=valueC'
+</pre>
+
+A single call to this function will not exhibit quadratic behavior in IE,
+whereas multiple repeated calls may, although the effect is limited by
+fact that URL's generally can't exceed 2kb.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>appendParamsFromMap(string uri, ?Object map) &#8658; string</code><br><p class="method-description">Appends query parameters from a map.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>appendPath(string baseUri, string path) &#8658; string</code><br><p class="method-description">Generates a URI path using a given URI and a path with checks to
+prevent consecutive "//". The baseUri passed in must not contain
+query or fragment identifiers. The path to append may not contain query or
+fragment identifiers.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>appendQueryData_(!Array buffer) &#8658; string</code><br><p class="method-description">Appends a URI and query data in a string buffer with special preconditions.
+
+Internal implementation utility, performing very few object allocations.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>assertNoFragmentsOrQueries_(string uri)</code><br><p class="method-description">Asserts that there are no fragment or query identifiers, only in uncompiled
+mode.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>buildFromEncodedParts(?string= opt_scheme, ?string= opt_userInfo, ?string= opt_domain, (null|number|string=) opt_port, ?string= opt_path, ?string= opt_queryData, ?string= opt_fragment) &#8658; string</code><br><p class="method-description">Builds a URI string from already-encoded parts.
+
+No encoding is performed. Any component may be omitted as either null or
+undefined.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>buildQueryData(?goog.uri.utils.QueryArray keysAndValues, number= opt_startIndex) &#8658; string</code><br><p class="method-description">Builds a query data string from a sequence of alternating keys and values.
+Currently generates "&key&" for empty args.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>buildQueryDataBufferFromMap_(!Array buffer, ?Object map) &#8658; !Array</code><br><p class="method-description">Builds a buffer of query data from a map.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>buildQueryDataBuffer_(!Array buffer, (Arguments|goog.uri.utils.QueryArray|null) keysAndValues, number= opt_startIndex) &#8658; !Array</code><br><p class="method-description">Builds a buffer of query data from a sequence of alternating keys and values.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>buildQueryDataFromMap(?Object map) &#8658; string</code><br><p class="method-description">Builds a query data string from a map.
+Currently generates "&key&" for empty args.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>decodeIfPossible_(?string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>findParam_(string uri, number startIndex, string keyEncoded, number hashOrEndIndex) &#8658; number</code><br><p class="method-description">Finds the next instance of a query parameter with the specified name.
+
+Does not instantiate any objects.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getComponentByIndex_(?goog.uri.utils.ComponentIndex componentIndex, string uri) &#8658; ?string</code><br><p class="method-description">Gets a URI component by index.
+
+It is preferred to use the getPathEncoded() variety of functions ahead,
+since they are more readable.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDomain(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDomainEncoded(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getEffectiveScheme(string uri) &#8658; string</code><br><p class="method-description">Gets the effective scheme for the URL. If the URL is relative then the
+scheme is derived from the page's location.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFragment(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFragmentEncoded(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getHost(string uri) &#8658; string</code><br><p class="method-description">Extracts everything up to the port of the URI.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParamValue(string uri, string keyEncoded) &#8658; ?string</code><br><p class="method-description">Gets the first value of a query parameter.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParamValues(string uri, string keyEncoded) &#8658; !Array</code><br><p class="method-description">Gets all values of a query parameter.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPath(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPathAndAfter(string uri) &#8658; string</code><br><p class="method-description">Extracts the path of the URL and everything after.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPathEncoded(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPort(string uri) &#8658; ?number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getQueryData(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getScheme(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getUserInfo(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getUserInfoEncoded(string uri) &#8658; ?string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasParam(string uri, string keyEncoded) &#8658; boolean</code><br><p class="method-description">Determines if the URI contains a specific key.
+
+Performs no object instantiations.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>haveSameDomain(string uri1, string uri2) &#8658; boolean</code><br><p class="method-description">Ensures that two URI's have the exact same domain, scheme, and port.
+
+Unlike the version in goog.Uri, this checks protocol, and therefore is
+suitable for checking against the browser's same-origin policy.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>makeUnique(string uri) &#8658; string</code><br><p class="method-description">Sets the zx parameter of a URI to a random value.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeFragment(string uri) &#8658; string</code><br><p class="method-description">Gets the URI with the fragment identifier removed.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeParam(string uri, string keyEncoded) &#8658; string</code><br><p class="method-description">Removes all instances of a query parameter.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setFragmentEncoded(string uri, ?string fragment) &#8658; string</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setParam(string uri, string keyEncoded, &lt;Any Type&gt; value) &#8658; string</code><br><p class="method-description">Replaces all existing definitions of a parameter with a single definition.
+
+Repeated calls to this can exhibit quadratic behavior due to the need to
+find existing instances and reconstruct the string, though it should be
+limited given the 2kb limit. Consider using appendParams to append multiple
+parameters in bulk.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>split(string uri) &#8658; !Array</code><br><p class="method-description">Splits a URI into its component parts.
+
+Each component can be accessed via the component indices; for example:
+<pre>
+goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];
+</pre></p></td></tr></table></body></html>
129 docs/goog/array.html
View
@@ -0,0 +1,129 @@
+<!doctype html><html><head><title>goog.array</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.array</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>binaryInsert(?Array array, &lt;Any Type&gt; value, ?Function= opt_compareFn) &#8658; boolean</code><br><p class="method-description">Inserts a value into a sorted array. The array is not modified if the
+value is already present.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>binaryRemove(?Array array, &lt;Any Type&gt; value, ?Function= opt_compareFn) &#8658; boolean</code><br><p class="method-description">Removes a value from a sorted array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>binarySearch(?goog.array.ArrayLike arr, &lt;Any Type&gt; target, ?Function= opt_compareFn) &#8658; number</code><br><p class="method-description">Searches the specified array for the specified target using the binary
+search algorithm. If no opt_compareFn is specified, elements are compared
+using <code>goog.array.defaultCompare</code>, which compares the elements
+using the built in < and > operators. This will produce the expected
+behavior for homogeneous arrays of String(s) and Number(s). The array
+specified <b>must</b> be sorted in ascending order (as defined by the
+comparison function). If the array is not sorted, results are undefined.
+If the array contains multiple instances of the specified target value, any
+of these instances may be found.
+
+Runtime: O(log n)</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>binarySearch_(?goog.array.ArrayLike arr, ?Function compareFn, boolean isEvaluator, &lt;Any Type&gt; opt_target, ?Object= opt_selfObj) &#8658; number</code><br><p class="method-description">Implementation of a binary search algorithm which knows how to use both
+comparison functions and evaluators. If an evaluator is provided, will call
+the evaluator with the given optional data object, conforming to the
+interface defined in binarySelect. Otherwise, if a comparison function is
+provided, will call the comparison function against the given data object.
+
+This implementation purposefully does not use goog.bind or goog.partial for
+performance reasons.
+
+Runtime: O(log n)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>binarySelect(?goog.array.ArrayLike arr, ?Function evaluator, ?Object= opt_obj) &#8658; number</code><br><p class="method-description">Selects an index in the specified array using the binary search algorithm.
+The evaluator receives an element and determines whether the desired index
+is before, at, or after it. The evaluator must be consistent (formally,
+goog.array.map(goog.array.map(arr, evaluator, opt_obj), goog.math.sign)
+must be monotonically non-increasing).
+
+Runtime: O(log n)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bucket(?Array array, ?Function sorter) &#8658; !Object</code><br><p class="method-description">Splits an array into disjoint buckets according to a splitting function.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clear(?goog.array.ArrayLike arr)</code><br><p class="method-description">Clears the array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone(?goog.array.ArrayLike arr) &#8658; !Array</code><br><p class="method-description">Does a shallow copy of an array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>compare(?goog.array.ArrayLike arr1, ?goog.array.ArrayLike arr2, ?Function= opt_equalsFn) &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>compare3(!goog.array.ArrayLike arr1, !goog.array.ArrayLike arr2, function (*, *): number= opt_compareFn) &#8658; number</code><br><p class="method-description">3-way array compare function.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>concat(&lt;Any Type&gt; var_args) &#8658; !Array</code><br><p class="method-description">Returns a new array that is the result of joining the arguments. If arrays
+are passed then their items are added, however, if non-arrays are passed they
+will be added to the return array as is.
+
+Note that ArrayLike objects will be added as is, rather than having their
+items added.
+
+goog.array.concat([1, 2], [3, 4]) -> [1, 2, 3, 4]
+goog.array.concat(0, [1, 2]) -> [0, 1, 2]
+goog.array.concat([1, 2], null) -> [1, 2, null]
+
+There is bug in all current versions of IE (6, 7 and 8) where arrays created
+in an iframe become corrupted soon (not immediately) after the iframe is
+destroyed. This is common if loading data via goog.net.IframeIo, for example.
+This corruption only affects the concat method which will start throwing
+Catastrophic Errors (#-2147418113).
+
+See http://endoflow.com/scratch/corrupted-arrays.html for a test case.
+
+Internally goog.array should use this, so that all methods will continue to
+work on these broken array objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>contains(?goog.array.ArrayLike arr, &lt;Any Type&gt; obj) &#8658; boolean</code><br><p class="method-description">Whether the array contains the given object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>defaultCompare(&lt;Any Type&gt; a, &lt;Any Type&gt; b) &#8658; number</code><br><p class="method-description">Compares its two arguments for order, using the built in < and >
+operators.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>defaultCompareEquality(&lt;Any Type&gt; a, &lt;Any Type&gt; b) &#8658; boolean</code><br><p class="method-description">Compares its two arguments for equality, using the built in === operator.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>equals(?goog.array.ArrayLike arr1, ?goog.array.ArrayLike arr2, ?Function= opt_equalsFn) &#8658; boolean</code><br><p class="method-description">Compares two arrays for equality. Two arrays are considered equal if they
+have the same length and their corresponding elements are equal according to
+the comparison function.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>extend(?Array arr1, &lt;Any Type&gt; var_args)</code><br><p class="method-description">Extends an array with another array, element, or "array like" object.
+This function operates 'in-place', it does not create a new Array.
+
+Example:
+var a = [];
+goog.array.extend(a, [0, 1]);
+a; // [0, 1]
+goog.array.extend(a, 2);
+a; // [0, 1, 2]</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>find(?goog.array.ArrayLike arr, ?Function f, ?Object= opt_obj) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Search an array for the first element that satisfies a given condition and
+return that element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>findIndex(?goog.array.ArrayLike arr, ?Function f, ?Object= opt_obj) &#8658; number</code><br><p class="method-description">Search an array for the first element that satisfies a given condition and
+return its index.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>findIndexRight(?goog.array.ArrayLike arr, ?Function f, ?Object= opt_obj) &#8658; number</code><br><p class="method-description">Search an array (in reverse order) for the last element that satisfies a
+given condition and return its index.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>findRight(?goog.array.ArrayLike arr, ?Function f, ?Object= opt_obj) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Search an array (in reverse order) for the last element that satisfies a
+given condition and return that element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>flatten(&lt;Any Type&gt; var_args) &#8658; !Array</code><br><p class="method-description">Returns an array consisting of every argument with all arrays
+expanded in-place recursively.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>forEachRight(?goog.array.ArrayLike arr, ?Function f, ?Object= opt_obj)</code><br><p class="method-description">Calls a function for each element in an array, starting from the last
+element rather than the first.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insert(?Array arr, &lt;Any Type&gt; obj)</code><br><p class="method-description">Pushes an item into an array, if it's not already in the array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insertArrayAt(?goog.array.ArrayLike arr, ?goog.array.ArrayLike elementsToAdd, number= opt_i)</code><br><p class="method-description">Inserts at the given index of the array, all elements of another array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insertAt(?goog.array.ArrayLike arr, &lt;Any Type&gt; obj, number= opt_i)</code><br><p class="method-description">Inserts an object at the given index of the array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insertBefore(?Array arr, &lt;Any Type&gt; obj, &lt;Any Type&gt; opt_obj2)</code><br><p class="method-description">Inserts an object into an array before a specified object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isEmpty(?goog.array.ArrayLike arr) &#8658; boolean</code><br><p class="method-description">Whether the array is empty.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isSorted(!Array arr, ?Function= opt_compareFn, boolean= opt_strict) &#8658; boolean</code><br><p class="method-description">Tells if the array is sorted.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>peek(?goog.array.ArrayLike array) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Returns the last element in an array without removing it.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>reduce(?goog.array.ArrayLike arr, ?Function f, &lt;Any Type&gt; val, ?Object= opt_obj) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Passes every element of an array into a function and accumulates the result.
+
+See {@link http://tinyurl.com/developer-mozilla-org-array-reduce}
+
+For example:
+var a = [1, 2, 3, 4];
+goog.array.reduce(a, function(r, v, i, arr) {return r + v;}, 0);
+returns 10</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>reduceRight(?goog.array.ArrayLike arr, ?Function f, &lt;Any Type&gt; val, ?Object= opt_obj) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Passes every element of an array into a function and accumulates the result,
+starting from the last element and working towards the first.
+
+See {@link http://tinyurl.com/developer-mozilla-org-array-reduceright}
+
+For example:
+var a = ['a', 'b', 'c'];
+goog.array.reduceRight(a, function(r, v, i, arr) {return r + v;}, '');
+returns 'cba'</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove(?goog.array.ArrayLike arr, &lt;Any Type&gt; obj) &#8658; boolean</code><br><p class="method-description">Removes the first occurrence of a particular value from an array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeAt(?goog.array.ArrayLike arr, number i) &#8658; boolean</code><br><p class="method-description">Removes from an array the element at index i</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeDuplicates(?goog.array.ArrayLike arr, ?Array= opt_rv)</code><br><p class="method-description">Removes all duplicates from an array (retaining only the first
+occurrence of each array element). This function modifies the
+array in place and doesn't change the order of the non-duplicate items.
+
+For objects, duplicates are identified as having the same unique ID as
+defined by {@link goog.getUid}.
+
+Runtime: N,
+Worstcase space: 2N (no dupes)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeIf(?goog.array.ArrayLike arr, ?Function f, ?Object= opt_obj) &#8658; boolean</code><br><p class="method-description">Removes the first value that satisfies the given condition.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>repeat(&lt;Any Type&gt; value, number n) &#8658; !Array</code><br><p class="method-description">Returns an array consisting of the given value repeated N times.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>rotate(!Array array, number n) &#8658; !Array</code><br><p class="method-description">Rotates an array in-place. After calling this method, the element at
+index i will be the element previously at index (i - n) %
+array.length, for all values of i between 0 and array.length - 1,
+inclusive.
+
+For example, suppose list comprises [t, a, n, k, s]. After invoking
+rotate(array, 1) (or rotate(array, -4)), array will comprise [s, t, a, n, k].</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>shuffle(!Array arr, ?Function= opt_randFn)</code><br><p class="method-description">Shuffles the values in the specified array using the Fisher-Yates in-place
+shuffle (also known as the Knuth Shuffle). By default, calls Math.random()
+and so resets the state of that random number generator. Similarly, may reset
+the state of the any other specified random number generator.
+
+Runtime: O(n)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>slice(?goog.array.ArrayLike arr, number start, number= opt_end) &#8658; !Array</code><br><p class="method-description">Returns a new array from a segment of an array. This is a generic version of
+Array slice. This means that it might work on other objects similar to
+arrays, such as the arguments object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>sort(?Array arr, ?Function= opt_compareFn)</code><br><p class="method-description">Sorts the specified array into ascending order. If no opt_compareFn is
+specified, elements are compared using
+<code>goog.array.defaultCompare</code>, which compares the elements using
+the built in < and > operators. This will produce the expected behavior
+for homogeneous arrays of String(s) and Number(s), unlike the native sort,
+but will give unpredictable results for heterogenous lists of strings and
+numbers with different numbers of digits.
+
+This sort is not guaranteed to be stable.
+
+Runtime: Same as <code>Array.prototype.sort</code></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>sortObjectsByKey(?Array.&lt;(Object|null)&gt; arr, string key, ?Function= opt_compareFn)</code><br><p class="method-description">Sorts an array of objects by the specified object key and compare
+function. If no compare function is provided, the key values are
+compared in ascending order using <code>goog.array.defaultCompare</code>.
+This won't work for keys that get renamed by the compiler. So use
+{'foo': 1, 'bar': 2} rather than {foo: 1, bar: 2}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>splice(?goog.array.ArrayLike arr, (number|undefined) index, number howMany, &lt;Any Type&gt; var_args) &#8658; !Array</code><br><p class="method-description">Adds or removes elements from an array. This is a generic version of Array
+splice. This means that it might work on other objects similar to arrays,
+such as the arguments object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>stableSort(?Array arr, function (*, *): number= opt_compareFn)</code><br><p class="method-description">Sorts the specified array into ascending order in a stable way. If no
+opt_compareFn is specified, elements are compared using
+<code>goog.array.defaultCompare</code>, which compares the elements using
+the built in < and > operators. This will produce the expected behavior
+for homogeneous arrays of String(s) and Number(s).
+
+Runtime: Same as <code>Array.prototype.sort</code>, plus an additional
+O(n) overhead of copying the array twice.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toArray(?goog.array.ArrayLike object) &#8658; !Array</code><br><p class="method-description">Converts an object to an array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>zip((goog.array.ArrayLike|undefined) var_args) &#8658; !Array</code><br><p class="method-description">Creates a new array for which the element at position i is an array of the
+ith element of the provided arrays. The returned array will only be as long
+as the shortest array provided; additional values are ignored. For example,
+the result of zipping [1, 2] and [3, 4, 5] is [[1,3], [2, 4]].
+
+This is similar to the zip() function in Python. See {@link
+http://docs.python.org/library/functions.html#zip}</p></td></tr></table></body></html>
15 docs/goog/asserts.html
View
@@ -0,0 +1,15 @@
+<!doctype html><html><head><title>goog.asserts</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.asserts</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assert(&lt;Any Type&gt; condition, string= opt_message, &lt;Any Type&gt; var_args) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Checks if the condition evaluates to true if goog.asserts.ENABLE_ASSERTS is
+true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertArray(&lt;Any Type&gt; value, string= opt_message, &lt;Any Type&gt; var_args) &#8658; !Array</code><br><p class="method-description">Checks if the value is an Array if goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertBoolean(&lt;Any Type&gt; value, string= opt_message, &lt;Any Type&gt; var_args) &#8658; boolean</code><br><p class="method-description">Checks if the value is a boolean if goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertFunction(&lt;Any Type&gt; value, string= opt_message, &lt;Any Type&gt; var_args) &#8658; !Function</code><br><p class="method-description">Checks if the value is a function if goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertInstanceof(&lt;Any Type&gt; value, !Function type, string= opt_message, &lt;Any Type&gt; var_args)</code><br><p class="method-description">Checks if the value is an instance of the user-defined type if
+goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertNumber(&lt;Any Type&gt; value, string= opt_message, &lt;Any Type&gt; var_args) &#8658; number</code><br><p class="method-description">Checks if the value is a number if goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertObject(&lt;Any Type&gt; value, string= opt_message, &lt;Any Type&gt; var_args) &#8658; !Object</code><br><p class="method-description">Checks if the value is an Object if goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>assertString(&lt;Any Type&gt; value, string= opt_message, &lt;Any Type&gt; var_args) &#8658; string</code><br><p class="method-description">Checks if the value is a string if goog.asserts.ENABLE_ASSERTS is true.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>doAssertFailure_(string defaultMessage, ?Array.&lt;*&gt; defaultArgs, (string|undefined) givenMessage, ?Array.&lt;*&gt; givenArgs)</code><br><p class="method-description">Throws an exception with the given message and "Assertion failed" prefixed
+onto it.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fail(string= opt_message, &lt;Any Type&gt; var_args)</code><br><p class="method-description">Fails if goog.asserts.ENABLE_ASSERTS is true. This function is useful in case
+when we want to add a check in the unreachable area like switch-case
+statement:
+
+<pre>
+switch(type) {
+case FOO: doSomething(); break;
+case BAR: doSomethingElse(); break;
+default: goog.assert.fail('Unrecognized type: ' + type);
+// We have only 2 types - "default:" section is unreachable code.
+}
+</pre></p></td></tr></table></body></html>
1  docs/goog/asserts/AssertionError.html
View
@@ -0,0 +1 @@
+<!doctype html><html><head><title>goog.asserts.AssertionError</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.asserts.AssertionError</h1><p>Error object for failed assertions.</p>extends <a href="../../goog/debug/Error.html">goog.debug.Error</a></body></html>
12 docs/goog/debug.html
View
@@ -0,0 +1,12 @@
+<!doctype html><html><head><title>goog.debug</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.debug</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>catchErrors(function ((Object|null)): ? logFunc, boolean= opt_cancel, ?Object= opt_target)</code><br><p class="method-description">Catches onerror events fired by windows and similar objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>deepExpose(&lt;Any Type&gt; obj, boolean= opt_showFn) &#8658; string</code><br><p class="method-description">Creates a string representing a given primitive or object, and for an
+object, all its properties and nested objects. WARNING: If an object is
+given, it and all its nested objects will be modified. To detect reference
+cycles, this method identifies objects using goog.getUid() which mutates the
+object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>enhanceError((Error|null|string) err, string= opt_message) &#8658; ?Error</code><br><p class="method-description">Converts an object to an Error if it's a String,
+adds a stacktrace if there isn't one,
+and optionally adds an extra message.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>expose((Object|null|undefined) obj, boolean= opt_showFn) &#8658; string</code><br><p class="method-description">Creates a string representing an object and all its properties.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>exposeArray(?Array arr) &#8658; string</code><br><p class="method-description">Recursively outputs a nested array as a string.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>exposeException(?Object err, ?Function= opt_fn) &#8658; string</code><br><p class="method-description">Exposes an exception that has been caught by a try...catch and outputs the
+error with a stack trace.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFunctionName(?Function fn) &#8658; string</code><br><p class="method-description">Gets a function name</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getStacktrace(?Function= opt_fn) &#8658; string</code><br><p class="method-description">Gets the current stack trace, either starting from the caller or starting
+from a specified function that's currently on the call stack.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getStacktraceHelper_(?Function fn, ?Array visited) &#8658; string</code><br><p class="method-description">Private helper for getStacktrace().</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getStacktraceSimple(number= opt_depth) &#8658; string</code><br><p class="method-description">Gets the current stack trace. Simple and iterative - doesn't worry about
+catching circular references or getting the args.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>makeWhitespaceVisible(string string) &#8658; string</code><br><p class="method-description">Makes whitespace visible by replacing it with printable characters.
+This is useful in finding diffrences between the expected and the actual
+output strings of a testcase.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>normalizeErrorObject(?Object err) &#8658; ?Object</code><br><p class="method-description">Normalizes the error/exception object between browsers.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setFunctionResolver(function ((Function|null)): string resolver)</code><br><p class="method-description">Set a custom function name resolver.</p></td></tr></table></body></html>
1  docs/goog/debug/Error.html
View
@@ -0,0 +1 @@
+<!doctype html><html><head><title>goog.debug.Error</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.debug.Error</h1><p>Base class for custom error objects.</p>extends <a href="../../Error.html">Error</a></body></html>
2  docs/goog/debug/LogBuffer.html
View
@@ -0,0 +1,2 @@
+<!doctype html><html><head><title>goog.debug.LogBuffer</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.debug.LogBuffer</h1><p>Creates the log buffer.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>addRecord(?goog.debug.Logger.Level level, string msg, string loggerName) &#8658; !goog.debug.LogRecord</code><br><p class="method-description">Adds a log record to the buffer, possibly overwriting the oldest record.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clear()</code><br><p class="method-description">Removes all buffered log records.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>forEachRecord(function (goog.debug.LogRecord): ? func)</code><br><p class="method-description">Calls the given function for each buffered log record, starting with the
+oldest one.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getInstance() &#8658; !goog.debug.LogBuffer</code><br><p class="method-description">A static method that always returns the same instance of LogBuffer.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isBufferingEnabled() &#8658; boolean</code><br></td></tr></table></body></html>
6 docs/goog/debug/LogRecord.html
View
@@ -0,0 +1,6 @@
+<!doctype html><html><head><title>goog.debug.LogRecord</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.debug.LogRecord</h1><p>LogRecord objects are used to pass logging requests between
+the logging framework and individual log Handlers.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getException() &#8658; ?Object</code><br><p class="method-description">Get the exception that is part of the log record.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getExceptionText() &#8658; ?string</code><br><p class="method-description">Get the exception text that is part of the log record.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLevel() &#8658; ?goog.debug.Logger.Level</code><br><p class="method-description">Get the logging message level, for example Level.SEVERE.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLoggerName() &#8658; string</code><br><p class="method-description">Get the source Logger's name.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getMessage() &#8658; string</code><br><p class="method-description">Get the "raw" log message, before localization or formatting.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getMillis() &#8658; number</code><br><p class="method-description">Get event time in milliseconds since 1970.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getSequenceNumber() &#8658; number</code><br><p class="method-description">Get the sequence number.
+<p>
+Sequence numbers are normally assigned in the LogRecord
+constructor, which assigns unique sequence numbers to
+each new LogRecord in increasing order.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>reset(?goog.debug.Logger.Level level, string msg, string loggerName, number= opt_time, number= opt_sequenceNumber)</code><br><p class="method-description">Sets all fields of the log record.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setException(?Object exception)</code><br><p class="method-description">Set the exception that is part of the log record.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setExceptionText(string text)</code><br><p class="method-description">Set the exception text that is part of the log record.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setLevel(?goog.debug.Logger.Level level)</code><br><p class="method-description">Set the logging message level, for example Level.SEVERE.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setLoggerName(string loggerName)</code><br><p class="method-description">Get the source Logger's name.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setMessage(string msg)</code><br><p class="method-description">Set the "raw" log message, before localization or formatting.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setMillis(number time)</code><br><p class="method-description">Set event time in milliseconds since 1970.</p></td></tr></table></body></html>
50 docs/goog/debug/Logger.html
View
@@ -0,0 +1,50 @@
+<!doctype html><html><head><title>goog.debug.Logger</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.debug.Logger</h1><p>The Logger is an object used for logging debug messages. Loggers are
+normally named, using a hierarchical dot-separated namespace. Logger names
+can be arbitrary strings, but they should normally be based on the package
+name or class name of the logged component, such as goog.net.BrowserChannel.
+
+The Logger object is loosely based on the java class
+java.util.logging.Logger. It supports different levels of filtering for
+different loggers.
+
+The logger object should never be instantiated by application code. It
+should always use the goog.debug.Logger.getLogger function.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>addChild_(string name, ?goog.debug.Logger logger)</code><br><p class="method-description">Adds a child to this logger. This is used for setting up the logger tree.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>addHandler(?Function handler)</code><br><p class="method-description">Adds a handler to the logger. This doesn't use the event system because
+we want to be able to add logging to the event system.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>callPublish_(?goog.debug.LogRecord logRecord)</code><br><p class="method-description">Calls the handlers for publish.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>config(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.CONFIG level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>doLogRecord_(?goog.debug.LogRecord logRecord)</code><br><p class="method-description">Log a LogRecord.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fine(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.FINE level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>finer(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.FINER level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>finest(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.FINEST level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getChildren() &#8658; !Object</code><br><p class="method-description">Returns the children of this logger as a map of the child name to the logger.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getEffectiveLevel() &#8658; ?goog.debug.Logger.Level</code><br><p class="method-description">Returns the effective level of the logger based on its ancestors' levels.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLevel() &#8658; ?goog.debug.Logger.Level</code><br><p class="method-description">Gets the log level specifying which message levels will be logged by this
+logger. Message levels lower than this value will be discarded.
+The level value Level.OFF can be used to turn off logging. If the level
+is null, it means that this node should inherit its level from its nearest
+ancestor with a specific (non-null) level value.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLogRecord(?goog.debug.Logger.Level level, string msg, ?Object= opt_exception) &#8658; !goog.debug.LogRecord</code><br><p class="method-description">Creates a new log record and adds the exception (if present) to it.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getName() &#8658; string</code><br><p class="method-description">Gets the name of this logger.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParent() &#8658; ?goog.debug.Logger</code><br><p class="method-description">Returns the parent of this logger.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>info(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.INFO level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isLoggable(?goog.debug.Logger.Level level) &#8658; boolean</code><br><p class="method-description">Check if a message of the given level would actually be logged by this
+logger. This check is based on the Loggers effective level, which may be
+inherited from its parent.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>log(?goog.debug.Logger.Level level, string msg, ?Object= opt_exception)</code><br><p class="method-description">Log a message. If the logger is currently enabled for the
+given message level then the given message is forwarded to all the
+registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>logRecord(?goog.debug.LogRecord logRecord)</code><br><p class="method-description">Log a LogRecord. If the logger is currently enabled for the
+given message level then the given message is forwarded to all the
+registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeHandler(?Function handler) &#8658; boolean</code><br><p class="method-description">Removes a handler from the logger. This doesn't use the event system because
+we want to be able to add logging to the event system.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setLevel(?goog.debug.Logger.Level level)</code><br><p class="method-description">Set the log level specifying which message levels will be logged by this
+logger. Message levels lower than this value will be discarded.
+The level value Level.OFF can be used to turn off logging. If the new level
+is null, it means that this node should inherit its level from its nearest
+ancestor with a specific (non-null) level value.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>setParent_(?goog.debug.Logger parent)</code><br><p class="method-description">Sets the parent of this logger. This is used for setting up the logger tree.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>severe(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.SEVERE level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>shout(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.SHOUT level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>warning(string msg, ?Error= opt_exception)</code><br><p class="method-description">Log a message at the Logger.Level.WARNING level.
+If the logger is currently enabled for the given message level then the
+given message is forwarded to all the registered output Handler objects.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLogger(string name) &#8658; !goog.debug.Logger</code><br><p class="method-description">Find or create a logger for a named subsystem. If a logger has already been
+created with the given name it is returned. Otherwise a new logger is
+created. If a new logger is created its log level will be configured based
+on the LogManager configuration and it will configured to also send logging
+output to its parent's handlers. It will be registered in the LogManager
+global namespace.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>logToProfilers(string msg)</code><br><p class="method-description">Logs a message to profiling tools, if available.
+{@see http://code.google.com/webtoolkit/speedtracer/logging-api.html}
+{@see http://msdn.microsoft.com/en-us/library/dd433074(VS.85).aspx}</p></td></tr></table></body></html>
21 docs/goog/debug/Logger/Level.html
View
@@ -0,0 +1,21 @@
+<!doctype html><html><head><title>goog.debug.Logger.Level</title><link href="../../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../../index.html">Home</a><h1>Class goog.debug.Logger.Level</h1><p>The Level class defines a set of standard logging levels that
+can be used to control logging output. The logging Level objects
+are ordered and are specified by ordered integers. Enabling logging
+at a given level also enables logging at all higher levels.
+<p>
+Clients should normally use the predefined Level constants such
+as Level.SEVERE.
+<p>
+The levels in descending order are:
+<ul>
+<li>SEVERE (highest value)
+<li>WARNING
+<li>INFO
+<li>CONFIG
+<li>FINE
+<li>FINER
+<li>FINEST (lowest value)
+</ul>
+In addition there is a level OFF that can be used to turn
+off logging, and a level ALL that can be used to enable
+logging of all messages.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>createPredefinedLevelsCache_()</code><br><p class="method-description">Creates the predefined levels cache and populates it.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPredefinedLevel(string name) &#8658; ?goog.debug.Logger.Level</code><br><p class="method-description">Gets the predefined level with the given name.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPredefinedLevelByValue(number value) &#8658; ?goog.debug.Logger.Level</code><br><p class="method-description">Gets the highest predefined level <= #value.</p></td></tr></table></body></html>
12 docs/goog/debug/entryPointRegistry.html
View
@@ -0,0 +1,12 @@
+<!doctype html><html><head><title>goog.debug.entryPointRegistry</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Library goog.debug.entryPointRegistry</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>monitorAll(!goog.debug.EntryPointMonitor monitor)</code><br><p class="method-description">Configures a monitor to wrap all entry points.
+
+Entry points that have already been registered are immediately wrapped by
+the monitor. When an entry point is registered in the future, it will also
+be wrapped by the monitor when it is registered.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>register(function (Function): ? callback)</code><br><p class="method-description">Register an entry point with this module.
+
+The entry point will be instrumented when a monitor is passed to
+goog.debug.entryPointRegistry.monitorAll. If this has already occurred, the
+entry point is instrumented immediately.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unmonitorAllIfPossible(!goog.debug.EntryPointMonitor monitor)</code><br><p class="method-description">Try to unmonitor all the entry points that have already been registered. If
+an entry point is registered in the future, it will not be wrapped by the
+monitor when it is registered. Note that this may fail if the entry points
+have additional wrapping.</p></td></tr></table></body></html>
154 docs/goog/dom.html
View
@@ -0,0 +1,154 @@
+<!doctype html><html><head><title>goog.dom</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.dom</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>append(!Node parent, (goog.dom.Appendable|null|undefined) var_args)</code><br><p class="method-description">Appends a node with text or other nodes.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>appendChild(?Node parent, ?Node child)</code><br><p class="method-description">Appends a child to a node.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>append_(!Document doc, !Node parent, !Arguments args, number startIndex)</code><br><p class="method-description">Appends a node with text or other nodes.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>canHaveChildren(?Node node) &#8658; boolean</code><br><p class="method-description">Determines if the given node can contain children, intended to be used for
+HTML generation.
+
+IE natively supports node.canHaveChildren but has inconsistent behavior.
+Prior to IE8 the base tag allows children and in IE9 all nodes return true
+for canHaveChildren.
+
+In practice all non-IE browsers allow you to add children to any node, but
+the behavior is inconsistent:
+
+<pre>
+var a = document.createElement('br');
+a.appendChild(document.createTextNode('foo'));
+a.appendChild(document.createTextNode('bar'));
+console.log(a.childNodes.length); // 2
+console.log(a.innerHTML); // Chrome: "", IE9: "foobar", FF3.5: "foobar"
+</pre>
+
+TODO(user): Rename shouldAllowChildren() ?</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>canUseQuerySelector_((Document|Element|null) parent) &#8658; boolean</code><br><p class="method-description">Prefer the standardized (http://www.w3.org/TR/selectors-api/), native and
+fast W3C Selectors API. However, the version of WebKit that shipped with
+Safari 3.1 and Chrome has a bug where it will not correctly match mixed-
+case class name selectors in quirks mode.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>compareNodeOrder(?Node node1, ?Node node2) &#8658; number</code><br><p class="method-description">Compares the document order of two nodes, returning 0 if they are the same
+node, a negative number if node1 is before node2, and a positive number if
+node2 is before node1. Note that we compare the order the tags appear in the
+document so in the tree <b><i>text</i></b> the B node is considered to be
+before the I node.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>compareParentsDescendantNodeIe_(?Node textNode, ?Node node) &#8658; number</code><br><p class="method-description">Utility function to compare the position of two nodes, when
+{@code textNode}'s parent is an ancestor of {@code node}. If this entry
+condition is not met, this function will attempt to reference a null object.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>compareSiblingOrder_(?Node node1, ?Node node2) &#8658; number</code><br><p class="method-description">Utility function to compare the position of two nodes known to be non-equal
+siblings.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>contains(?Node parent, ?Node descendant) &#8658; boolean</code><br><p class="method-description">Whether a node contains another node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createDom(string tagName, (Object|null|string=) opt_attributes, (NodeList|Object|null|string|undefined) var_args) &#8658; !Element</code><br><p class="method-description">Returns a dom node with a set of attributes. This function accepts varargs
+for subsequent nodes to be added. Subsequent nodes will be added to the
+first node as childNodes.
+
+So:
+<code>createDom('div', null, createDom('p'), createDom('p'));</code>
+would return a div with two child paragraphs</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>createDom_(!Document doc, !Arguments args) &#8658; !Element</code><br><p class="method-description">Helper for {@code createDom}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createElement(string name) &#8658; !Element</code><br><p class="method-description">Creates a new element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createTable(number rows, number columns, boolean= opt_fillWithNbsp) &#8658; !Element</code><br><p class="method-description">Create a table.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>createTable_(!Document doc, number rows, number columns, boolean fillWithNbsp) &#8658; !Element</code><br><p class="method-description">Create a table.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createTextNode(string content) &#8658; !Text</code><br><p class="method-description">Creates a new text node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>findCommonAncestor((Node|null|undefined) var_args) &#8658; ?Node</code><br><p class="method-description">Find the deepest common ancestor of the given nodes.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>findNode(?Node root, function ((Node|null)): boolean p) &#8658; (Node|null|undefined)</code><br><p class="method-description">Finds the first descendant node that matches the filter function, using
+a depth first search. This function offers the most general purpose way
+of finding a matching element. You may also wish to consider
+{@code goog.dom.query} which can express many matching criteria using
+CSS selector expressions. These expressions often result in a more
+compact representation of the desired result.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>findNodes(?Node root, function ((Node|null)): boolean p) &#8658; ?Array</code><br><p class="method-description">Finds all the descendant nodes that match the filter function, using a
+a depth first search. This function offers the most general-purpose way
+of finding a set of matching elements. You may also wish to consider
+{@code goog.dom.query} which can express many matching criteria using
+CSS selector expressions. These expressions often result in a more
+compact representation of the desired result.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>findNodes_(?Node root, function ((Node|null)): boolean p, ?Array rv, boolean findOne) &#8658; boolean</code><br><p class="method-description">Finds the first or all the descendant nodes that match the filter function,
+using a depth first search.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>flattenElement(?Element element) &#8658; (Element|null|undefined)</code><br><p class="method-description">Flattens an element. That is, removes it and replace it with its children.
+Does nothing if the element is not in the document.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getActiveElement(?Document doc) &#8658; ?Element</code><br><p class="method-description">Determines the active element in the given document.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getAncestor(?Node element, function ((Node|null)): boolean matcher, boolean= opt_includeNode, number= opt_maxSearchSteps) &#8658; ?Node</code><br><p class="method-description">Walks up the DOM hierarchy returning the first ancestor that passes the
+matcher function.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getAncestorByClass(?Node element, ?string= opt_class) &#8658; ?Node</code><br><p class="method-description">Walks up the DOM hierarchy returning the first ancestor that has the passed
+class name. If the passed element matches the specified criteria, the
+element itself is returned.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getAncestorByTagNameAndClass(?Node element, ?string= opt_tag, ?string= opt_class) &#8658; ?Node</code><br><p class="method-description">Walks up the DOM hierarchy returning the first ancestor that has the passed
+tag name and/or class name. If the passed element matches the specified
+criteria, the element itself is returned.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getChildren(?Element element) &#8658; (Array|NodeList|null)</code><br><p class="method-description">Returns an array containing just the element children of the given element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getCompatMode() &#8658; string</code><br><p class="method-description">Returns the compatMode of the document.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocument() &#8658; !Document</code><br><p class="method-description">Gets the document object being used by the dom library.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocumentHeight() &#8658; number</code><br><p class="method-description">Calculates the height of the document.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getDocumentHeight_(?Window win) &#8658; number</code><br><p class="method-description">Calculates the height of the document of the given window.
+
+Function code copied from the opensocial gadget api:
+gadgets.window.adjustHeight(opt_height)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocumentScroll() &#8658; !goog.math.Coordinate</code><br><p class="method-description">Gets the document scroll distance as a coordinate object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocumentScrollElement() &#8658; ?Element</code><br><p class="method-description">Gets the document scroll element.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getDocumentScrollElement_(!Document doc) &#8658; ?Element</code><br><p class="method-description">Helper for {@code getDocumentScrollElement}.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getDocumentScroll_(!Document doc) &#8658; !goog.math.Coordinate</code><br><p class="method-description">Helper for {@code getDocumentScroll}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDomHelper((Node|Window|null=) opt_element) &#8658; !goog.dom.DomHelper</code><br><p class="method-description">Gets the DomHelper object for the document where the element resides.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElement((Element|null|string) element) &#8658; ?Element</code><br><p class="method-description">Alias for getElementById. If a DOM node is passed in then we just return
+that.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElementByClass(string className, (Document|Element|null=) opt_el) &#8658; ?Element</code><br><p class="method-description">Returns the first element with the provided className.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElementsByClass(string className, (Document|Element|null=) opt_el) &#8658; {length: number}</code><br><p class="method-description">Returns an array of all the elements with the provided className.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElementsByTagNameAndClass(?string= opt_tag, ?string= opt_class, (Document|Element|null=) opt_el) &#8658; {length: number}</code><br><p class="method-description">Looks up elements by both tag and class name, using browser native functions
+({@code querySelectorAll}, {@code getElementsByTagName} or
+{@code getElementsByClassName}) where possible. This function
+is a useful, if limited, way of collecting a list of DOM elements
+with certain characteristics. {@code goog.dom.query} offers a
+more powerful and general solution which allows matching on CSS3
+selector expressions, but at increased cost in code size. If all you
+need is particular tags belonging to a single class, this function
+is fast and sleek.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getElementsByTagNameAndClass_(!Document doc, ?string= opt_tag, ?string= opt_class, (Document|Element|null=) opt_el) &#8658; {length: number}</code><br><p class="method-description">Helper for {@code getElementsByTagNameAndClass}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFirstElementChild(?Node node) &#8658; ?Element</code><br><p class="method-description">Returns the first child node that is an element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFrameContentDocument(?Element frame) &#8658; !Document</code><br><p class="method-description">Cross-browser function for getting the document element of a frame or iframe.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFrameContentWindow((HTMLFrameElement|HTMLIFrameElement|null) frame) &#8658; ?Window</code><br><p class="method-description">Cross-browser function for getting the window of a frame or iframe.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLastElementChild(?Node node) &#8658; ?Element</code><br><p class="method-description">Returns the last child node that is an element.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getNextElementNode_(?Node node, boolean forward) &#8658; ?Element</code><br><p class="method-description">Returns the first node that is an element in the specified direction,
+starting with {@code node}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getNextElementSibling(?Node node) &#8658; ?Element</code><br><p class="method-description">Returns the first next sibling that is an element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getNextNode(?Node node) &#8658; ?Node</code><br><p class="method-description">Returns the next node in source order from the given node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getNodeAtOffset(?Node parent, number offset, ?Object= opt_result) &#8658; ?Node</code><br><p class="method-description">Returns the node at a given offset in a parent node. If an object is
+provided for the optional third parameter, the node and the remainder of the
+offset will stored as properties of this object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getNodeTextLength(?Node node) &#8658; number</code><br><p class="method-description">Returns the text length of the text contained in a node, without markup. This
+is equivalent to the selection length if the node was selected, or the number
+of cursor movements to traverse the node. Images & BRs take one space. New
+lines are ignored.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getNodeTextOffset(?Node node, ?Node= opt_offsetParent) &#8658; number</code><br><p class="method-description">Returns the text offset of a node relative to one of its ancestors. The text
+length is the same as the length calculated by goog.dom.getNodeTextLength.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getOuterHtml(?Element element) &#8658; string</code><br><p class="method-description">Gets the outerHTML of a node, which islike innerHTML, except that it
+actually contains the HTML of the node itself.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getOwnerDocument((Node|Window|null) node) &#8658; !Document</code><br><p class="method-description">Returns the owner document for a node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPageScroll(?Window= opt_window) &#8658; !goog.math.Coordinate</code><br><p class="method-description">Gets the page scroll distance as a coordinate object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParentElement(?Element element) &#8658; ?Element</code><br><p class="method-description">Returns an element's parent, if it's an Element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPreviousElementSibling(?Node node) &#8658; ?Element</code><br><p class="method-description">Returns the first previous sibling that is an element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPreviousNode(?Node node) &#8658; ?Node</code><br><p class="method-description">Returns the previous node in source order from the given node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getRawTextContent(?Node node) &#8658; string</code><br><p class="method-description">Returns the text content of the current node, without markup.
+
+Unlike {@code getTextContent} this method does not collapse whitespaces
+or normalize lines breaks.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getTextContent(?Node node) &#8658; string</code><br><p class="method-description">Returns the text content of the current node, without markup and invisible
+symbols. New lines are stripped and whitespace is collapsed,
+such that each character would be visible.
+
+In browsers that support it, innerText is used. Other browsers attempt to
+simulate it via node traversal. Line breaks are canonicalized in IE.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getTextContent_(?Node node, ?Array buf, boolean normalizeWhitespace)</code><br><p class="method-description">Recursive support function for text content retrieval.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getViewportSize(?Window= opt_window) &#8658; !goog.math.Size</code><br><p class="method-description">Gets the dimensions of the viewport.
+
+Gecko Standards mode:
+docEl.clientWidth Width of viewport excluding scrollbar.
+win.innerWidth Width of viewport including scrollbar.
+body.clientWidth Width of body element.
+
+docEl.clientHeight Height of viewport excluding scrollbar.
+win.innerHeight Height of viewport including scrollbar.
+body.clientHeight Height of document.
+
+Gecko Backwards compatible mode:
+docEl.clientWidth Width of viewport excluding scrollbar.
+win.innerWidth Width of viewport including scrollbar.
+body.clientWidth Width of viewport excluding scrollbar.
+
+docEl.clientHeight Height of document.
+win.innerHeight Height of viewport including scrollbar.
+body.clientHeight Height of viewport excluding scrollbar.
+
+IE6/7 Standards mode:
+docEl.clientWidth Width of viewport excluding scrollbar.
+win.innerWidth Undefined.
+body.clientWidth Width of body element.
+
+docEl.clientHeight Height of viewport excluding scrollbar.
+win.innerHeight Undefined.
+body.clientHeight Height of document element.
+
+IE5 + IE6/7 Backwards compatible mode:
+docEl.clientWidth 0.
+win.innerWidth Undefined.
+body.clientWidth Width of viewport excluding scrollbar.
+
+docEl.clientHeight 0.
+win.innerHeight Undefined.
+body.clientHeight Height of viewport excluding scrollbar.
+
+Opera 9 Standards and backwards compatible mode:
+docEl.clientWidth Width of viewport excluding scrollbar.
+win.innerWidth Width of viewport including scrollbar.
+body.clientWidth Width of viewport excluding scrollbar.
+
+docEl.clientHeight Height of document.
+win.innerHeight Height of viewport including scrollbar.
+body.clientHeight Height of viewport excluding scrollbar.
+
+WebKit:
+Safari 2
+docEl.clientHeight Same as scrollHeight.
+docEl.clientWidth Same as innerWidth.
+win.innerWidth Width of viewport excluding scrollbar.
+win.innerHeight Height of the viewport including scrollbar.
+frame.innerHeight Height of the viewport exluding scrollbar.
+
+Safari 3 (tested in 522)
+
+docEl.clientWidth Width of viewport excluding scrollbar.
+docEl.clientHeight Height of viewport excluding scrollbar in strict mode.
+body.clientHeight Height of viewport excluding scrollbar in quirks mode.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getViewportSize_(?Window win) &#8658; !goog.math.Size</code><br><p class="method-description">Helper for {@code getViewportSize}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getWindow(?Document= opt_doc) &#8658; !Window</code><br><p class="method-description">Gets the window object associated with the given document.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getWindow_(!Document doc) &#8658; !Window</code><br><p class="method-description">Helper for {@code getWindow}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>htmlToDocumentFragment(string htmlString) &#8658; !Node</code><br><p class="method-description">Converts an HTML string into a document fragment.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>htmlToDocumentFragment_(!Document doc, string htmlString) &#8658; !Node</code><br><p class="method-description">Helper for {@code htmlToDocumentFragment}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insertChildAt(?Element parent, ?Node child, number index)</code><br><p class="method-description">Insert a child at a given index. If index is larger than the number of child
+nodes that the parent currently has, the node is inserted as the last child
+node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insertSiblingAfter(?Node newNode, ?Node refNode)</code><br><p class="method-description">Inserts a new node after an existing reference node (i.e. as the next
+sibling). If the reference node has no parent, then does nothing.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>insertSiblingBefore(?Node newNode, ?Node refNode)</code><br><p class="method-description">Inserts a new node before an existing reference node (i.e. as the previous
+sibling). If the reference node has no parent, then does nothing.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isCss1CompatMode() &#8658; boolean</code><br><p class="method-description">Returns true if the browser is in "CSS1-compatible" (standards-compliant)
+mode, false otherwise.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>isCss1CompatMode_(?Document doc) &#8658; boolean</code><br><p class="method-description">Returns true if the browser is in "CSS1-compatible" (standards-compliant)
+mode, false otherwise.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isElement(&lt;Any Type&gt; obj) &#8658; boolean</code><br><p class="method-description">Whether the object looks like an Element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isFocusableTabIndex(?Element element) &#8658; boolean</code><br><p class="method-description">Returns true if the element has a tab index that allows it to receive
+keyboard focus (tabIndex >= 0), false otherwise. Note that form elements
+natively support keyboard focus, even if they have no tab index.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isNodeLike(&lt;Any Type&gt; obj) &#8658; boolean</code><br><p class="method-description">Whether the object looks like a DOM node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isNodeList(?Object val) &#8658; boolean</code><br><p class="method-description">Returns true if the object is a {@code NodeList}. To qualify as a NodeList,
+the object must have a numeric length property and an item function (which
+has type 'string' on IE for some reason).</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isWindow(&lt;Any Type&gt; obj) &#8658; boolean</code><br><p class="method-description">Returns true if the specified value is a Window object. This includes the
+global window for HTML pages, and iframe windows.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeChildren(?Node node)</code><br><p class="method-description">Removes all the child nodes on a DOM node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeNode(?Node node) &#8658; ?Node</code><br><p class="method-description">Removes a node from its parent.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>replaceNode(?Node newNode, ?Node oldNode)</code><br><p class="method-description">Replaces a node in the DOM tree. Will do nothing if {@code oldNode} has no
+parent.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setFocusableTabIndex(?Element element, boolean enable)</code><br><p class="method-description">Enables or disables keyboard focus support on the element via its tab index.
+Only elements for which {@link goog.dom.isFocusableTabIndex} returns true
+(or elements that natively support keyboard focus, like form elements) can
+receive keyboard focus. See http://go/tabindex for more info.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setProperties(?Element element, ?Object properties)</code><br><p class="method-description">Sets multiple properties on a node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setTextContent(?Element element, string text)</code><br><p class="method-description">Cross-browser function for setting the text content of an element.</p></td></tr></table></body></html>
21 docs/goog/dom/DomHelper.html
View
@@ -0,0 +1,21 @@
+<!doctype html><html><head><title>goog.dom.DomHelper</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.dom.DomHelper</h1><p>Create an instance of a DOM helper with a new document object.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createDom(string tagName, (Object|null|string=) opt_attributes, (goog.dom.Appendable|null|undefined) var_args) &#8658; !Element</code><br><p class="method-description">Returns a dom node with a set of attributes. This function accepts varargs
+for subsequent nodes to be added. Subsequent nodes will be added to the
+first node as childNodes.
+
+So:
+<code>createDom('div', null, createDom('p'), createDom('p'));</code>
+would return a div with two child paragraphs
+
+An easy way to move all child nodes of an existing element to a new parent
+element is:
+<code>createDom('div', null, oldElement.childNodes);</code>
+which will remove all child nodes from the old element and add them as
+child nodes of the new DIV.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createElement(string name) &#8658; !Element</code><br><p class="method-description">Creates a new element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createTable(number rows, number columns, boolean= opt_fillWithNbsp) &#8658; !Element</code><br><p class="method-description">Create a table.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createTextNode(string content) &#8658; !Text</code><br><p class="method-description">Creates a new text node.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getCompatMode() &#8658; string</code><br><p class="method-description">Returns the compatMode of the document.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocument() &#8658; !Document</code><br><p class="method-description">Gets the document object being used by the dom library.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocumentHeight() &#8658; number</code><br><p class="method-description">Calculates the height of the document.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocumentScroll() &#8658; !goog.math.Coordinate</code><br><p class="method-description">Gets the document scroll distance as a coordinate object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getDocumentScrollElement() &#8658; ?Element</code><br><p class="method-description">Gets the document scroll element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElement((Element|null|string) element) &#8658; ?Element</code><br><p class="method-description">Alias for {@code getElementById}. If a DOM node is passed in then we just
+return that.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElementByClass(string className, (Document|Element|null=) opt_el) &#8658; ?Element</code><br><p class="method-description">Returns the first element we find matching the provided class name.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElementsByClass(string className, (Document|Element|null=) opt_el) &#8658; {length: number}</code><br><p class="method-description">Returns an array of all the elements with the provided className.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getElementsByTagNameAndClass(?string= opt_tag, ?string= opt_class, (Document|Element|null=) opt_el) &#8658; {length: number}</code><br><p class="method-description">Looks up elements by both tag and class name, using browser native functions
+({@code querySelectorAll}, {@code getElementsByTagName} or
+{@code getElementsByClassName}) where possible. The returned array is a live
+NodeList or a static list depending on the code path taken.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getViewportSize(?Window= opt_window) &#8658; !goog.math.Size</code><br><p class="method-description">Gets the dimensions of the viewport.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getWindow() &#8658; !Window</code><br><p class="method-description">Gets the window object associated with the document.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>htmlToDocumentFragment(string htmlString) &#8658; !Node</code><br><p class="method-description">Converts an HTML string into a node or a document fragment. A single Node
+is used if the {@code htmlString} only generates a single node. If the
+{@code htmlString} generates multiple nodes then these are put inside a
+{@code DocumentFragment}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isCss1CompatMode() &#8658; boolean</code><br><p class="method-description">Returns true if the browser is in "CSS1-compatible" (standards-compliant)
+mode, false otherwise.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setDocument(!Document document)</code><br><p class="method-description">Sets the document object.</p></td></tr></table></body></html>
14 docs/goog/dom/classes.html
View
@@ -0,0 +1,14 @@
+<!doctype html><html><head><title>goog.dom.classes</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Library goog.dom.classes</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>add(?Node element, (string|undefined) var_args) &#8658; boolean</code><br><p class="method-description">Adds a class or classes to an element. Does not add multiples of class names.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>addRemove(?Node element, (Array.&lt;string&gt;|null|string) classesToRemove, (Array.&lt;string&gt;|null|string) classesToAdd)</code><br><p class="method-description">Adds zero or more classes to an element and removes zero or more as a single
+operation. Unlike calling {@link goog.dom.classes.add} and
+{@link goog.dom.classes.remove} separately, this is more efficient as it only
+parses the class property once.
+
+If a class is in both the remove and add lists, it will be added. Thus,
+you can use this instead of {@link goog.dom.classes.swap} when you have
+more than two class names that you want to swap.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>add_(?Array.&lt;string&gt; classes, ?Array.&lt;string&gt; args) &#8658; boolean</code><br><p class="method-description">Helper method for {@link goog.dom.classes.add} and
+{@link goog.dom.classes.addRemove}. Adds one or more classes to the supplied
+classes array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>enable(?Node element, string className, boolean enabled)</code><br><p class="method-description">Adds or removes a class depending on the enabled argument.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>get(?Node element) &#8658; ?Array</code><br><p class="method-description">Gets an array of class names on an element</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>has(?Node element, string className) &#8658; boolean</code><br><p class="method-description">Returns true if an element has a class.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove(?Node element, (string|undefined) var_args) &#8658; boolean</code><br><p class="method-description">Removes a class or classes from an element.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>remove_(?Array.&lt;string&gt; classes, ?Array.&lt;string&gt; args) &#8658; boolean</code><br><p class="method-description">Helper method for {@link goog.dom.classes.remove} and
+{@link goog.dom.classes.addRemove}. Removes one or more classes from the
+supplied classes array.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>set(?Node element, string className)</code><br><p class="method-description">Sets the entire class name of an element.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>swap(?Node element, string fromClass, string toClass) &#8658; boolean</code><br><p class="method-description">Switches a class on an element from one to another without disturbing other
+classes. If the fromClass isn't removed, the toClass won't be added.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toggle(?Node element, string className) &#8658; boolean</code><br><p class="method-description">Removes a class if an element has it, and adds it the element doesn't have
+it. Won't affect other classes on the node.</p></td></tr></table></body></html>
26 docs/goog/events.html
View
@@ -0,0 +1,26 @@
+<!doctype html><html><head><title>goog.events</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.events</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>cleanUp_(string type, boolean capture, number srcUid, ?Array listenerArray)</code><br><p class="method-description">Cleans up the listener array as well as the listener tree</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dispatchEvent(?goog.events.EventTarget src, (Object|goog.events.Event|null|string) e) &#8658; boolean</code><br><p class="method-description">Dispatches an event (or event like object) and calls all listeners
+listening for events of this type. The type of the event is decided by the
+type property on the event object.
+
+If any of the listeners returns false OR calls preventDefault then this
+function will return false. If one of the capture listeners calls
+stopPropagation, then the bubble listeners won't fire.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>expose(?Object e) &#8658; string</code><br><p class="method-description">Provides a nice string showing the normalized event objects public members</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fireListener(?goog.events.Listener listener, ?Object eventObject) &#8658; boolean</code><br><p class="method-description">Fires a listener with a set of arguments</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fireListeners(?Object obj, string type, boolean capture, ?Object eventObject) &#8658; boolean</code><br><p class="method-description">Fires an object's listeners of a particular type and phase</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>fireListeners_(?Object map, ?Object obj, string type, boolean capture, ?Object eventObject) &#8658; boolean</code><br><p class="method-description">Fires an object's listeners of a particular type and phase.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getListener((EventTarget|goog.events.EventTarget|null) src, ?string type, ?Object listener, boolean= opt_capt, ?Object= opt_handler) &#8658; ?goog.events.Listener</code><br><p class="method-description">Gets the goog.events.Listener for the event or null if no such listener is
+in use.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getListeners(?Object obj, string type, boolean capture) &#8658; ?Array</code><br><p class="method-description">Gets the listeners for a given object, type and capture phase.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getListeners_(?Object obj, ?string type, boolean capture) &#8658; ?Array</code><br><p class="method-description">Gets the listeners for a given object, type and capture phase.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getOnString_(string type) &#8658; string</code><br><p class="method-description">Returns a string wth on prepended to the specified type. This is used for IE
+which expects "on" to be prepended. This function caches the string in order
+to avoid extra allocations in steady state.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getProxy() &#8658; ?Function</code><br><p class="method-description">Helper function for returning a proxy function.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getTotalListenerCount() &#8658; number</code><br><p class="method-description">Gets the total number of listeners currently in the system.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getUniqueId(string identifier) &#8658; string</code><br><p class="method-description">Creates a unique event id.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleBrowserEvent_(string key, ?Event= opt_evt) &#8658; boolean</code><br><p class="method-description">Handles an event and dispatches it to the correct listeners. This
+function is a proxy for the real listener the user specified.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasListener((EventTarget|goog.events.EventTarget|null) obj, string= opt_type, boolean= opt_capture) &#8658; boolean</code><br><p class="method-description">Returns whether an event target has any active listeners matching the
+specified signature. If either the type or capture parameters are
+unspecified, the function will match on the remaining criteria.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>isMarkedIeEvent_(?Event e) &#8658; boolean</code><br><p class="method-description">This is used to check if an IE event has already been handled by the Closure
+system so we do not do the Closure pass twice for a bubbling event.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>listen((EventTarget|goog.events.EventTarget|null) src, (Array.&lt;string&gt;|null|string) type, ?Object listener, boolean= opt_capt, ?Object= opt_handler) &#8658; ?number</code><br><p class="method-description">Adds an event listener for a specific event on a DOM Node or an object that
+has implemented {@link goog.events.EventTarget}. A listener can only be
+added once to an object and if it is added again the key for the listener
+is returned.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>listenOnce((EventTarget|goog.events.EventTarget|null) src, (Array.&lt;string&gt;|null|string) type, ?Object listener, boolean= opt_capt, ?Object= opt_handler) &#8658; ?number</code><br><p class="method-description">Adds an event listener for a specific event on a DomNode or an object that
+has implemented {@link goog.events.EventTarget}. After the event has fired
+the event listener is removed from the target.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>listenWithWrapper((EventTarget|goog.events.EventTarget|null) src, ?goog.events.EventWrapper wrapper, ?Object listener, boolean= opt_capt, ?Object= opt_handler)</code><br><p class="method-description">Adds an event listener with a specific event wrapper on a DOM Node or an
+object that has implemented {@link goog.events.EventTarget}. A listener can
+only be added once to an object.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>markIeEvent_(?Event e)</code><br><p class="method-description">This is used to mark the IE event object so we do not do the Closure pass
+twice for a bubbling event.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>protectBrowserEventEntryPoint(?goog.debug.ErrorHandler errorHandler)</code><br><p class="method-description">Installs exception protection for the browser event entry point using the
+given error handler.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeAll(?Object= opt_obj, string= opt_type, boolean= opt_capt) &#8658; number</code><br><p class="method-description">Removes all listeners from an object, if no object is specified it will
+remove all listeners that have been registered. You can also optionally
+remove listeners of a particular type or capture phase.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unlisten((EventTarget|goog.events.EventTarget|null) src, (Array.&lt;string&gt;|null|string) type, ?Object listener, boolean= opt_capt, ?Object= opt_handler) &#8658; ?boolean</code><br><p class="method-description">Removes an event listener which was added with listen().</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unlistenByKey(?number key) &#8658; boolean</code><br><p class="method-description">Removes an event listener which was added with listen() by the key
+returned by listen().</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unlistenWithWrapper((EventTarget|goog.events.EventTarget|null) src, ?goog.events.EventWrapper wrapper, ?Object listener, boolean= opt_capt, ?Object= opt_handler)</code><br><p class="method-description">Removes an event listener which was added with listenWithWrapper().</p></td></tr></table></body></html>
37 docs/goog/events/BrowserEvent.html
View
@@ -0,0 +1,37 @@
+<!doctype html><html><head><title>goog.events.BrowserEvent</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.events.BrowserEvent</h1><p>Accepts a browser event object and creates a patched, cross browser event
+object.
+The content of this object will not be initialized if no event object is
+provided. If this is the case, init() needs to be invoked separately.</p>extends <a href="../../goog/events/Event.html">goog.events.Event</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Deletes or nulls out any references to COM objects, DOM nodes, or other
+disposable objects. Classes that extend {@code goog.Disposable} should
+override this method.
+Not reentrant. To avoid calling it twice, it must only be called from the
+subclass' {@code disposeInternal} method. Everywhere else the public
+{@code dispose} method must be used.
+For example:
+<pre>
+mypackage.MyClass = function() {
+goog.base(this);
+// Constructor logic specific to MyClass.
+...
+};
+goog.inherits(mypackage.MyClass, goog.Disposable);
+
+mypackage.MyClass.prototype.disposeInternal = function() {
+goog.base(this, 'disposeInternal');
+// Dispose logic specific to MyClass.
+...
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getBrowserEvent() &#8658; ?Event</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>init(?Event e, ?Node= opt_currentTarget)</code><br><p class="method-description">Accepts a browser event object and creates a patched, cross browser event
+object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isButton(?goog.events.BrowserEvent.MouseButton button) &#8658; boolean</code><br><p class="method-description">Tests to see which button was pressed during the event. This is really only
+useful in IE and Gecko browsers. And in IE, it's only useful for
+mousedown/mouseup events, because click only fires for the left mouse button.
+
+Safari 2 only reports the left button being clicked, and uses the value '1'
+instead of 0. Opera only reports a mousedown event for the middle button, and
+no mouse events for the right button. Opera has default behavior for left and
+middle click that can only be overridden via a configuration setting.
+
+There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isMouseActionButton() &#8658; boolean</code><br><p class="method-description">Whether this has an "action"-producing mouse button.
+
+By definition, this includes left-click on windows/linux, and left-click
+without the ctrl key on Macs.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>preventDefault()</code><br><p class="method-description">Prevents the default action, for example a link redirecting to a url.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>stopPropagation()</code><br><p class="method-description">Stops event propagation.</p></td></tr></table></body></html>
26 docs/goog/events/Event.html
View
@@ -0,0 +1,26 @@
+<!doctype html><html><head><title>goog.events.Event</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.events.Event</h1><p>A base class for event objects, so that they can support preventDefault and
+stopPropagation.</p>extends <a href="../../goog/Disposable.html">goog.Disposable</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Deletes or nulls out any references to COM objects, DOM nodes, or other
+disposable objects. Classes that extend {@code goog.Disposable} should
+override this method.
+Not reentrant. To avoid calling it twice, it must only be called from the
+subclass' {@code disposeInternal} method. Everywhere else the public
+{@code dispose} method must be used.
+For example:
+<pre>
+mypackage.MyClass = function() {
+goog.base(this);
+// Constructor logic specific to MyClass.
+...
+};
+goog.inherits(mypackage.MyClass, goog.Disposable);
+
+mypackage.MyClass.prototype.disposeInternal = function() {
+goog.base(this, 'disposeInternal');
+// Dispose logic specific to MyClass.
+...
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>preventDefault()</code><br><p class="method-description">Prevents the default action, for example a link redirecting to a url.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>stopPropagation()</code><br><p class="method-description">Stops event propagation.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>preventDefault(!goog.events.Event e)</code><br><p class="method-description">Prevents the default action. It is equivalent to
+{@code e.preventDefault()}, but can be used as the callback argument of
+{@link goog.events.listen} without declaring another function.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>stopPropagation(!goog.events.Event e)</code><br><p class="method-description">Stops the propagation of the event. It is equivalent to
+{@code e.stopPropagation()}, but can be used as the callback argument of
+{@link goog.events.listen} without declaring another function.</p></td></tr></table></body></html>
9 docs/goog/events/EventHandler.html
View
@@ -0,0 +1,9 @@
+<!doctype html><html><head><title>goog.events.EventHandler</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.events.EventHandler</h1><p>Super class for objects that want to easily manage a number of event
+listeners. It allows a short cut to listen and also provides a quick way
+to remove all events listeners belonging to this object.</p>extends <a href="../../goog/Disposable.html">goog.Disposable</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Disposes of this EventHandler and removes all listeners that it registered.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getListenerCount() &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>handleEvent(?goog.events.Event e)</code><br><p class="method-description">Default event handler</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>listen((EventTarget|goog.events.EventTarget|null) src, (Array.&lt;string&gt;|null|string) type, ?Object= opt_fn, boolean= opt_capture, ?Object= opt_handler) &#8658; ?goog.events.EventHandler</code><br><p class="method-description">Listen to an event on a DOM node or EventTarget. If the function is omitted
+then the EventHandler's handleEvent method will be used.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>listenOnce((EventTarget|goog.events.EventTarget|null) src, (Array.&lt;string&gt;|null|string) type, ?Object= opt_fn, boolean= opt_capture, ?Object= opt_handler) &#8658; ?goog.events.EventHandler</code><br><p class="method-description">Listen to an event on a DOM node or EventTarget. If the function is omitted
+then the EventHandler's handleEvent method will be used. After the event has
+fired the event listener is removed from the target. If an array of event
+types is provided, each event type will be listened to once.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>listenWithWrapper((EventTarget|goog.events.EventTarget|null) src, ?goog.events.EventWrapper wrapper, ?Object listener, boolean= opt_capt, ?Object= opt_handler) &#8658; ?goog.events.EventHandler</code><br><p class="method-description">Adds an event listener with a specific event wrapper on a DOM Node or an
+object that has implemented {@link goog.events.EventTarget}. A listener can
+only be added once to an object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeAll()</code><br><p class="method-description">Unlistens to all events.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unlisten((EventTarget|goog.events.EventTarget|null) src, (Array.&lt;string&gt;|null|string) type, ?Object= opt_fn, boolean= opt_capture, ?Object= opt_handler) &#8658; ?goog.events.EventHandler</code><br><p class="method-description">Unlistens on an event.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unlistenWithWrapper((EventTarget|goog.events.EventTarget|null) src, ?goog.events.EventWrapper wrapper, ?Object listener, boolean= opt_capt, ?Object= opt_handler) &#8658; ?goog.events.EventHandler</code><br><p class="method-description">Removes an event listener which was added with listenWithWrapper().</p></td></tr></table></body></html>
63 docs/goog/events/EventTarget.html
View
@@ -0,0 +1,63 @@
+<!doctype html><html><head><title>goog.events.EventTarget</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.events.EventTarget</h1><p>Inherit from this class to give your object the ability to dispatch events.
+Note that this class provides event <em>sending</em> behaviour, not event
+receiving behaviour: your object will be able to broadcast events, and other
+objects will be able to listen for those events using goog.events.listen().
+
+<p>The name "EventTarget" reflects the fact that this class implements the
+<a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">
+EventTarget interface</a> as defined by W3C DOM 2/3, with a few differences:
+<ul>
+<li>Event objects do not have to implement the Event interface. An object
+is treated as an event object if it has a 'type' property.
+<li>You can use a plain string instead of an event object; an event-like
+object will be created with the 'type' set to the string value.
+</ul>
+
+<p>Unless propagation is stopped, an event dispatched by an EventTarget
+will bubble to the parent returned by <code>getParentEventTarget</code>.
+To set the parent, call <code>setParentEventTarget</code> or override
+<code>getParentEventTarget</code> in a subclass. Subclasses that don't
+support changing the parent should override the setter to throw an error.
+
+<p>Example usage:
+<pre>
+var source = new goog.events.EventTarget();
+function handleEvent(event) {
+alert('Type: ' + e.type + '\nTarget: ' + e.target);
+}
+goog.events.listen(source, 'foo', handleEvent);
+...
+source.dispatchEvent({type: 'foo'}); // will call handleEvent
+// or source.dispatchEvent('foo');
+...
+goog.events.unlisten(source, 'foo', handleEvent);
+
+// You can also use the Listener interface:
+var listener = {
+handleEvent: function(event) {
+...
+}
+};
+goog.events.listen(source, 'bar', listener);
+</pre></p>extends <a href="../../goog/Disposable.html">goog.Disposable</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>addEventListener(string type, ?Object handler, boolean= opt_capture, ?Object= opt_handlerScope)</code><br><p class="method-description">Adds an event listener to the event target. The same handler can only be
+added once per the type. Even if you add the same handler multiple times
+using the same type then it will only be called once when the event is
+dispatched.
+
+Supported for legacy but use goog.events.listen(src, type, handler) instead.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dispatchEvent((Object|goog.events.Event|null|string) e) &#8658; boolean</code><br><p class="method-description">Dispatches an event (or event like object) and calls all listeners
+listening for events of this type. The type of the event is decided by the
+type property on the event object.
+
+If any of the listeners returns false OR calls preventDefault then this
+function will return false. If one of the capture listeners calls
+stopPropagation, then the bubble listeners won't fire.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Unattach listeners from this object. Classes that extend EventTarget may
+need to override this method in order to remove references to DOM Elements
+and additional listeners, it should be something like this:
+<pre>
+MyClass.prototype.disposeInternal = function() {
+MyClass.superClass_.disposeInternal.call(this);
+// Dispose logic for MyClass
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getParentEventTarget() &#8658; ?goog.events.EventTarget</code><br><p class="method-description">Returns the parent of this event target to use for bubbling.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>removeEventListener(string type, ?Object handler, boolean= opt_capture, ?Object= opt_handlerScope)</code><br><p class="method-description">Removes an event listener from the event target. The handler must be the
+same object as the one added. If the handler has not been added then
+nothing is done.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setParentEventTarget(?goog.events.EventTarget parent)</code><br><p class="method-description">Sets the parent of this event target to use for bubbling.</p></td></tr></table></body></html>
1  docs/goog/events/Listener.html
View
@@ -0,0 +1 @@
+<!doctype html><html><head><title>goog.events.Listener</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.events.Listener</h1><p>Simple class that stores information about a listener</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>handleEvent(?Object eventObject) &#8658; boolean</code><br><p class="method-description">Calls the internal listener</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>init(?Object listener, ?Function proxy, ?Object src, string type, boolean capture, ?Object= opt_handler)</code><br><p class="method-description">Initializes the listener.</p></td></tr></table></body></html>
1  docs/goog/history/Event.html
View
@@ -0,0 +1 @@
+<!doctype html><html><head><title>goog.history.Event</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.history.Event</h1><p>Event object dispatched after the history state has changed.</p>extends <a href="../../goog/events/Event.html">goog.events.Event</a></body></html>
15 docs/goog/history/Html5History.html
View
@@ -0,0 +1,15 @@
+<!doctype html><html><head><title>goog.history.Html5History</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.history.Html5History</h1><p>An implementation compatible with goog.History that uses the HTML5
+history APIs.</p>extends <a href="../../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Unattach listeners from this object. Classes that extend EventTarget may
+need to override this method in order to remove references to DOM Elements
+and additional listeners, it should be something like this:
+<pre>
+MyClass.prototype.disposeInternal = function() {
+MyClass.superClass_.disposeInternal.call(this);
+// Dispose logic for MyClass
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getPathPrefix() &#8658; string</code><br><p class="method-description">Gets the path prefix.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getToken() &#8658; string</code><br><p class="method-description">Returns the current token.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getUrl_(string token) &#8658; string</code><br><p class="method-description">Gets the URL to set when calling history.pushState</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onHistoryEvent_(?goog.events.BrowserEvent e)</code><br><p class="method-description">Handles history events dispatched by the browser.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>replaceToken(string token, string= opt_title)</code><br><p class="method-description">Replaces the current history state without affecting the rest of the history
+stack.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setEnabled(boolean enable)</code><br><p class="method-description">Starts or stops the History. When enabled, the History object
+will immediately fire an event for the current location. The caller can set
+up event listeners between the call to the constructor and the call to
+setEnabled.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setPathPrefix(string pathPrefix)</code><br><p class="method-description">Sets the path prefix to use if storing tokens in the path. The path
+prefix should start and end with slash.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setToken(string token, string= opt_title)</code><br><p class="method-description">Sets the history state.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setUseFragment(boolean useFragment)</code><br><p class="method-description">Sets whether to use the fragment to store tokens.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isSupported(?Window= opt_win) &#8658; boolean</code><br><p class="method-description">Returns whether Html5History is supported.</p></td></tr></table></body></html>
22 docs/goog/iter.html
View
@@ -0,0 +1,22 @@
+<!doctype html><html><head><title>goog.iter</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.iter</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>chain((goog.iter.Iterator|null|undefined) var_args) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Takes zero or more iterators and returns one iterator that will iterate over
+them in the order chained.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>cycle(!goog.iter.Iterable iterable) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Create an iterator to cycle over the iterable's elements indefinitely.
+For example, ([1, 2, 3]) would return : 1, 2, 3, 1, 2, 3, ...</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dropWhile(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Builds a new iterator that iterates over the original, but skips elements as
+long as a supplied function returns true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>equals(?goog.iter.Iterable iterable1, ?goog.iter.Iterable iterable2) &#8658; boolean</code><br><p class="method-description">Iterates over 2 iterators and returns true if they contain the same sequence
+of elements and have the same length.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>every(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj) &#8658; boolean</code><br><p class="method-description">Goes through the values in the iterator. Calls f for each these and if any of
+them returns false this returns false (without checking the rest). If all
+return true this will return true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>filter(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Calls a function for every element in the iterator, and if the function
+returns true adds the element to a new iterator.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>forEach(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj)</code><br><p class="method-description">Calls a function for each element in the iterator with the element of the
+iterator passed as argument.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>join(?goog.iter.Iterable iterable, string deliminator) &#8658; string</code><br><p class="method-description">Joins the values in a iterator with a delimiter.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>map(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj) &#8658; !goog.iter.Iterator</code><br><p class="method-description">For every element in the iterator call a function and return a new iterator
+with that value.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>nextOrValue(?goog.iter.Iterable iterable, &lt;Any Type&gt; defaultValue) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Advances the iterator to the next position, returning the given default value
+instead of throwing an exception if the iterator has no more entries.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>product((goog.array.ArrayLike|undefined) var_args) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Cartesian product of zero or more sets. Gives an iterator that gives every
+combination of one element chosen from each set. For example,
+([1, 2], [3, 4]) gives ([1, 3], [1, 4], [2, 3], [2, 4]).</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>range(number startOrStop, number= opt_stop, number= opt_step) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Creates a new iterator that returns the values in a range. This function
+can take 1, 2 or 3 arguments:
+<pre>
+range(5) same as range(0, 5, 1)
+range(2, 5) same as range(2, 5, 1)
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>reduce(?goog.iter.Iterable iterable, ?Function f, &lt;Any Type&gt; val, ?Object= opt_obj) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Passes every element of an iterator into a function and accumulates the
+result.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>some(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj) &#8658; boolean</code><br><p class="method-description">Goes through the values in the iterator. Calls f for each these and if any of
+them returns true, this returns true (without checking the rest). If all
+return false this will return false.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>takeWhile(?goog.iter.Iterable iterable, ?Function f, ?Object= opt_obj) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Builds a new iterator that iterates over the original, but only as long as a
+supplied function returns true.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toArray(?goog.iter.Iterable iterable) &#8658; !Array</code><br><p class="method-description">Converts the iterator to an array</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toIterator(?goog.iter.Iterable iterable) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Returns an iterator that knows how to iterate over the values in the object.</p></td></tr></table></body></html>
7 docs/goog/iter/Iterator.html
View
@@ -0,0 +1,7 @@
+<!doctype html><html><head><title>goog.iter.Iterator</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.iter.Iterator</h1><p>Class/interface for iterators. An iterator needs to implement a {@code next}
+method and it needs to throw a {@code goog.iter.StopIteration} when the
+iteration passes beyond the end. Iterators have no {@code hasNext} method.
+It is recommended to always use the helper functions to iterate over the
+iterator or in case you are only targeting JavaScript 1.7 for in loops.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>__iterator__(boolean= opt_keys) &#8658; !goog.iter.Iterator</code><br><p class="method-description">Returns the {@code Iterator} object itself. This is used to implement
+the iterator protocol in JavaScript 1.7</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>next() &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Returns the next value of the iteration. This will throw the object
+{@see goog.iter#StopIteration} when the iteration passes the end.</p></td></tr></table></body></html>
7 docs/goog/json.html
View
@@ -0,0 +1,7 @@
+<!doctype html><html><head><title>goog.json</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Library goog.json</h1><table class="method-list"><tr><td colspan="2">Function Summary</td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>isValid_(string s) &#8658; boolean</code><br><p class="method-description">Tests if a string is an invalid JSON string. This only ensures that we are
+not using any invalid characters</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>parse(&lt;Any Type&gt; s) &#8658; ?Object</code><br><p class="method-description">Parses a JSON string and returns the result. This throws an exception if
+the string is an invalid JSON string.
+
+Note that this is very slow on large strings. If you trust the source of
+the string then you should use unsafeParse instead.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>serialize(&lt;Any Type&gt; object, ?goog.json.Replacer= opt_replacer) &#8658; string</code><br><p class="method-description">Serializes an object or a value to a JSON string.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unsafeParse(string s) &#8658; ?Object</code><br><p class="method-description">Parses a JSON string and returns the result. This uses eval so it is open
+to security issues and it should only be used if you trust the source.</p></td></tr></table></body></html>
1  docs/goog/json/Serializer.html
View
@@ -0,0 +1 @@
+<!doctype html><html><head><title>goog.json.Serializer</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.json.Serializer</h1><p>Class that is used to serialize JSON objects to a string.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>serialize(&lt;Any Type&gt; object) &#8658; string</code><br><p class="method-description">Serializes an object or a value to a JSON string.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>serializeArray_(?Array arr, ?Array sb)</code><br><p class="method-description">Serializes an array to a JSON string</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>serializeNumber_(number n, ?Array sb)</code><br><p class="method-description">Serializes a number to a JSON string</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>serializeObject_(?Object obj, ?Array sb)</code><br><p class="method-description">Serializes an object to a JSON string</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>serializeString_(string s, ?Array sb)</code><br><p class="method-description">Serializes a string to a JSON string</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>serialize_(&lt;Any Type&gt; object, ?Array sb)</code><br><p class="method-description">Serializes a generic value to a JSON string</p></td></tr></table></body></html>
6 docs/goog/math/Box.html
View
@@ -0,0 +1,6 @@
+<!doctype html><html><head><title>goog.math.Box</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.math.Box</h1><p>Class for representing a box. A box is specified as a top, right, bottom,
+and left. A box is useful for representing margins and padding.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone() &#8658; !goog.math.Box</code><br><p class="method-description">Creates a copy of the box with the same dimensions.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>contains((goog.math.Box|goog.math.Coordinate|null) other) &#8658; boolean</code><br><p class="method-description">Returns whether the box contains a coordinate or another box.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>expand((goog.math.Box|null|number) top, number= opt_right, number= opt_bottom, number= opt_left) &#8658; !goog.math.Box</code><br><p class="method-description">Expands box with the given margins.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>expandToInclude(?goog.math.Box box)</code><br><p class="method-description">Expand this box to include another box.
+NOTE(user): This is used in code that needs to be very fast, please don't
+add functionality to this function at the expense of speed (variable
+arguments, accepting multiple argument types, etc).</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br><p class="method-description">Returns a nice string representing the box.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>boundingBox((goog.math.Coordinate|null|undefined) var_args) &#8658; !goog.math.Box</code><br><p class="method-description">Creates a Box by bounding a collection of goog.math.Coordinate objects</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>contains(?goog.math.Box box, (goog.math.Box|goog.math.Coordinate|null) other) &#8658; boolean</code><br><p class="method-description">Returns whether a box contains a coordinate or another box.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>distance(?goog.math.Box box, ?goog.math.Coordinate coord) &#8658; number</code><br><p class="method-description">Returns the distance between a coordinate and the nearest corner/side of a
+box. Returns zero if the coordinate is inside the box.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>equals(?goog.math.Box a, ?goog.math.Box b) &#8658; boolean</code><br><p class="method-description">Compares boxes for equality.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>intersects(?goog.math.Box a, ?goog.math.Box b) &#8658; boolean</code><br><p class="method-description">Returns whether two boxes intersect.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>intersectsWithPadding(?goog.math.Box a, ?goog.math.Box b, number padding) &#8658; boolean</code><br><p class="method-description">Returns whether two boxes would intersect with additional padding.</p></td></tr></table></body></html>
7 docs/goog/math/Coordinate.html
View
@@ -0,0 +1,7 @@
+<!doctype html><html><head><title>goog.math.Coordinate</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.math.Coordinate</h1><p>Class for representing coordinates and positions.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone() &#8658; !goog.math.Coordinate</code><br><p class="method-description">Returns a new copy of the coordinate.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br><p class="method-description">Returns a nice string representing the coordinate.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>difference(!goog.math.Coordinate a, !goog.math.Coordinate b) &#8658; !goog.math.Coordinate</code><br><p class="method-description">Returns the difference between two coordinates as a new
+goog.math.Coordinate.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>distance(!goog.math.Coordinate a, !goog.math.Coordinate b) &#8658; number</code><br><p class="method-description">Returns the distance between two coordinates.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>equals(?goog.math.Coordinate a, ?goog.math.Coordinate b) &#8658; boolean</code><br><p class="method-description">Compares coordinates for equality.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>squaredDistance(!goog.math.Coordinate a, !goog.math.Coordinate b) &#8658; number</code><br><p class="method-description">Returns the squared distance between two coordinates. Squared distances can
+be used for comparisons when the actual value is not required.
+
+Performance note: eliminating the square root is an optimization often used
+in lower-level languages, but the speed difference is not nearly as
+pronounced in JavaScript (only a few percent.)</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>sum(!goog.math.Coordinate a, !goog.math.Coordinate b) &#8658; !goog.math.Coordinate</code><br><p class="method-description">Returns the sum of two coordinates as a new goog.math.Coordinate.</p></td></tr></table></body></html>
13 docs/goog/math/Rect.html
View
@@ -0,0 +1,13 @@
+<!doctype html><html><head><title>goog.math.Rect</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.math.Rect</h1><p>Class for representing rectangular regions.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>boundingRect(?goog.math.Rect rect)</code><br><p class="method-description">Expand this rectangle to also include the area of the given rectangle.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone() &#8658; !goog.math.Rect</code><br><p class="method-description">Returns a new copy of the rectangle.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>contains((goog.math.Coordinate|goog.math.Rect|null) another) &#8658; boolean</code><br><p class="method-description">Tests whether this rectangle entirely contains another rectangle or
+coordinate.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>difference(?goog.math.Rect rect) &#8658; !Array</code><br><p class="method-description">Computes the difference regions between this rectangle and {@code rect}. The
+return value is an array of 0 to 4 rectangles defining the remaining regions
+of this rectangle after the other has been subtracted.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getSize() &#8658; !goog.math.Size</code><br><p class="method-description">Returns the size of this rectangle.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>intersection(?goog.math.Rect rect) &#8658; boolean</code><br><p class="method-description">Computes the intersection of this rectangle and the rectangle parameter. If
+there is no intersection, returns false and leaves this rectangle as is.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>intersects(?goog.math.Rect rect) &#8658; boolean</code><br><p class="method-description">Returns whether a rectangle intersects this rectangle.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toBox() &#8658; !goog.math.Box</code><br><p class="method-description">Returns a new Box object with the same position and dimensions as this
+rectangle.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br><p class="method-description">Returns a nice string representing size and dimensions of rectangle.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>boundingRect(?goog.math.Rect a, ?goog.math.Rect b) &#8658; ?goog.math.Rect</code><br><p class="method-description">Returns a new rectangle which completely contains both input rectangles.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createFromBox(?goog.math.Box box) &#8658; !goog.math.Rect</code><br><p class="method-description">Creates a new Rect object with the same position and dimensions as a given
+Box. Note that this is only the inverse of toBox if left/top are defined.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>difference(?goog.math.Rect a, ?goog.math.Rect b) &#8658; !Array</code><br><p class="method-description">Computes the difference regions between two rectangles. The return value is
+an array of 0 to 4 rectangles defining the remaining regions of the first
+rectangle after the second has been subtracted.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>equals(?goog.math.Rect a, ?goog.math.Rect b) &#8658; boolean</code><br><p class="method-description">Compares rectangles for equality.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>intersection(?goog.math.Rect a, ?goog.math.Rect b) &#8658; ?goog.math.Rect</code><br><p class="method-description">Returns the intersection of two rectangles. Two rectangles intersect if they
+touch at all, for example, two zero width and height rectangles would
+intersect if they had the same top and left.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>intersects(?goog.math.Rect a, ?goog.math.Rect b) &#8658; boolean</code><br><p class="method-description">Returns whether two rectangles intersect. Two rectangles intersect if they
+touch at all, for example, two zero width and height rectangles would
+intersect if they had the same top and left.</p></td></tr></table></body></html>
5 docs/goog/math/Size.html
View
@@ -0,0 +1,5 @@
+<!doctype html><html><head><title>goog.math.Size</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.math.Size</h1><p>Class for representing sizes consisting of a width and height. Undefined
+width and height support is deprecated and results in compiler warning.</p><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>area() &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>aspectRatio() &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>ceil() &#8658; !goog.math.Size</code><br><p class="method-description">Clamps the width and height parameters upward to integer values.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clone() &#8658; !goog.math.Size</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fitsInside(!goog.math.Size target) &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>floor() &#8658; !goog.math.Size</code><br><p class="method-description">Clamps the width and height parameters downward to integer values.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLongest() &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getShortest() &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isEmpty() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>perimeter() &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>round() &#8658; !goog.math.Size</code><br><p class="method-description">Rounds the width and height parameters to integer values.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>scale(number s) &#8658; !goog.math.Size</code><br><p class="method-description">Scales the size uniformly by a factor.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>scaleToFit(!goog.math.Size target) &#8658; !goog.math.Size</code><br><p class="method-description">Uniformly scales the size to fit inside the dimensions of a given size. The
+original aspect ratio will be preserved.
+
+This function assumes that both Sizes contain strictly positive dimensions.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toString() &#8658; string</code><br><p class="method-description">Returns a nice string representing size.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>equals(?goog.math.Size a, ?goog.math.Size b) &#8658; boolean</code><br><p class="method-description">Compares sizes for equality.</p></td></tr></table></body></html>
3  docs/goog/net/DefaultXmlHttpFactory.html
View
@@ -0,0 +1,3 @@
+<!doctype html><html><head><title>goog.net.DefaultXmlHttpFactory</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.net.DefaultXmlHttpFactory</h1><p>Default factory to use when creating xhr objects. You probably shouldn't be
+instantiating this directly, but rather using it via goog.net.XmlHttp.</p>extends <a href="../../goog/net/XmlHttpFactory.html">goog.net.XmlHttpFactory</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createInstance() &#8658; (GearsHttpRequest|XMLHttpRequest)</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>getProgId_() &#8658; string</code><br><p class="method-description">Initialize the private state used by other functions.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>internalGetOptions() &#8658; ?Object</code><br><p class="method-description">Override this method in subclasses to preserve the caching offered by
+getOptions().</p></td></tr></table></body></html>
3  docs/goog/net/WrapperXmlHttpFactory.html
View
@@ -0,0 +1,3 @@
+<!doctype html><html><head><title>goog.net.WrapperXmlHttpFactory</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.net.WrapperXmlHttpFactory</h1><p>An xhr factory subclass which can be constructed using two factory methods.
+This exists partly to allow the preservation of goog.net.XmlHttp.setFactory()
+with an unchanged signature.</p>extends <a href="../../goog/net/XmlHttpFactory.html">goog.net.XmlHttpFactory</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createInstance() &#8658; (GearsHttpRequest|XMLHttpRequest)</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getOptions() &#8658; ?Object</code><br></td></tr></table></body></html>
73 docs/goog/net/XhrIo.html
View
@@ -0,0 +1,73 @@
+<!doctype html><html><head><title>goog.net.XhrIo</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.net.XhrIo</h1><p>Basic class for handling XMLHttpRequests.</p>extends <a href="../../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>abort(?goog.net.ErrorCode= opt_failureCode)</code><br><p class="method-description">Abort the current XMLHttpRequest</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>cleanUpXhr_(boolean= opt_fromDispose)</code><br><p class="method-description">Remove the listener to protect against leaks, and nullify the XMLHttpRequest
+object.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>createXhr() &#8658; (GearsHttpRequest|XMLHttpRequest|null)</code><br><p class="method-description">Creates a new XHR object.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>dispatchErrors_()</code><br><p class="method-description">Dispatches COMPLETE and ERROR in case of an error. This ensures that we do
+not dispatch multiple error events.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Nullifies all callbacks to reduce risks of leaks.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>error_(?goog.net.ErrorCode errorCode, ?Error err)</code><br><p class="method-description">Something errorred, so inactivate, fire error callback and clean up</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>formatMsg_(string msg) &#8658; string</code><br><p class="method-description">Adds the last method, status and URI to the message. This is used to add
+this information to the logging calls.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getAllResponseHeaders() &#8658; string</code><br><p class="method-description">Gets the text of all the headers in the response.
+Will only return correct result when called from the context of a callback
+and the request has completed.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLastError() &#8658; string</code><br><p class="method-description">Get the last error message</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLastErrorCode() &#8658; ?goog.net.ErrorCode</code><br><p class="method-description">Get the last error message</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLastUri() &#8658; string</code><br><p class="method-description">Get the last Uri that was requested</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getReadyState() &#8658; ?goog.net.XmlHttp.ReadyState</code><br><p class="method-description">Get the readystate from the Xhr object
+Will only return correct result when called from the context of a callback</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getResponse() &#8658; &lt;Any Type&gt;</code><br><p class="method-description">Get the response as the type specificed by {@link #setResponseType}. At time
+of writing, this is only directly supported in very recent versions of WebKit
+(10.0.612.1 dev and later). If the field is not supported directly, we will
+try to emulate it.
+
+Emulating the response means following the rules laid out at
+http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-response-attribute.
+
+On browsers with no support for this (Chrome < 10, Firefox < 4, etc), only
+response types of DEFAULT or TEXT may be used, and the response returned will
+be the text response.
+
+On browsers with Mozilla's draft support for array buffers (Firefox 4, 5),
+only response types of DEFAULT, TEXT, and ARRAY_BUFFER may be used, and the
+response returned will be either the text response or the Mozilla
+implementation of the array buffer response.
+
+On browsers will full support, any valid response type supported by the
+browser may be used, and the response provided by the browser will be
+returned.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getResponseHeader(string key) &#8658; (string|undefined)</code><br><p class="method-description">Get the value of the response-header with the given name from the Xhr object
+Will only return correct result when called from the context of a callback
+and the request has completed</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getResponseJson(string= opt_xssiPrefix) &#8658; (Object|null|undefined)</code><br><p class="method-description">Get the response and evaluates it as JSON from the Xhr object
+Will only return correct result when called from the context of a callback</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getResponseText() &#8658; string</code><br><p class="method-description">Get the response text from the Xhr object
+Will only return correct result when called from the context of a callback.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getResponseType() &#8658; ?goog.net.XhrIo.ResponseType</code><br><p class="method-description">Gets the desired type for the response.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getResponseXml() &#8658; ?Document</code><br><p class="method-description">Get the response XML from the Xhr object
+Will only return correct result when called from the context of a callback.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getStatus() &#8658; number</code><br><p class="method-description">Get the status from the Xhr object
+Will only return correct result when called from the context of a callback</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getStatusText() &#8658; string</code><br><p class="method-description">Get the status text from the Xhr object
+Will only return correct result when called from the context of a callback</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getTimeoutInterval() &#8658; number</code><br><p class="method-description">Returns the number of milliseconds after which an incomplete request will be
+aborted, or 0 if no timeout is set.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getWithCredentials() &#8658; boolean</code><br><p class="method-description">Gets whether a "credentialed" request is to be sent.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isActive() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isComplete() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>isLastUriEffectiveSchemeHttp_() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>isSuccess() &#8658; boolean</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onReadyStateChangeEntryPoint_()</code><br><p class="method-description">Used to protect the onreadystatechange handler entry point. Necessary
+as {#onReadyStateChange_} maybe called from within send or abort, this
+method is only called when {#onReadyStateChange_} is called as an
+entry point.
+{@see #protectEntryPoints}</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onReadyStateChangeHelper_()</code><br><p class="method-description">Helper for {@link #onReadyStateChange_}. This is used so that
+entry point calls to {@link #onReadyStateChange_} can be routed through
+{@link #onReadyStateChangeEntryPoint_}.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onReadyStateChange_()</code><br><p class="method-description">Internal handler for the XHR object's readystatechange event. This method
+checks the status and the readystate and fires the correct callbacks.
+If the request has ended, the handlers are cleaned up and the XHR object is
+nullified.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>send((goog.Uri|null|string) url, string= opt_method, (GearsBlob|null|string=) opt_content, (Object|goog.structs.Map|null=) opt_headers)</code><br><p class="method-description">Instance send that actually uses XMLHttpRequest to make a server call.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setResponseType(?goog.net.XhrIo.ResponseType type)</code><br><p class="method-description">Sets the desired type for the response. At time of writing, this is only
+supported in very recent versions of WebKit (10.0.612.1 dev and later).
+
+If this is used, the response may only be accessed via {@link #getResponse}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setTimeoutInterval(number ms)</code><br><p class="method-description">Sets the number of milliseconds after which an incomplete request will be
+aborted and a {@link goog.net.EventType.TIMEOUT} event raised; 0 means no
+timeout is set.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setWithCredentials(boolean withCredentials)</code><br><p class="method-description">Sets whether a "credentialed" request that is aware of cookie and
+authentication information should be made. This option is only supported by
+browsers that support HTTP Access Control. As of this writing, this option
+is not supported in IE.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>timeout_()</code><br><p class="method-description">The request didn't complete after {@link goog.net.XhrIo#timeoutInterval_}
+milliseconds; raises a {@link goog.net.EventType.TIMEOUT} event and aborts
+the request.</p></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>cleanup()</code><br><p class="method-description">Disposes all non-disposed instances of goog.net.XhrIo created by
+{@link goog.net.XhrIo.send}.
+{@link goog.net.XhrIo.send} cleans up the goog.net.XhrIo instance
+it creates when the request completes or fails. However, if
+the request never completes, then the goog.net.XhrIo is not disposed.
+This can occur if the window is unloaded before the request completes.
+We could have {@link goog.net.XhrIo.send} return the goog.net.XhrIo
+it creates and make the client of {@link goog.net.XhrIo.send} be
+responsible for disposing it in this case. However, this makes things
+significantly more complicated for the client, and the whole point
+of {@link goog.net.XhrIo.send} is that it's simple and easy to use.
+Clients of {@link goog.net.XhrIo.send} should call
+{@link goog.net.XhrIo.cleanup} when doing final
+cleanup on window unload.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>cleanupSend_(?goog.net.XhrIo XhrIo)</code><br><p class="method-description">Disposes of the specified goog.net.XhrIo created by
+{@link goog.net.XhrIo.send} and removes it from
+{@link goog.net.XhrIo.pendingStaticSendInstances_}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>protectEntryPoints(?goog.debug.ErrorHandler errorHandler)</code><br><p class="method-description">Installs exception protection for all entry point introduced by
+goog.net.XhrIo instances which are not protected by
+{@link goog.debug.ErrorHandler#protectWindowSetTimeout},
+{@link goog.debug.ErrorHandler#protectWindowSetInterval}, or
+{@link goog.events.protectBrowserEventEntryPoint}.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>send((goog.Uri|null|string) url, ?Function= opt_callback, string= opt_method, (GearsBlob|null|string=) opt_content, (Object|goog.structs.Map|null=) opt_headers, number= opt_timeoutInterval)</code><br><p class="method-description">Static send that creates a short lived instance of XhrIo to send the
+request.</p></td></tr></table></body></html>
2  docs/goog/net/XhrIoPool.html
View
@@ -0,0 +1,2 @@
+<!doctype html><html><head><title>goog.net.XhrIoPool</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.net.XhrIoPool</h1><p>A pool of XhrIo objects.</p>extends <a href="../../goog/structs/PriorityPool.html">goog.structs.PriorityPool</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>createObject() &#8658; ?goog.net.XhrIo</code><br><p class="method-description">Creates an instance of an XhrIo object to use in the pool.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>disposeObject(?goog.net.XhrIo obj)</code><br><p class="method-description">Should be overridden to dispose of an object, default implementation is to
+remove all its members which should render it useless.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>objectCanBeReused(?goog.net.XhrIo obj) &#8658; boolean</code><br><p class="method-description">Determine if an object has become unusable and should not be used.</p></td></tr></table></body></html>
21 docs/goog/net/XhrManager.html
View
@@ -0,0 +1,21 @@
+<!doctype html><html><head><title>goog.net.XhrManager</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class goog.net.XhrManager</h1><p>A manager of an XhrIoPool.</p>extends <a href="../../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>abort(string id, boolean= opt_force)</code><br><p class="method-description">Aborts the request associated with id.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>addXhrListener_(?goog.net.XhrIo xhrIo, ?Function func, (Array.&lt;string&gt;|null|string=) opt_types)</code><br><p class="method-description">Adds a listener for XHR events on an XhrIo object.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Unattach listeners from this object. Classes that extend EventTarget may
+need to override this method in order to remove references to DOM Elements
+and additional listeners, it should be something like this:
+<pre>
+MyClass.prototype.disposeInternal = function() {
+MyClass.superClass_.disposeInternal.call(this);
+// Dispose logic for MyClass
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getOutstandingCount() &#8658; number</code><br><p class="method-description">Returns the number of reuqests either in flight, or waiting to be sent.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleAbort_(string id, ?goog.net.XhrIo xhrIo)</code><br><p class="method-description">Handles the abort of an underlying XhrIo object.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleAvailableXhr_(string id, ?goog.net.XhrIo xhrIo)</code><br><p class="method-description">Handles when an XhrIo object becomes available. Sets up the events, fires
+the READY event, and starts the process to send the request.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleComplete_(string id, ?goog.net.XhrIo xhrIo, ?goog.events.Event e) &#8658; ?Object</code><br><p class="method-description">Handles the complete of a request. Dispatches the COMPLETE event and sets the
+the request as completed if the request has succeeded, or is done retrying.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleError_(string id, ?goog.net.XhrIo xhrIo)</code><br><p class="method-description">Handles the error of a request. If the request has not reach its maximum
+number of retries, then it lets the request retry naturally (will let the
+request hit the READY state). Else, it dispatches the ERROR event.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleEvent_(string id, ?goog.events.Event e) &#8658; ?Object</code><br><p class="method-description">Handles all events fired by the XhrIo object for a given request.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleSuccess_(string id, ?goog.net.XhrIo xhrIo)</code><br><p class="method-description">Handles the success of a request. Dispatches the SUCCESS event and sets the
+the request as completed.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>removeXhrListener_(?goog.net.XhrIo xhrIo, ?Function func, (Array.&lt;string&gt;|null|string=) opt_types)</code><br><p class="method-description">Remove listeners for XHR events on an XhrIo object.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>retry_(string id, ?goog.net.XhrIo xhrIo)</code><br><p class="method-description">Attempts to retry the given request. If the request has already attempted
+the maximum number of retries, then it removes the request and releases
+the XhrIo object back into the pool.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>send(string id, string url, string= opt_method, string= opt_content, (Object|goog.structs.Map|null=) opt_headers, &lt;Any Type&gt; opt_priority, ?Function= opt_callback, number= opt_maxRetries) &#8658; ?goog.net.XhrManager.Request</code><br><p class="method-description">Registers the given request to be sent. Throws an error if a request
+already exists with the given ID.
+NOTE: It is not sent immediately. It is queued and will be sent when an
+XhrIo object becomes available, taking into account the request's
+priority.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setTimeoutInterval(number ms)</code><br><p class="method-description">Sets the number of milliseconds after which an incomplete request will be
+aborted. Zero means no timeout is set.</p></td></tr></table></body></html>
21 docs/goog/net/XhrManager/Event.html
View
@@ -0,0 +1,21 @@
+<!doctype html><html><head><title>goog.net.XhrManager.Event</title><link href="../../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../../index.html">Home</a><h1>Class goog.net.XhrManager.Event</h1><p>An event dispatched by XhrManager.</p>extends <a href="../../../goog/events/Event.html">goog.events.Event</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Deletes or nulls out any references to COM objects, DOM nodes, or other
+disposable objects. Classes that extend {@code goog.Disposable} should
+override this method.
+Not reentrant. To avoid calling it twice, it must only be called from the
+subclass' {@code disposeInternal} method. Everywhere else the public
+{@code dispose} method must be used.
+For example:
+<pre>
+mypackage.MyClass = function() {
+goog.base(this);
+// Constructor logic specific to MyClass.
+...
+};
+goog.inherits(mypackage.MyClass, goog.Disposable);
+
+mypackage.MyClass.prototype.disposeInternal = function() {
+goog.base(this, 'disposeInternal');
+// Dispose logic specific to MyClass.
+...
+};
+</pre></p></td></tr></table></body></html>
22 docs/goog/net/XhrManager/Request.html
View
@@ -0,0 +1,22 @@
+<!doctype html><html><head><title>goog.net.XhrManager.Request</title><link href="../../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../../index.html">Home</a><h1>Class goog.net.XhrManager.Request</h1><p>An encapsulation of everything needed to make a Xhr request.
+NOTE: This is used internal to the XhrManager.</p>extends <a href="../../../goog/Disposable.html">goog.Disposable</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Deletes or nulls out any references to COM objects, DOM nodes, or other
+disposable objects. Classes that extend {@code goog.Disposable} should
+override this method.
+Not reentrant. To avoid calling it twice, it must only be called from the
+subclass' {@code disposeInternal} method. Everywhere else the public
+{@code dispose} method must be used.
+For example:
+<pre>
+mypackage.MyClass = function() {
+goog.base(this);
+// Constructor logic specific to MyClass.
+...
+};
+goog.inherits(mypackage.MyClass, goog.Disposable);
+
+mypackage.MyClass.prototype.disposeInternal = function() {
+goog.base(this, 'disposeInternal');
+// Dispose logic specific to MyClass.
+...
+};
+</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getAborted() &#8658; boolean</code><br><p class="method-description">Gets the aborted status.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getAttemptCount() &#8658; number</code><br><p class="method-description">Gets the number of attempts so far.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getCompleteCallback() &#8658; (Function|null|undefined)</code><br><p class="method-description">Gets the callback for when the request is complete.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getCompleted() &#8658; boolean</code><br><p class="method-description">Gets the completed status.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getContent() &#8658; (string|undefined)</code><br><p class="method-description">Gets the post data.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getHeaders() &#8658; (Object|goog.structs.Map|null)</code><br><p class="method-description">Gets the map of headers.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getMaxRetries() &#8658; number</code><br><p class="method-description">Gets the maximum number of times the request should be retried.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getMethod() &#8658; string</code><br><p class="method-description">Gets the send method.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getUrl() &#8658; string</code><br><p class="method-description">Gets the uri.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getXhrEventCallback() &#8658; (Function|null|undefined)</code><br><p class="method-description">Gets the callback attached to the events of the XhrIo object.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>hasReachedMaxRetries() &#8658; boolean</code><br><p class="method-description">Returns whether the request has reached the maximum number of retries.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>increaseAttemptCount()</code><br><p class="method-description">Increases the number of attempts so far.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setAborted(boolean aborted)</code><br><p class="method-description">Sets the aborted status.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setCompleted(boolean complete)</code><br><p class="method-description">Sets the