Skip to content

html events sent to all Program instances? #844

@btheado

Description

@btheado

At https://btheado.github.io/tweve/ (see "Storing eve state in tiddlers"), I have two instances of the same Eve code and it looks like the html events from one instance are getting sent to both instances.

Here is some simple code which I think demonstrates the same behavior.

import {Program} from "witheve";
  
let code = `
~~~ 
commit
  [#ui/button text: "click me"] 
~~~     
~~~     
search
  event = [#html/event/click element]
  element = [#ui/button]
commit
  [#ui/div text: "click from event {{event}}"]
~~~
`;
let prog1 = new Program("prog1");
prog1.attach("ui");
prog1.load(code);
let prog2 = new Program("prog2");
prog2.attach("ui");
prog2.load(code);

Clicking either button from either program seems to send the click event to both programs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions