App

App

Defines the App Mediator
Author:
  • Deux Huit Huit <https://deuxhuithuit.com>
License:
  • MIT
Source:

Namespaces

mediator
callback
components
debug
device
modules
pages

Methods

(static) _callAction(actions, key, data) → {Boolean}

Find and execute the methods that matches with the notify key
Source:
Parameters:
Name Type Description
actions function | Object Object of methods that can be matches with the key's value
key String Action key
data Object Bag of data
Returns:
Type:
Boolean
Callback's result

(static) root() → {String}

Get the root css selector
Source:
Returns:
Type:
String
Root CSS selector

(static) run(rootopt)

Init the app with the given css selector
Source:
Parameters:
Name Type Attributes Description
root String <optional>
CSS selector

Events

page:enter

Properties:
Name Type Description
page object PageObject
Source:
Type:
  • object

page:enter

Properties:
Name Type Description
page Object PageObject
route String Url
Source:
Type:
  • object

page:entering

Properties:
Name Type Description
page object PageObject
route string url
Source:
Type:
  • object

page:entering

Properties:
Name Type Description
page Object PageObject
route String Url
Source:
Type:
  • object

page:leave

Properties:
Name Type Description
page object PageObject
Source:
Type:
  • object

page:leaving

Properties:
Name Type Description
page object PageObject
Source:
Type:
  • object

page:toggleNoPreviousUrl

Properties:
Name Type Description
currentPage object PageObject
Source:
Type:
  • object

pages:failedtoparse

Properties:
Name Type Description
data object
route string
nextPage object PageObject
currentPage object PageObject
Source:
Type:
  • object

pages:loaded

Properties:
Name Type Description
elem jQuery Root element
event Object Request event
url String Request url
Source:
Type:
  • Object

pages:loaded

Properties:
Name Type Description
elem jQuery Loaded content
data String Loaded raw content
url String request url
page Object PageObject
node jQuery Page element
xhr Object Request object instence
status String Status of the request
Source:
Type:
  • Object

pages:loaderror

Properties:
Name Type Description
event Object Request event
url String Request url
Source:
Type:
  • Object

pages:loadfatalerror

Properties:
Name Type Description
event Object Request event
url String Request url
Source:
Type:
  • Object

pages:loading

Properties:
Name Type Description
page Object PageObject
Source:
Type:
  • Object

pages:loadprogress

Properties:
Name Type Description
event Object Request progress event
url String Request url
total Integer Total bytes
loaded Integer Total bytes loaded
percent Integer
Source:
Type:
  • Object

pages:navigateToCurrent

Properties:
Name Type Description
url String Url
isRedirect Boolean PageObject
page Object PageObject
Source:
Type:
  • object

pages:navigateToCurrent

Properties:
Name Type Description
page Object PageObject
route String Request url
Source:
Type:
  • Object

pages:notfound

Properties:
Name Type Description
data String Loaded raw content
url String request url
xhr Object Request object instence
status String Status of the request
Source:
Type:
  • Object

pages:redirected

Offer a bail out door
Properties:
Name Type Description
route String Url
requestedRoute String Url
nextPage Object PageObject
currentPage Object PageObject
redirectedPage Object PageObject
Source:
Type:
  • Object

pages:requestBeginPageTransition

Properties:
Name Type Description
currentPage Object PageObject
nextPage Object PageObject
route String Request url
Source:
Type:
  • Object

pages:requestBeginPageTransition

Start new transition
Properties:
Name Type Description
route String Url
isRedirect Boolean PageObject
nextPage Object PageObject
currentPage Object PageObject
Source:
Type:
  • object

pages:requestCancelPageTransition

Cancel current transition
Properties:
Name Type Description
route String Url
nextPage Object PageObject
currentPage Object PageObject
Source:
Type:
  • Object

pages:requestPageTransition

Properties:
Name Type Description
pageTransitionData object
Source:
Type:
  • object

pages:routeNotFound

Properties:
Name Type Description
page Object PageObject
url String Request url
Source:
Type:
  • Object

pages:routeNotFound

Properties:
Name Type Description
url String Url
isRedirect Boolean PageObject
page Object PageObject
Source:
Type:
  • object