A component that prints the given HTML
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-print
$ polymer serve
$ polymer test
$ import 'blox-print';
<blox-print
html="<html><body><h1>You Printed Me!</h1></body></html>"
error="{{error}}">
</blox-print>
<blox-print id="bloxPrint"></blox-print>
<script>
this.$.bloxPrint.print('<html><body><h1>You Printed Me!</h1></body></html>')
.then(() => {
// Do Something
})
.catch((err) => {
// Do Something
})
</script>