{"action":"created","issue":{"url":"https://api.github.com/repos/WickyNilliams/enquire.js/issues/134","labels_url":"https://api.github.com/repos/WickyNilliams/enquire.js/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/WickyNilliams/enquire.js/issues/134/comments","events_url":"https://api.github.com/repos/WickyNilliams/enquire.js/issues/134/events","html_url":"https://github.com/WickyNilliams/enquire.js/issues/134","id":73901545,"number":134,"title":"Why media query?","user":{"login":"Iazel","id":1616917,"avatar_url":"https://avatars.githubusercontent.com/u/1616917?v=3","gravatar_id":"","url":"https://api.github.com/users/Iazel","html_url":"https://github.com/Iazel","followers_url":"https://api.github.com/users/Iazel/followers","following_url":"https://api.github.com/users/Iazel/following{/other_user}","gists_url":"https://api.github.com/users/Iazel/gists{/gist_id}","starred_url":"https://api.github.com/users/Iazel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iazel/subscriptions","organizations_url":"https://api.github.com/users/Iazel/orgs","repos_url":"https://api.github.com/users/Iazel/repos","events_url":"https://api.github.com/users/Iazel/events{/privacy}","received_events_url":"https://api.github.com/users/Iazel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-07T08:45:36Z","updated_at":"2015-05-07T08:53:18Z","closed_at":null,"body":"I like the project's idea, but I was wondering, why media query instead of a more native approach using an object?\r\n\r\nSomething like this:\r\n\r\n```javascript\r\nenquire.register({min: 600}, handler)\r\n```\r\n\r\nThis would completely remove the need for polyfills and should be quite straightforward to code.  \r\nI think the first object should have three mode, namely `min`, `max` or `in`; the latter is more a sugar and could be dropped out in favor of `{min: x, max: y}`"},"comment":{"url":"https://api.github.com/repos/WickyNilliams/enquire.js/issues/comments/99778863","html_url":"https://github.com/WickyNilliams/enquire.js/issues/134#issuecomment-99778863","issue_url":"https://api.github.com/repos/WickyNilliams/enquire.js/issues/134","id":99778863,"user":{"login":"WickyNilliams","id":1091390,"avatar_url":"https://avatars.githubusercontent.com/u/1091390?v=3","gravatar_id":"","url":"https://api.github.com/users/WickyNilliams","html_url":"https://github.com/WickyNilliams","followers_url":"https://api.github.com/users/WickyNilliams/followers","following_url":"https://api.github.com/users/WickyNilliams/following{/other_user}","gists_url":"https://api.github.com/users/WickyNilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/WickyNilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickyNilliams/subscriptions","organizations_url":"https://api.github.com/users/WickyNilliams/orgs","repos_url":"https://api.github.com/users/WickyNilliams/repos","events_url":"https://api.github.com/users/WickyNilliams/events{/privacy}","received_events_url":"https://api.github.com/users/WickyNilliams/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T08:53:18Z","updated_at":"2015-05-07T08:53:18Z","body":"How is it not \"native\"? The lib relies on the matchMedia API which has very broad support these days. Polyfills are only required for IE 9 and below. Also it is far more flexible and future-propf than your proposed API eg. How would you handle pixel density, or height, or AND or OR queries or any other type of query that may arise in future (eg touch or brightness)? "}}