GithubHelp home page GithubHelp logo

cordova-elements's Introduction

Cordova-Elements

Web-Components that expose the API of Apache Cordova and (some) Cordova Plugins.

Usage:

<cordova-device platform="{{platform}}"></cordova-device>
<p>platform: <span>{{platform}}</span></p>

More at cordova-elements-demo

Additional Notes

Once I decide whether this project makes sense or not I might set it up properly with bower and write some gulp tasks that make working with cordova easier.

Note that in `cordova-base/cordova.html' a script tag that loads cordova.js is created. The actual (platform-specific) cordova.js is not available at the time gulp builds the polymer app. This is the solution I came up with in order to enable inlining and still have the script tag. Cordova complains if it doesn't find its own script tag since it needs to look at the src attribute to determine the location of the plugin scripts. Unfortunately, after I upated yeoman it produces a different gulpfile and somehow nothing worked unless I disabled the vulcanize task, so no inlining for now.

Also, it is not clear if it's a good idea to inline the javascript for codova and the individual plugins. It would be a lot of work - one would have to maintain a fork of cordova and every plugin, and jshint errored a lot when I accidentally inlined cordova.js. Also, functionality where cordova only uses a plugin if the browser doesn't already provide the corresponding api might be broken.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.