minor fixes
This commit is contained in:
parent
c2ce2d4cbd
commit
b4910970c2
2 changed files with 4 additions and 4 deletions
|
@ -243,9 +243,9 @@ The output order is: 1 -> nested -> 2.
|
|||
|
||||
Please note that the nested event `menu-open` is caught on the `document`. The propagation and handling of the nested event is finished before the processing gets back to the outer code (`onclick`).
|
||||
|
||||
That's not only about `dispatchEvent`, there are other cases. If an event handler calls methods that trigger to other events -- they are too processed synchronously, in a nested fasion.
|
||||
That's not only about `dispatchEvent`, there are other cases. If an event handler calls methods that trigger to other events -- they are too processed synchronously, in a nested fashion.
|
||||
|
||||
Let's say we don't like it. We'd want `onclick` to be fully processed first, independantly from `menu-open` or any other nested events.
|
||||
Let's say we don't like it. We'd want `onclick` to be fully processed first, independently from `menu-open` or any other nested events.
|
||||
|
||||
Then we can either put the `dispatchEvent` (or another event-triggering call) at the end of `onclick` or, maybe better, wrap it in the zero-delay `setTimeout`:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue