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

Unified Diff: pkg/polymer/lib/elements/polymer-file/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
« no previous file with comments | « pkg/polymer/lib/elements/polymer-file/bower.json ('k') | pkg/polymer/lib/elements/polymer-file/docs.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/elements/polymer-file/demo.html
diff --git a/pkg/polymer/lib/elements/polymer-file/demo.html b/pkg/polymer/lib/elements/polymer-file/demo.html
new file mode 100644
index 0000000000000000000000000000000000000000..c3157c55e450fe122c57dd54660ea9f9a79f9a65
--- /dev/null
+++ b/pkg/polymer/lib/elements/polymer-file/demo.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>polymer-file</title>
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="polymer-file.html">
+</head>
+<body>
+ <polymer-file auto readas="text"></polymer-file>
+
+ <p>Read result:</p>
+ <textarea cols="20" rows="5"></textarea>
+
+ <script>
+ document.addEventListener('polymer-ready', function() {
+ var pfile = document.querySelector('polymer-file');
+ pfile.blob = new Blob(['abc123'], {type: 'text/plain'});
+ //pfile.auto = true;
+ //pfile.read();
+
+ pfile.addEventListener('polymer-result', function(e) {
+ document.querySelector('textarea').value = e.detail.result;
+ });
+ });
+ </script>
+</body>
+</html>
« no previous file with comments | « pkg/polymer/lib/elements/polymer-file/bower.json ('k') | pkg/polymer/lib/elements/polymer-file/docs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698