Comparing version 0.1.0 to 0.1.1
@@ -8,2 +8,3 @@ 'use strict'; | ||
function Mql(query, values){ | ||
var self = this; | ||
if(dynamicMatch){ | ||
@@ -13,2 +14,4 @@ var mql = dynamicMatch(query); | ||
this.media = mql.media; | ||
// TODO: is there a time it makes sense to remove this listener? | ||
mql.addListener(update); | ||
} else { | ||
@@ -33,2 +36,8 @@ this.matches = staticMatch(query, values); | ||
} | ||
// update ourselves! | ||
function update(evt){ | ||
self.matches = evt.matches; | ||
self.media = evt.media; | ||
} | ||
} | ||
@@ -35,0 +44,0 @@ |
{ | ||
"name": "matchmedia", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Media queries for your client and server", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4909
67