This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Maybe this is intentional, on current spec no one set URLQuery's url object though it is not a public API. set the input, Setting the search, and Setting the query looks need to set url object.
If you mean something other than http://url.spec.whatwg.org/#concept-uq-update could you please clarify.
(In reply to comment #1) > If you mean something other than > http://url.spec.whatwg.org/#concept-uq-update could you please clarify. As far as I understand, current spec causes following situation: url = URL.new("http://example.com/?foo=bar") q = url.query q.get("foo") #=> "bar" q.set("foo", "blah") q.get("foo") #=> "blah" q.url_object #=> null url.href #=> http://example.com/?foo=bar I changed the URLQuery object, but original URL object is unchanged. I felt this is odd.
When you do set() the update steps are run and those update the associated url object.
(In reply to comment #3) > When you do set() the update steps are run and those update the associated > url object. It can get "the associated url object" from URL Query's url object. But when URL Query's associated url object property is set?
So url object of x is just defined as whatever object that has its query object set to x. It's mostly a convenience. I guess I could add a note to that effect once I think of what it should say.
(In reply to comment #5) > So url object of x is just defined as whatever object that has its query > object set to x. It's mostly a convenience. I guess I could add a note to > that effect once I think of what it should say. You mean URLUtils and URL doesn't specify to set url object, but a browser may implement another object which sets the object x's url object?
Your questions are hard to follow for me, but from what you say in comment 4 "But when URL Query's associated url object property is set?" What the standard does is it defines this in English as follows: "A URLQuery object has an associated /url object/ which is an object implementing URLUtils whose /query object/ is the URLQuery object, and null if there is no such object." So basically it does not have to be set, it will always be something. When you implement this you'll have to do this manually and there's a number of ways you can do that.