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