Proxy between your code and an object. Useful for working with asynchronously loaded objects, such as Facebook's API.
JavaScript
Latest commit dc014d2 Apr 28, 2014 @lencioni lencioni Add Bower version badge to README
Change-Id: Ia6c7d42ae3bc4236f16c753a7b0c2b15db92c016
Reviewed-on: http://gerrit.causes.com/37567
Reviewed-by: Joe Lencioni <joe.lencioni@causes.com>
Tested-by: Joe Lencioni <joe.lencioni@causes.com>
Permalink
Failed to load latest commit information.
spec
.gitignore
.jshintrc
.travis.yml
CHANGELOG.md
Gruntfile.js
MIT-LICENSE.txt
README.md
bower.json
method-proxy.js
package.json

README.md

method-proxy-js

NPM version Bower version Build Status

Serves as a proxy between your code and an object. Useful for working with asynchronously loaded objects, such as Facebook's API.

Read Working With Asynchronously Loaded JavaScript Objects for more in-depth look at its uses.

Installing

Bower

bower install method-proxy-js

npm

npm install method-proxy-js

Example usage

MyFB = window.MyFB || [];

MyFB.push(['ui', ...]);

window.fbAsyncInit = function() {
  FB.init({
    ...
  });

  MyFB = new MethodProxy(FB, MyFB);
};

MyFB.push(['FBML.parse', ...]);

License

This project is released under the MIT license.