pym

Classes

Child
Parent

Members

autoInitInstances :Array

Store auto initialized Pym instances for further reference

Default Value:
  • []
Source:
Type:
  • Array

Methods

autoInit(doNotRaiseEvents)

Initialize Pym for elements on page that have data-pym attributes.
Expose autoinit in case we need to call it from the outside

Source:
Parameters:
Name Type Description
doNotRaiseEvents Boolean

flag to avoid sending custom events

(inner) _cleanAutoInitInstances()

Clean autoInit Instances: those that point to contentless iframes

Source:

(inner) _getNow()

Underscore implementation of getNow

Source:

(inner) _getParameterByName(name)

Generic function for parsing URL params.
Via http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript

Source:
Parameters:
Name Type Description
name String

The name of the paramter to get from the URL.

(inner) _isSafeMessage(e, settings)

Check the message to make sure it comes from an acceptable xdomain.
Defaults to '*' but can be overriden in config.

Source:
Parameters:
Name Type Description
e Event

The message event.

settings Object

Configuration.

(inner) _makeMessage(id, messageType, message)

Construct a message to send between frames.

NB: We use string-building here because JSON message passing is
not supported in all browsers.

Source:
Parameters:
Name Type Description
id String

The unique id of the message recipient.

messageType String

The type of message to send.

message String

The message to send.

(inner) _makeMessageRegex(id)

Construct a regex to validate and parse messages.

Source:
Parameters:
Name Type Description
id String

The unique id of the message recipient.

(inner) _raiseCustomEvent(eventName)

Create and dispatch a custom pym event

Source:
Parameters:
Name Type Description
eventName String

(inner) _throttle(func, wait, options)

Underscore implementation of throttle

Source:
Parameters:
Name Type Description
func function

Throttled function

wait number

Throttle wait time

options object

Throttle settings