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

Can we test this plugins in browser? #19

Closed
vipulsodha-zz opened this issue Oct 3, 2014 · 6 comments
Closed

Can we test this plugins in browser? #19

vipulsodha-zz opened this issue Oct 3, 2014 · 6 comments

Comments

@vipulsodha-zz
Copy link

Can we test this plugins in browser? Mine throws error when tested in browser?

@EddyVerbruggen
Copy link
Owner

Nope you can't. Cordova plugins can only be used when Cordova is loaded. On a device or in a simulator.

You can however do this to have a fallback for running it in the webbrowser:

function showToast(msg) {
  if (window.plugins && window.plugins.toast) {
    // do your toast
  } else {
    // toast fallback
    alert(msg);
  }
}

@vipulsodha-zz
Copy link
Author

ohk !

@shprink
Copy link

shprink commented Aug 11, 2015

Is it possible to re-open that and actually create the browser platform version? http://www.raymondcamden.com/2014/09/24/Browser-as-a-platform-for-your-PhoneGapCordova-apps

@shprink
Copy link

shprink commented Aug 11, 2015

cordova platform add browser

@timbru31
Copy link

timbru31 commented Nov 2, 2017

It's been two years, but it seems https://github.com/apache/cordova-browser is picking up speed - it would be awesome if this issue can be re-opened!

@EddyVerbruggen
Copy link
Owner

I love the idea of having a browser implementation, but that has to go the PR route..

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

4 participants