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

Side by Side Diff: content/test/data/browser_plugin_naming_guest.html

Issue 11554030: <webview>: Add name attribute (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/test/data/browser_plugin_naming_embedder.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3 <script>
4 var embedder = null;
5 var lastName = '';
6 function SetWindowName(name) {
7 window.name = name;
8 lastName = name;
9 embedder.postMessage(name, '*');
10 }
11
12 function pollName() {
13 if (window.name != lastName) {
14 lastName = window.name;
15 // Signal the embedder with the new window name.
16 embedder.postMessage(lastName, '*');
17 setTimeout(pollName, 100);
18 }
19 }
20
21 window.addEventListener('message', function(e) {
22 console.log('test');
23 embedder = e.source;
24 SetWindowName('guest');
25 setTimeout(pollName, 100);
26 });
27 </script>
28 </body>
29 </html>
OLDNEW
« no previous file with comments | « content/test/data/browser_plugin_naming_embedder.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698