Revision 4c6a2323
Added by koszko over 1 year ago
| common/broadcast.js | ||
|---|---|---|
| 41 | 41 |
* proprietary program, I am not going to enforce this in court. |
| 42 | 42 |
*/ |
| 43 | 43 |
|
| 44 |
#IMPORT common/connection_types.js AS CONNECTION_TYPE |
|
| 45 |
|
|
| 46 | 44 |
#FROM common/message_server.js IMPORT connect_to_background |
| 47 | 45 |
|
| 48 | 46 |
function sender_connection() |
| 49 | 47 |
{
|
| 50 | 48 |
return {
|
| 51 |
port: connect_to_background(CONNECTION_TYPE.BROADCAST_SEND)
|
|
| 49 |
port: connect_to_background("broadcast_send")
|
|
| 52 | 50 |
}; |
| 53 | 51 |
} |
| 54 | 52 |
#EXPORT sender_connection |
| ... | ... | |
| 94 | 92 |
function listener_connection(cb) |
| 95 | 93 |
{
|
| 96 | 94 |
const conn = {
|
| 97 |
port: connect_to_background(CONNECTION_TYPE.BROADCAST_LISTEN)
|
|
| 95 |
port: connect_to_background("broadcast_listen")
|
|
| 98 | 96 |
}; |
| 99 | 97 |
|
| 100 | 98 |
conn.port.onMessage.addListener(cb); |
Also available in: Unified diff
make Haketilo buildable again (for Mozilla)
How cool it is to throw away 5755 lines of code...