##// END OF EJS Templates
js: use ES6 classes for polymer 2.x
js: use ES6 classes for polymer 2.x

File last commit:

r3172:d37fc984 default
r3172:d37fc984 default
Show More
rhodecode-favicon.html
38 lines | 1011 B | text/html | HtmlLexer
<link rel="import" href="../../../../../../bower_components/polymer/polymer.html">
<dom-module id="rhodecode-favicon">
<template>
</template>
<script>
class RhodecodeFavicon extends Polymer.Element {
static get is() { return 'rhodecode-favicon'; }
static get properties() {
return {
favicon: Object,
counter: {
type: Number,
observer: '_handleCounter'
}
}
}
connectedCallback() {
super.connectedCallback();
this.favicon = new Favico({
type: 'rectangle',
animation: 'none'
});
}
_handleCounter(newVal, oldVal) {
this.favicon.badge(this.counter);
}
}
customElements.define(RhodecodeFavicon.is, RhodecodeFavicon);
</script>
</dom-module>