Methods
initializePym(pym, doNotRaiseEvents)
Initialize pym instances if Pym.js itself is available
Parameters:
Name | Type | Description |
---|---|---|
pym |
String | Pym.js loaded library. |
doNotRaiseEvents |
Boolean | flag to avoid sending custom events |
- Source:
loadPymViaEmbedding(pymUrl)
As another loading fallback approach
try to append the script tag to the head of the document
via http://stackoverflow.com/questions/6642081/jquery-getscript-methods-internal-process
via http://unixpapa.com/js/dyna.html
Parameters:
Name | Type | Description |
---|---|---|
pymUrl |
String | Url where Pym.js can be found |
- Source:
pageLoaded()
Callback to initialize Pym.js on document load events
- Source:
tryLoadingWithJQuery(pymUrl)
Load pym through jQuery async getScript module
Since this loader can be embedded multiple times in the same post
the function manages a global flag called pymloading to avoid
possible race conditions
Parameters:
Name | Type | Description |
---|---|---|
pymUrl |
String | Url where Pym.js can be found |
- Source:
tryLoadingWithRequirejs(pymUrl)
Load pym with Requirejs if it is available on the page
Used in CorePublisher CMS member sites with persistent players
Create a different context to allow multiversion
via: http://requirejs.org/docs/api.html#multiversion
Parameters:
Name | Type | Description |
---|---|---|
pymUrl |
String | Url where Pym.js can be found |
- Source:
(inner) _raiseCustomEvent(eventName)
Create and dispatch a custom pym-loader event
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String |
- Source: