Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I transform openfb on a Require module? #43

Open
icaro56 opened this issue Nov 18, 2014 · 3 comments
Open

How do I transform openfb on a Require module? #43

icaro56 opened this issue Nov 18, 2014 · 3 comments

Comments

@icaro56
Copy link

icaro56 commented Nov 18, 2014

A try twice and no success.

@fernandojunior
Copy link

Did you see it #6 ?

@icaro56
Copy link
Author

icaro56 commented Nov 19, 2014

No, thanks!

@jatin-Maini
Copy link

hi @icaro56 , @fernandojunior
I was able to convert this plugin into a require JS module
I am using backbone JS with requireJS.
I bootstrapped my app when I received deviceReady event and inside this event handler i assigned runningInCordova variable to the window object.
for example:
require(["baseLib"], function(argument) {
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.runningInCordova = true;
//rest of the app Initialization code goes here
}
});

Once this is done, you may go ahead and directly use this requireJS module from this fiddle.

https://jsfiddle.net/jatin_maini/fb8n2wqt/

hope that helps

  • Jatin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants