* Fix Runtime.evaluate awaitPromise settling * Fix DOM event navigation side effects * Fix CDP click-triggered navigation parity * Strengthen CDP inline script click parity test * Handle positions-like submit URLs in CDP parity Co-authored-by: SGavrl <[email protected]>
1.7 KiB
1.7 KiB
Obscura DOM Event + Navigation Side Effects Report
Status: Completed locally on branch fix/dom-event-navigation-side-effects.
Base/dependency note: branch was created from current fix/runtime-evaluate-await-promise state as requested, so this work depends on that branch until it is merged/rebased.
Changes
crates/obscura-js/js/bootstrap.js- Preserves the original
event.targetduring bubbling. - Allows bubbling even when
preventDefault()was called, matching browser behavior. - Implements propagation stop flags for
stopPropagation()andstopImmediatePropagation(). - Makes
preventDefault()honorcancelable.
- Preserves the original
crates/obscura-js/src/ops.rsop_navigatenow updates runtime URL state immediately as well as recording pending navigation.
crates/obscura-js/src/runtime.rs- Added acceptance tests for:
button.click()runs click listener and updatesdataset.dispatchEvent(new MouseEvent('click', { bubbles: true }))runs listener.location.href = '/next'updates URL/navigation state.- Submit button click runs submit handler; handler
preventDefault(); location.href='/submitted'updates URL/navigation state.
- Added acceptance tests for:
Verification
cargo test -p obscura-js— passed, 58 tests.cargo test -p obscura-cdp— passed, 0 tests.
Existing warnings remain in obscura-net, obscura-js, and obscura-cdp; no new failure observed.
Remaining gaps
- I did not open a PR or push because remote permissions were not attempted/confirmed in this environment.
cargo fmtwas tested earlier but it reformats many unrelated existing files in this repo, so I reverted those broad formatting-only changes and kept the final diff scoped to this task.