requirejs-plugins
requirejs-plugins copied to clipboard
async plugin: adding second parameter to support naming a global callbac...
...k function instead of the generated one.
This is very useful e.g. for using the async plugin with the YouTube Iframe API, which does not allow the callback function to be configured via the injected URL.
require(
['async!//www.youtube.com/iframe_api!null:onYouTubeIframeAPIReady'],
function() {
// your code initializing and using e.g. the youtube iframe player.
}
);