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 characters
| var frame = document.createElement("iframe"); | |
| frame.src="https://<the mothership's domain>/inner.html"; | |
| frame.onload = function() { | |
| // If this is a Chrome content script, contentWindow is offlimits. | |
| frame.contentWindow.postMessage("A Message!", "https://<the mothership's domain>"); | |
| } | |
| document.body.appendChild(frame); |
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 characters
| /** | |
| * Service providing Verticle. | |
| */ | |
| vertx.eventBus.registerHandler("dosomething", function(message, replier) { | |
| // Does something. | |
| ... | |
| replier.reply({status: "OK"}); | |
| }); | |
| /////////////////////// |