Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: pkg/polymer/lib/elements/polymer-media-query/demo.html

Issue 175443005: [polymer] import all elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated from bower Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/polymer/lib/elements/polymer-media-query/demo.html
diff --git a/pkg/polymer/lib/elements/polymer-media-query/demo.html b/pkg/polymer/lib/elements/polymer-media-query/demo.html
new file mode 100644
index 0000000000000000000000000000000000000000..3264f20b3f599d99826a18293dd48418fe783d05
--- /dev/null
+++ b/pkg/polymer/lib/elements/polymer-media-query/demo.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Polymer match media</title>
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="polymer-media-query.html" />
+</head>
+<body>
+
+ <polymer-element name="match-example">
+ <template>
+ <polymer-media-query query="{{query}}" queryMatches="{{qMatches}}"></polymer-media-query>
+ My query of "{{query}}" {{qMatches ? "matches" : "doesn't match"}}
+ </template>
+ <script>
+ Polymer('match-example', {
+ query: 'min-width: 600px'
+ });
+ </script>
+ </polymer-element>
+
+ <match-example id="me"></match-example>
+ <pre id="output">
+ Log of 'mediachange' events on document, from polymer-match-media:
+ </pre>
+
+ <script>
+ var output = document.querySelector('#output');
+ // on-mediachange would give true or false as second param to the handler
+ document.addEventListener('polymer-mediachange', function(e) {
+ output.textContent += '\nevent: ' + e.type + ' query: ' + e.detail.media + ' matches: ' + e.detail.matches;
+ });
+ </script>
+</body>
+</html>
« no previous file with comments | « pkg/polymer/lib/elements/polymer-media-query/bower.json ('k') | pkg/polymer/lib/elements/polymer-media-query/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698