D
Deno

help

Monkey patch Broadcast Channel to send messages to current context

Eeliassjogreen9/30/2022
Essentially what I want to do is be able to connect to new BroadcastChannel("test_channel"); which I in the same context want to post messages to and still be able to recieve them. So if my pretty little drawing helps:
|---same javascript context----------|
| |-patched test_channel source----| |
| | Send messages here! | |
| |--------------------------------| |
| |
| |-test_channel-------------------| |
| | Recieve messages here | |
| |--------------------------------| |
| |
| |-test_channel-------------------| |
| | and here! | |
| |--------------------------------| |
|------------------------------------|
|---same javascript context----------|
| |-patched test_channel source----| |
| | Send messages here! | |
| |--------------------------------| |
| |
| |-test_channel-------------------| |
| | Recieve messages here | |
| |--------------------------------| |
| |
| |-test_channel-------------------| |
| | and here! | |
| |--------------------------------| |
|------------------------------------|
ABTAndreu Botella (they/them)9/30/2022
I think you can do that just fine
ABTAndreu Botella (they/them)9/30/2022
Eeliassjogreen9/30/2022
Oh, I'm stupid, it certainly does work. I was sure that it didn't when I tried it before (although that was like a month ago). Thanks!
ABTAndreu Botella (they/them)9/30/2022
it worked a month ago
Eeliassjogreen9/30/2022
hmm, was probably me doing something wrong then

Looking for more? Join the community!

Recommended Posts
Dynamically imported module evaluation is still pendingI'm very confused on the error i put as the title because in my program i'm trying to just import soHow to setup CORS with serve? I get 403 forbidden.I've setup the following headers (OPTIONS response): ``` new Response(null, { status: 204, headeDynamic npm imports don't workHey there. It looks like dynamic imports don't work with `npm` specifiers. For example: ``` await iUnable to make local session persistence with Firebase Auth on Deno FreshHello I'm running a basic app for testing firebase auth. My implementation is as follows: - The finewbie help on deploying first project to denoI asked on deno github and was told to ask on discord: https://github.com/denoland/deno/discussions/How to exclude vendor directory from test coverage?https://deno.land/manual@v1.25.4/testing/coverage Here it says by default it will exclude `test\.(tsHow exactly do import maps work?My import map works but I don't understand how! ```"/": "./src/", "./": "./",``` If I import `/a/b/does not provide an export named... module importdoes anybody know whats going on, when i reload my page only sometimes i get this message : ``` ThWrite to virtual file pathIs it possible to provide virtual file paths so that another package writes a file to a variable in Request.body.getReader() into Uint8Array typed arrayis it possible to convert a `readableStream` into a `Uint8Array` ?serving two static folders and connecting to both with websocketsA lot of the youtube and medium resources available on setting serving static folders, and on settini need a regex that matches, from a double quote to a double quote and has two fullstop between it.i need a regex that matches, from a `"` to a `"` and has two `.` between it for example, `"fjhhdjkd