| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 Polymer({ | 3 Polymer({ |
| 4 | 4 |
| 5 is: 'iron-media-query', | 5 is: 'iron-media-query', |
| 6 | 6 |
| 7 properties: { | 7 properties: { |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The Boolean return value of the media query. | 10 * The Boolean return value of the media query. |
| 11 * | |
| 12 * @attribute queryMatches | |
| 13 * @type Boolean | |
| 14 * @default false | |
| 15 */ | 11 */ |
| 16 queryMatches: { | 12 queryMatches: { |
| 17 type: Boolean, | 13 type: Boolean, |
| 18 value: false, | 14 value: false, |
| 19 readOnly: true, | 15 readOnly: true, |
| 20 notify: true | 16 notify: true |
| 21 }, | 17 }, |
| 22 | 18 |
| 23 /** | 19 /** |
| 24 * The CSS media query to evaluate. | 20 * The CSS media query to evaluate. |
| 25 * | |
| 26 * @attribute query | |
| 27 * @type String | |
| 28 */ | 21 */ |
| 29 query: { | 22 query: { |
| 30 type: String, | 23 type: String, |
| 31 observer: 'queryChanged' | 24 observer: 'queryChanged' |
| 32 } | 25 } |
| 33 | 26 |
| 34 }, | 27 }, |
| 35 | 28 |
| 36 created: function() { | 29 created: function() { |
| 37 this._mqHandler = this.queryHandler.bind(this); | 30 this._mqHandler = this.queryHandler.bind(this); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 48 this._mq.addListener(this._mqHandler); | 41 this._mq.addListener(this._mqHandler); |
| 49 this.queryHandler(this._mq); | 42 this.queryHandler(this._mq); |
| 50 }, | 43 }, |
| 51 | 44 |
| 52 queryHandler: function(mq) { | 45 queryHandler: function(mq) { |
| 53 this._setQueryMatches(mq.matches); | 46 this._setQueryMatches(mq.matches); |
| 54 } | 47 } |
| 55 | 48 |
| 56 }); | 49 }); |
| 57 | 50 |
| OLD | NEW |