requirejs-plugins icon indicating copy to clipboard operation
requirejs-plugins copied to clipboard

async plugin: adding second parameter to support naming a global callbac...

Open mhrisse opened this issue 12 years ago • 0 comments

...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.
    }
);

mhrisse avatar Oct 05 '13 19:10 mhrisse