Rename `BaseDispatcher` to `Dispatcher` and `Dispatcher` to
`LegacyDispatcher`. The `GlobalHandler` type and `stopPropagation`
function needs to be left for now in dispatcher.ts as it was not
exported previously from legacy_dispatcher.ts.
PR Close#55721
This changes include
- Using multi line comments to write JSDoc comments which improves DX
- Use `this.container` instead of `window.document.documentElement`
PR Close#55704
This behavior is now implemented by calling `dispatch` whether or not
the `action` is populated. The `Dispatcher` then does global dispatch
and early returns if there's no action.
PR Close#55692
This will allow a multi-app application to listen to early events from different elements and place them
on a separate field on the window.
PR Close#55586
All usages in google3 have been deleted so this should be a no-op. Next I'll clean up all the configurations turning this off and then delete the option entirely.
PR Close#55598
This define has been removed at head, and now legacy stop propagation
behavior can be opted into at the LegacyDispatcher level, if necessary.
PR Close#55582
This will enable refactoring existing usages of the Dispatcher that use
APIs that we do not intend to support, like registerGlobalHandler and
registerEventInfoHandlers to use the LegacyDispatcher.
PR Close#55372
The change in the index is to allow the framework to add a type to the object that is passed from the contract to the dispatcher. ie
registerDispatcher(contract, (eventInfo: EventInfoWrapper) => ...).
The latter is to return the event contract so that tests can clean it up.
PR Close#55411
Flip `stopPropagation` constructor parameter default to `false` for
`EventContract` and `EventContractMultiContainer`. Change type for
`EventContract` to `false` to indicate that no values besides `false`
should be passed. This enables removing all usages of `stopPropagation`
in `EventContract` and leaving only usages of `stopPropagation = true`
for `EventContractMultiContainer`.
PR Close#55351
When `cleanUp` is called `containerManager` is set to null. Currently
the `EventContract` API assumes that users know not to call further
methods on `EventContract`, but this lead to a bug in a downstream app,
b/333750059. So instead, this makes a defensive check to make sure it's
not null.
PR Close#55353
1: Remove USE_EVENT_PATH, which has no users.
2: Create a new `EventActionInfo` object to represent actions, update all `EventInfoWrapper` users.
3: Fix `stopPropagation` behavior in JSAction Dispatcher - it should only `stopPropagation` if an action is found, which is only known during normal dispatch rather than global.
PR Close#55182