Class: exports

exports

The top-level view for the app


new exports()

Extends

  • core#View

Members


db :services#Database

A reference to the database underlying the app

Type:
  • services#Database

el :HTMLNavElement

A reference to the main navigation element

Type:
  • HTMLNavElement

events :EventEmitter

The event manager/bus for the app (uses a pubsub model)

Type:
  • EventEmitter

languageDropdown :components#LanguageDropdown

A reference to the current Language Dropdown view

Type:
  • components#LanguageDropdown

languages :Array

An array of the current languages. Call app.getLanguages() to update this.

Type:
  • Array

languages :Array.<models#Language>

An Array of Language objects that are included in the dropdown

Type:
  • Array.<models#Language>

A reference to the menu button

Type:
  • HTMLButtonElement

A reference to the Nav view

Type:
  • components#Nav

nodes :Object

References to DOM elements used by the App View

Type:
  • Object
Properties:
Name Type Description
banner HTMLElement

A reference to the <header id=banner> HTML element

info HTMLElement

A reference to the ARIA live region (<p id=info hidden aria-live=polite>) where content is announced to screen readers

main HTMLElement

A reference to the <main id=main> HTML element


pagesList :HTMLULElement

A reference to the list of pages in the na

Type:
  • HTMLULElement

settings :Object

A hash for storing temporary settings, such as current language, current text, etc. Best practice is to store IDs here rather than data. Automatically saves to

Type:
  • Object

shortcuts :Object

A reference to the Mousetrap instance

Type:
  • Object

templatePath :String

Path to the Language Dropdown HTML template

Type:
  • String

Class: exports

exports

A class for the main navigation


new exports()

Extends

  • core#View

Members


db :services#Database

A reference to the database underlying the app

Type:
  • services#Database

el :HTMLNavElement

A reference to the main navigation element

Type:
  • HTMLNavElement

events :EventEmitter

The event manager/bus for the app (uses a pubsub model)

Type:
  • EventEmitter

languageDropdown :components#LanguageDropdown

A reference to the current Language Dropdown view

Type:
  • components#LanguageDropdown

languages :Array

An array of the current languages. Call app.getLanguages() to update this.

Type:
  • Array

languages :Array.<models#Language>

An Array of Language objects that are included in the dropdown

Type:
  • Array.<models#Language>

A reference to the menu button

Type:
  • HTMLButtonElement

A reference to the Nav view

Type:
  • components#Nav

nodes :Object

References to DOM elements used by the App View

Type:
  • Object
Properties:
Name Type Description
banner HTMLElement

A reference to the <header id=banner> HTML element

info HTMLElement

A reference to the ARIA live region (<p id=info hidden aria-live=polite>) where content is announced to screen readers

main HTMLElement

A reference to the <main id=main> HTML element


pagesList :HTMLULElement

A reference to the list of pages in the na

Type:
  • HTMLULElement

settings :Object

A hash for storing temporary settings, such as current language, current text, etc. Best practice is to store IDs here rather than data. Automatically saves to

Type:
  • Object

shortcuts :Object

A reference to the Mousetrap instance

Type:
  • Object

templatePath :String

Path to the Language Dropdown HTML template

Type:
  • String

Class: exports

exports

View for the language selector in the app banner


new exports( [languages])

Create a new Language Dropdown

Parameters:
Name Type Argument Default Description
languages Array.<models#Language> <optional>
[]

The languages to list in the dropdown

Extends

  • core#View

Members


db :services#Database

A reference to the database underlying the app

Type:
  • services#Database

el :HTMLNavElement

A reference to the main navigation element

Type:
  • HTMLNavElement

events :EventEmitter

The event manager/bus for the app (uses a pubsub model)

Type:
  • EventEmitter

languageDropdown :components#LanguageDropdown

A reference to the current Language Dropdown view

Type:
  • components#LanguageDropdown

languages :Array

An array of the current languages. Call app.getLanguages() to update this.

Type:
  • Array

languages :Array.<models#Language>

An Array of Language objects that are included in the dropdown

Type:
  • Array.<models#Language>

A reference to the menu button

Type:
  • HTMLButtonElement

A reference to the Nav view

Type:
  • components#Nav

nodes :Object

References to DOM elements used by the App View

Type:
  • Object
Properties:
Name Type Description
banner HTMLElement

A reference to the <header id=banner> HTML element

info HTMLElement

A reference to the ARIA live region (<p id=info hidden aria-live=polite>) where content is announced to screen readers

main HTMLElement

A reference to the <main id=main> HTML element


pagesList :HTMLULElement

A reference to the list of pages in the na

Type:
  • HTMLULElement

settings :Object

A hash for storing temporary settings, such as current language, current text, etc. Best practice is to store IDs here rather than data. Automatically saves to

Type:
  • Object

shortcuts :Object

A reference to the Mousetrap instance

Type:
  • Object

templatePath :String

Path to the Language Dropdown HTML template

Type:
  • String