{
    "project": {
        "name": "Stay API",
        "description": "Stay is a small but effective library for the creation of dynamic xhr-driven web applications.",
        "version": "0.1.6",
        "url": "https://github.com/vanruesc/stay"
    },
    "files": {
        "src\\stay.js": {
            "name": "src\\stay.js",
            "modules": {},
            "classes": {
                "Stay": 1
            },
            "fors": {},
            "namespaces": {}
        }
    },
    "modules": {},
    "classes": {
        "Stay": {
            "name": "Stay",
            "shortname": "Stay",
            "classitems": [],
            "plugins": [],
            "extensions": [],
            "plugin_for": [],
            "extension_for": [],
            "file": "src\\stay.js",
            "line": 23,
            "description": "The Stay XHR System.\n\nUsed for requesting page content asynchronously\nwhile staying on the same page.\n\nEach request can have a hard timeout to avoid endless\nloading times that are often deemed to fail anyways.",
            "is_constructor": 1,
            "extends": "EventDispatcher",
            "throws": {
                "description": "An error is thrown if asynchronous requests are not supported.",
                "type": "Error"
            },
            "params": [
                {
                    "name": "options",
                    "description": "- The options.",
                    "type": "Object",
                    "optional": true,
                    "props": [
                        {
                            "name": "stderr",
                            "description": "- The standard output for error messages.",
                            "type": "Array",
                            "optional": true,
                            "optdefault": "console"
                        },
                        {
                            "name": "infix",
                            "description": "- The special url pattern infix for the asynchronous content requests.",
                            "type": "String",
                            "optional": true,
                            "optdefault": "\"/json\""
                        },
                        {
                            "name": "timeoutPost",
                            "description": "- Hard timeout for POST. 0 means no timeout.",
                            "type": "Number",
                            "optional": true,
                            "optdefault": "60000"
                        },
                        {
                            "name": "timeoutGet",
                            "description": "- Hard timeout for GET. 0 means no timeout.",
                            "type": "Number",
                            "optional": true,
                            "optdefault": "5000"
                        },
                        {
                            "name": "autoUpdate",
                            "description": "- Whether Stay should automatically update the page content.",
                            "type": "Boolean",
                            "optional": true,
                            "optdefault": "true"
                        }
                    ]
                }
            ]
        }
    },
    "elements": {},
    "classitems": [
        {
            "file": "src\\stay.js",
            "line": 3,
            "description": "Uses the native browser parsing mechanism\nto retrieve the pathname of a url.",
            "itemtype": "method",
            "name": "getPathname",
            "access": "private",
            "tagname": "",
            "static": 1,
            "params": [
                {
                    "name": "url",
                    "description": "- The URL to parse.",
                    "type": "String"
                }
            ],
            "return": {
                "description": "The pathname.",
                "type": "String"
            },
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 50,
            "description": "Regular expression to check if a url is local.",
            "itemtype": "property",
            "name": "local",
            "type": "RegExp",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 60,
            "description": "Regular expressions for excluded URIs.",
            "itemtype": "property",
            "name": "exclusions",
            "type": "Array",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 69,
            "description": "The standard error output.\nThis string represents the ID of the target \nDOM container which should hold any error\nmessages. If none is specified, errors will \nbe logged to the console. A request timeout\nis considered an error, for example.",
            "itemtype": "property",
            "name": "stderr",
            "type": "String",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 83,
            "description": "The infix to use for the asynchronous requests.",
            "itemtype": "property",
            "name": "infix",
            "type": "String",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 92,
            "description": "POST timeout.",
            "itemtype": "property",
            "name": "timeoutPost",
            "type": "Number",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 101,
            "description": "GET timeout.",
            "itemtype": "property",
            "name": "timeoutGet",
            "type": "Number",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 110,
            "description": "Auto update flag.",
            "itemtype": "property",
            "name": "autoUpdate",
            "type": "Boolean",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 130,
            "description": "Lock flag.",
            "itemtype": "property",
            "name": "locked",
            "type": "Boolean",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 140,
            "description": "Back-forward flag.",
            "itemtype": "property",
            "name": "backForward",
            "type": "Boolean",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 150,
            "description": "The current absolute path.",
            "itemtype": "property",
            "name": "absolutePath",
            "type": "String",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 160,
            "description": "The current history state.\nCan't rely on history.state right now.",
            "itemtype": "property",
            "name": "historyState",
            "type": "Object",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 171,
            "description": "A list of references to the response field DOM elements.",
            "itemtype": "property",
            "name": "containers",
            "type": "Array",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 181,
            "description": "A container which is filled by setting its innerHTML.\nThe created DOM elements are taken from this container\nand appended to the response fields.",
            "itemtype": "property",
            "name": "intermediateContainer",
            "type": "HTMLDivElement",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 193,
            "description": "A list of navigation listeners for unbinding.",
            "itemtype": "property",
            "name": "navigationListeners",
            "type": "Array",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 203,
            "description": "Signalises that a page navigation has started.",
            "itemtype": "event",
            "name": "navigate",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 211,
            "description": "Returns the parsed server response.",
            "itemtype": "event",
            "name": "receive",
            "params": [
                {
                    "name": "response",
                    "description": "- The server response, ready to be inserted into the respective response fields.",
                    "type": "Object"
                },
                {
                    "name": "status",
                    "description": "- The status of the xhr response.",
                    "type": "Number"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 221,
            "description": "Signalises that a page update has finished.",
            "itemtype": "event",
            "name": "load",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 229,
            "description": "The internal XMLHttpRequest instance.",
            "itemtype": "property",
            "name": "xhr",
            "type": "XMLHttpRequest",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 247,
            "description": "Returns XmlHttpRequest errors.",
            "itemtype": "event",
            "name": "error",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 255,
            "description": "Triggers the internal response handler.",
            "itemtype": "method",
            "name": "handleResponse",
            "access": "private",
            "tagname": "",
            "params": [
                {
                    "name": "event",
                    "description": "- The event.",
                    "type": "Object"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 265,
            "description": "Handles xhr timeouts, ignores the event object.",
            "itemtype": "method",
            "name": "handleTimeout",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 293,
            "description": "Support browser functionality \"back\" and \"forward\".\nDepends on the boolean variable \"locked\" in order to\ndetermine whether this navigation should be executed.\nThe \"backForward\" flag tells the system that the next\nstate mustn't be pushed.",
            "itemtype": "method",
            "name": "handleBackForward",
            "access": "private",
            "tagname": "",
            "params": [
                {
                    "name": "event",
                    "description": "- The event.",
                    "type": "Object"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 316,
            "description": "This function is bound to all links and forms\nand executes the desired page navigation on left clicks.",
            "itemtype": "method",
            "name": "_switchPage",
            "access": "private",
            "tagname": "",
            "params": [
                {
                    "name": "event",
                    "description": "- The event.",
                    "type": "Event"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 376,
            "description": "Navigates to the next target uri.",
            "itemtype": "method",
            "name": "_navigate",
            "access": "private",
            "tagname": "",
            "params": [
                {
                    "name": "firingElement",
                    "description": "- The element on which the click event occured.",
                    "type": "HTMLElement"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 438,
            "description": "Updates the containers with the new data.",
            "itemtype": "method",
            "name": "_updateView",
            "access": "private",
            "tagname": "",
            "params": [
                {
                    "name": "response",
                    "description": "- The properties of the response object correspond with the target DOM containers.",
                    "type": "Object"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 520,
            "description": "If you want to destroy Stay, you should call this method\nbefore you drop your reference to the Stay instance.",
            "itemtype": "method",
            "name": "unbindListeners",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 541,
            "description": "Binds event listeners to all links and forms.\nThis method is combined with the cleanup and basically refreshes \nthe navigation listeners.",
            "itemtype": "method",
            "name": "_updateListeners",
            "access": "private",
            "tagname": "",
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 604,
            "description": "Updates the view, the navigation listeners and the history state.\nAlso emits an event to signilise that the page has been loaded.\n\nThe update function needs to be called after each navigation in \norder to unlock the system! This happens by default, but that\nbehaviour can be disabled. It is then the responsibility of the\nprogrammer to call stay.update(response) with the response data\nprovided by the \"receive\" event.",
            "itemtype": "method",
            "name": "update",
            "params": [
                {
                    "name": "response",
                    "description": "- The response to display.",
                    "type": "Object"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 685,
            "description": "This function acts when the xhr object changes its readyState.\nThe response will be a json object or an error page. Anything else will \nbe caught as a json parse exception and announced in stderr.",
            "itemtype": "method",
            "name": "_handleResponse",
            "access": "private",
            "tagname": "",
            "params": [
                {
                    "name": "xhr",
                    "description": "- The xhr object that fired the event.",
                    "type": "XMLHttpRequest"
                }
            ],
            "class": "Stay"
        },
        {
            "file": "src\\stay.js",
            "line": 734,
            "description": "Enumeration of Error Messages.",
            "itemtype": "property",
            "name": "Error",
            "type": "Object",
            "access": "private",
            "tagname": "",
            "static": 1,
            "final": 1,
            "class": "Stay"
        }
    ],
    "warnings": []
}