Assuming you are running a fakezod on port 8080, run
|cors-approve '{window.location.origin}'
in its dojo.
Press the button to run the code below. Output will be logged. You should see < ~zod: opening airlock
in your dojo. Create a chat and send a message to see the events logged.
window.airlock = await Urbit.authenticate({ ship: 'zod', url: 'localhost:8080', code: 'lidlut-tabwed-pillex-ridrup', verbose: true }); window.airlock.subscribe('chat-view', '/primary', { event: console.log });