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

Side by Side Diff: chrome/test/data/banners/prompt_test_page.html

Issue 2553013004: Remove the app banner navigation heuristic. (Closed)
Patch Set: Add comments Created 4 years 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
« no previous file with comments | « chrome/test/data/banners/prompt_in_handler_test_page.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
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Web app banner test page</title> 3 <title>Web app banner test page</title>
4 <link rel="manifest" href="manifest.json" /> 4 <link rel="manifest" href="manifest.json" />
5 <script src="main.js"></script> 5 <script src="main.js"></script>
6 <script> 6 <script>
7 function callPrompt(event) { 7 function callPrompt(event) {
8 console.log('Re-prompt banner');
9 event.prompt(); 8 event.prompt();
10 } 9 }
11 10
12 window.addEventListener('beforeinstallprompt', function(e) { 11 window.addEventListener('beforeinstallprompt', function(e) {
13 console.log('Preventing banner from appearing');
14 e.preventDefault(); 12 e.preventDefault();
15
16 setTimeout(callPrompt, 0, e); 13 setTimeout(callPrompt, 0, e);
17 }); 14 });
18 15
19 </script> 16 </script>
20 </head> 17 </head>
21 <body onload="initialize()">Cancels the banner, then prompts for it to be show n later.</body> 18 <body onload="initialize()">Cancels the banner, then prompts for it to be show n later.</body>
22 </html> 19 </html>
OLDNEW
« no previous file with comments | « chrome/test/data/banners/prompt_in_handler_test_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698