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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 -->
10 <html lang="en">
11 <head>
12 <meta charset="UTF-8">
13 <title></title>
14 </head>
15 <body>
16 <pre id="output"></pre>
17 <script type="application/dart">
18 import 'dart:html';
19
20 main() {
21 var output = document.querySelector('#output');
22 window.on['message'].listen((e) {
23 if (e.data == 'close') {
24 output.text += 'close request\n';
25 e.source.postMessage('popup-closed', window.location.origin);
26 window.close();
27 }
28 });
29 if (window.opener) {
30 // TODO(jakemac): Not in dart html? Is this necessary?
31 // window.focus();
32 output.text += 'send initialized';
33 window.opener.postMessage(
34 'popup-initialized', window.location.origin);
35 }
36 }
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698