Creates a file to download with the given extension and data
First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install
to install your element's dependencies, then run polymer serve
to serve your element locally.
$ npm install blox-backup
$ polymer serve
$ polymer test
$ import 'blox-backup';
<blox-backup
filename="myfile"
suffix="csv"
data="this, is , in, the, file,">
</blox-backup>
<blox-backup id="bloxBackup"></blox-backup>
<script>
this.$.bloxBackup.backup('myfile', 'csv', 'this, is , in, the, file')
.then(() => {
// Do Something
})
.catch((err) => {
// Do Something
})
</script>