Add an exponential backoff to rechecking the app list doodle.
[chromium-blink-merge.git] / third_party / polymer / components-chromium / core-media-query / core-media-query-extracted.js
blobc73f58b48095ec96f774f0b2b564bf13f71ec2b6
2 Polymer('core-media-query', {
4 /**
5 * The Boolean return value of the media query
7 * @attribute queryMatches
8 * @type Boolean
9 * @default false
11 queryMatches: false,
13 /**
14 * The CSS media query to evaulate
16 * @attribute query
17 * @type string
18 * @default ''
20 query: '',
21 ready: function() {
22 this._mqHandler = this.queryHandler.bind(this);
23 this._mq = null;
25 queryChanged: function() {
26 if (this._mq) {
27 this._mq.removeListener(this._mqHandler);
29 var query = this.query;
30 if (query[0] !== '(') {
31 query = '(' + this.query + ')';
33 this._mq = window.matchMedia(query);
34 this._mq.addListener(this._mqHandler);
35 this.queryHandler(this._mq);
37 queryHandler: function(mq) {
38 this.queryMatches = mq.matches;
39 this.asyncFire('core-media-change', mq);
41 });