This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12667 - Setting doc.title in an SVG document doesn't (necessarily) throw
Summary: Setting doc.title in an SVG document doesn't (necessarily) throw
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-17 11:00 UTC by contributor
Modified: 2011-09-23 08:09 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2011-05-17 11:00:50 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#dom-tree-accessors

Comment:
Setting doc.title in an SVG document doesn't (necessarily) throw

Posted from: 157.193.48.31 by ms2ger@gmail.com
User agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.9 (.NET CLR 3.5.30729)
Comment 1 Michael[tm] Smith 2011-08-04 05:00:10 UTC
mass-moved component to LC1
Comment 2 Ian 'Hixie' Hickson 2011-08-09 04:59:08 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale: I don't understand. Could you elaborate?
Comment 3 Cameron McCormack 2011-08-09 05:16:09 UTC
It'll throw if the script is in strict mode, but not otherwise.

Does the algorithm here deliberately cover its eyes as to whether the IDL attribute on SVGDocument is readonly or not, just in case we make it writable in the future?
Comment 4 Ms2ger 2011-08-09 09:08:45 UTC
What Cameron said.
Comment 5 Anne 2011-08-14 09:35:10 UTC
Cameron, the problem is they will end up being the same attribute. So it will necessarily have to be writable. Assuming of course we go ahead with unifying all Document objects.
Comment 6 Cameron McCormack 2011-08-14 22:49:09 UTC
Ah, yes.  I realise then that we cannot have

  interface Document { ... };
  interface HTMLDocument { attribute DOMString title; ... };
  interface SVGDocument { readonly atribute DOMString title; ... };
  Document implements HTMLDocument;
  Document implements SVGDocument;

due to the two title attributes.  If we are indeed going the route of all Document objects implement all XXXDocument interfaces as above, then we should do one of the following:

a. Drop title from SVGDocument when we come to expressing its interfaces in Web
   IDL, and assume that all SVGDocument objects are also HTMLDocuments

b. Define in Web IDL that two attributes on mixin interfaces with the same name
   and type like this is allowed, as long as they're "the same"
Comment 7 Ian 'Hixie' Hickson 2011-08-15 03:57:04 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: The HTML spec intentionally defers to the SVG spec in the case where the SVG doc.title is to reign. Once SVG is updated so that SVGDocument is always implemented in SVG UAs, its doc.title will presumable similarly defer back to HTML in cases where the SVG one doesn't apply. That way both specs can co-exist without the other having to be updated when either one changes.

Both interfaces need to define it, since there are HTML UAs that aren't SVG UAs and SVG UAs that aren't HTML UAs.
Comment 8 Ms2ger 2011-08-15 07:40:54 UTC
The spec states:

If the root element is an svg element in the "http://www.w3.org/2000/svg" namespace, and the user agent supports SVG, then the setter must defer to the setter for the IDL attribute of the same name on the SVGDocument interface (if it is readonly, then this will raise an exception). Stop the algorithm here. [SVG]

The parenthetical is factually incorrect. Please fix that.
Comment 9 Ian 'Hixie' Hickson 2011-08-23 05:00:20 UTC
What should it say instead? Doesn't setting a readonly property throw any more?
Comment 10 Simon Pieters 2011-08-23 09:02:37 UTC
It doesn't throw in non-strict mode. It throws in strict mode. IMHO the parenthesis can be removed altogether.
Comment 11 Ian 'Hixie' Hickson 2011-09-04 01:26:34 UTC
Ok, I'll remove the parenthetical.
Comment 12 Ian 'Hixie' Hickson 2011-09-22 22:30:13 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with comment 10.
Comment 13 contributor 2011-09-22 22:31:57 UTC
Checked in as WHATWG revision r6563.
Check-in comment: accuracy
http://html5.org/tools/web-apps-tracker?from=6562&to=6563
Comment 14 Ms2ger 2011-09-23 08:09:35 UTC
Thank you.