diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /addon-sdk/source/test/addons/page-worker/data | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'addon-sdk/source/test/addons/page-worker/data')
-rw-r--r-- | addon-sdk/source/test/addons/page-worker/data/page.html | 9 | ||||
-rw-r--r-- | addon-sdk/source/test/addons/page-worker/data/page.js | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/addon-sdk/source/test/addons/page-worker/data/page.html b/addon-sdk/source/test/addons/page-worker/data/page.html new file mode 100644 index 000000000..3b59d3963 --- /dev/null +++ b/addon-sdk/source/test/addons/page-worker/data/page.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> + +<html> +<head> +<script type="text/javascript" src="page.js"></script> +</head> +<body> +</body> +</html> diff --git a/addon-sdk/source/test/addons/page-worker/data/page.js b/addon-sdk/source/test/addons/page-worker/data/page.js new file mode 100644 index 000000000..04d062497 --- /dev/null +++ b/addon-sdk/source/test/addons/page-worker/data/page.js @@ -0,0 +1,13 @@ +window.addEventListener("load", function() { + addon.port.emit("load", "ok"); +}); + +addon.postMessage("first message"); +addon.on("message", function(msg) { + if (msg == "ping") + addon.postMessage("pong"); +}); + +addon.port.on("ping", function() { + addon.port.emit("pong"); +}); |