| 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>
|
|
|