Closed Bug 1457689 Opened 6 years ago Closed 6 years ago

document.domain throws wrong exception

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: annevk, Assigned: qdot)

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

Should be "SecurityError" DOMException, not NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN.

Test: https://github.com/w3c/web-platform-tests/pull/10703.
Priority: -- → P3
Assignee: nobody → kyle
Comment on attachment 8984316 [details]
Bug 1457689 - Fix documain.domain setting exception type;

https://reviewboard.mozilla.org/r/250124/#review256444

You might have to get r+ from an actual reviewer too.
Attachment #8984316 - Flags: review?(annevk) → review+
Hmm, so given https://searchfox.org/mozilla-central/search?q=NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN it seems there's one more occurrence that should be changed (and isn't tested for?) and then the whole exception can be removed.
Comment on attachment 8984316 [details]
Bug 1457689 - Fix documain.domain setting exception type;

https://reviewboard.mozilla.org/r/250124/#review256446
Attachment #8984316 - Flags: review+ → review-
Ah, ok, thanks! I'll get that cleaned up and bring in bz for reviews.
Comment on attachment 8984316 [details]
Bug 1457689 - Fix documain.domain setting exception type;

https://reviewboard.mozilla.org/r/250124/#review256812

r=me
Attachment #8984316 - Flags: review?(bzbarsky) → review+
Comment on attachment 8984612 [details]
Bug 1457689 - Remove NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN;

https://reviewboard.mozilla.org/r/250508/#review256814
Attachment #8984612 - Flags: review?(bzbarsky) → review+
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe5ded10511f
Fix documain.domain setting exception type; r=bz
https://hg.mozilla.org/integration/autoland/rev/16606407297e
Remove NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN; r=bz
https://hg.mozilla.org/mozilla-central/rev/fe5ded10511f
https://hg.mozilla.org/mozilla-central/rev/16606407297e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
We don't do a good job of documenting this property. We should document this and any other exceptions it throws properly, and generally give the doc an update.
Keywords: dev-doc-needed
I have given the ref doc a damn good spring clean:

https://developer.mozilla.org/en-US/docs/Web/API/Document/domain

Not sure if it worth mentioning the actual change this bug makes in the rel notes, so I've left it for now.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: