Class: TripParser

TripParser

new TripParser()

TripParser - this is the parser that helps us parse DOM elements and return needed information to TripCore. By doing so, users can easily define their own trips from HTML.

Source:

Methods

<static> _getAllTripNodes() → {Array}

We will find out all pre-defined DOM elements from DOM tree.

Source:
Returns:

Array of Element

Type
Array

<static> _parseTripData(node) → {Object}

we will use this function to parse out all needed information and wrap them into a tripData object then pass it out.

TODO - http://caniuse.com/#search=dataset IE 8~10 can't use dataset directly, so we may need to use getAttribute for this case later.

Parameters:
Name Type Description
node Element
Source:
Returns:

TripData

Type
Object

<static> parse(selector) → {Array}

This is the main entry point to use tripParser.

Parameters:
Name Type Description
selector String

selector to matches nodes from DOM tree

Source:
Returns:

Array of tripDatas

Type
Array
DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects.
Documentation generated by JSDoc 3.2.2 on Sun Feb 22nd 2015 using the DocStrap template.