Add support for event.stopPropagation, event.preventDefault and event.stopImmediatePropagation

A few tools that I’m working on listen the click event and then show a border or outline around an element. This lets you see the size easily and make changes. But the click event is not stopped and things like checkboxes are selected.

Web Developer tools in most browsers have a similar “inspect” tool that helps lets you click on a item on the page and not trigger any event.

Use Case
Ferdinand is writing a HTML inspector tool and he wants to prevent the default event and event propagation. He uses the event.stopPropagation methods.

@kerrishotts is this something we can support on the UXP side?

Unfortunately by the time JS is even aware of the event, the native widget has already consumed it, which makes it difficult to prevent the default action.

One option is to create your own controls that look like a native control, at which point you have full control over event propagation.