Open Bug 2094566 Opened 7 days ago Updated 7 days ago

NavigateEvent.sourceElement ignores document.domain

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

Tracking Status
firefox162 --- affected

People

(Reporter: zcorpan, Unassigned)

References

Details

The fix for bug 2083440 hides NavigateEvent.sourceElement by comparing principals with Equals() (Navigation.cpp), which ignores document.domain. https://github.com/whatwg/html/pull/13090 says:

If sourceElement is non-null and sourceElement's node document's origin and document's origin are not same origin-domain, then set sourceElement to null.

In Firefox Nightly:

  • When both documents set document.domain to a common parent domain, sourceElement is null instead of the element.
  • When the target is same-origin but only it set document.domain, sourceElement is the <a> instead of null.

Tests: https://github.com/web-platform-tests/wpt/pull/65366 (Chrome Canary and Safari TP pass them).

You need to log in before you can comment on or make changes to this bug.