-
Notifications
You must be signed in to change notification settings - Fork 66
"the document's URL" is ambiguous #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm still trying to get my head around all this. The closest thing I can find is the Fetch standard: https://fetch.spec.whatwg.org/#dom-request That uses similar, but not identical, language to what you propose:
What is the difference between "this Navigator object's relevant settings object" and "the current settings object"? Can I just use the same language as Fetch? |
The reason fetch uses that is because it's inside a constructor, so it's not being invoked on any particular https://html.spec.whatwg.org/multipage/webappapis.html#realms-settings-objects-global-objects is probably the right background reading, but to skip to the punchline:
|
OK thanks, that makes sense now. I went with "the this value" rather than "this Navigator" because it seems to more formally capture the concept (based on the WebIDL spec which has 22 occurrences of "the this value"). |
Well, the Web IDL spec is different because it's writing algorithms in ECMAScript land (where "this value" is well defined), not Web IDL land (where we don't have a good definition for this concept; see https://www.w3.org/Bugs/Public/show_bug.cgi?id=27301). But yeah, until we get our story straightened out for Web IDL land, "this value" works fine there too. |
Consider the situation:
Then navigate the frame containing window3 to window4, but save a reference to
declaredInWindow3
. Finally, from code in window5, call the saved function.Which of these five documents does
url
get resolved relative to?The proper pattern for this is to parse against
in which case the answer will be window2.
The text was updated successfully, but these errors were encountered: