Created
July 2, 2024 23:07
-
-
Save iamjason/94680dd8bc65b93dfebf3e4618e7784f to your computer and use it in GitHub Desktop.
Revisions
-
iamjason created this gist
Jul 2, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Second Page</title> </head> <body> <h1>This is the second page</h1> <script> if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.notification) { window.webkit.messageHandlers.notification.postMessage("Hello from the second page!"); console.log("window.webkit.messageHandlers.notification is sent"); } else { console.error("window.webkit.messageHandlers.notification is undefined"); } </script> </body> </html>