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 20927 - "update steps"
Summary: "update steps"
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-09 01:39 UTC by Ian 'Hixie' Hickson
Modified: 2013-04-09 18:13 UTC (History)
2 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-02-09 01:39:15 UTC
http://url.spec.whatwg.org/#concept-uu-update

Please invoke the update steps with a "new output value" (the serialisation of /url/, probably).
Comment 1 Anne 2013-02-10 11:01:45 UTC
You could just forward the object's url concept. I think that's going to be the solution long term, so that e.g. fetch does not have to parse a string again (although you will need to serialize it to set the href content attribute).
Comment 2 Ian 'Hixie' Hickson 2013-02-13 00:08:54 UTC
I don't mind if you send me the absolute url or the parsed url, I just want the value somehow. (If you send me the parsed one, I'll just serialise it.) I don't have the value anywhere on my side since the /url/ object doesn't exist except in the mind of the URLUtils spec.
Comment 3 Anne 2013-02-13 07:13:49 UTC
If there's no object then all kinds of algorithms in the URL Standard will fail. Pretty much all the attributes depend on there being an object they can return or modify bits from.
Comment 4 Ian 'Hixie' Hickson 2013-02-13 19:42:21 UTC
Can't you maintain the object on your side?

On my side I just have a string, e.g. a content attribute. It seems silly to have the content attribute also have to define that it maintains some object state and so on when it's really just a string at the end of the day.
Comment 5 Anne 2013-02-13 20:01:36 UTC
Well, ideally we parse these only once. So you'd pass e.g. a parsed URL to Fetch rather than having Fetch parse it again. 

Given that it's the object that implements URLUtils that has the associated url, you should be able to just access it without having to do bookkeeping yourself.
Comment 6 Ian 'Hixie' Hickson 2013-02-13 22:41:17 UTC
Ok, what would e.g. the <area> element's requirements look like?
Comment 7 Anne 2013-02-14 11:54:13 UTC
<area>'s update steps are to set <area>'s href content attribute to the serialization of <area>'s concept-UU-url.
Comment 8 Ian 'Hixie' Hickson 2013-02-15 02:02:12 UTC
I meant the other way around. When does its concept-UU-url come into existence? What should that requirement look like?
Comment 9 Anne 2013-02-15 11:49:00 UTC
It's always in existence effectively (because <area> implements URLUtils), but initially null, until initialized through the "set the input" algorithm, at which point it could still be null I realize now if parsing failed. In which case you want to grab input. This happens if someone would set <area>.href to http:test:test.

So <area> would say that on creation you run the "set the input" algorithm if there's a href value. And when the update steps are run you check url and if it's null you use concept-UU-input and otherwise you serialize url.
Comment 10 Ian 'Hixie' Hickson 2013-02-23 00:41:04 UTC
Taking so I can take another crack at it.
Comment 11 Ian 'Hixie' Hickson 2013-04-09 17:45:48 UTC
I really think it would be better if the "update steps" were invoked with a value that just took care of all that, unless there's some reason that the behaviour should be different for different cases?

What strings would case a parse failure so I can test it?
Comment 12 Ian 'Hixie' Hickson 2013-04-09 18:13:18 UTC
Nevermind, I just put all the boilerplate in the HTML spec. See diff in bug 20072.