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

Unified Diff: pkg/polymer/test/popup.html

Issue 723393003: update to polymer js 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: little bit of cleanup Created 6 years, 1 month 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/test/popup.html
diff --git a/pkg/polymer/test/popup.html b/pkg/polymer/test/popup.html
new file mode 100644
index 0000000000000000000000000000000000000000..1ec0d3a9db0a999d83e733682da531897e5e6830
--- /dev/null
+++ b/pkg/polymer/test/popup.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title></title>
+ </head>
+ <body>
+ <pre id="output"></pre>
+ <script type="application/dart">
+ import 'dart:html';
+
+ main() {
+ var output = document.querySelector('#output');
+ window.on['message'].listen((e) {
+ if (e.data == 'close') {
+ output.text += 'close request\n';
+ e.source.postMessage('popup-closed', window.location.origin);
+ window.close();
+ }
+ });
+ if (window.opener) {
+ // TODO(jakemac): Not in dart html? Is this necessary?
+ // window.focus();
+ output.text += 'send initialized';
+ window.opener.postMessage(
+ 'popup-initialized', window.location.origin);
+ }
+ }
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698