You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chrome, Firefox, and Safari all have special behavior in HTMLImageElement.src (and other URL-related reflected attributes?) which "completes" the URL from the string provided in the actual attribute.
At http://example.com, we have the following behavior which is compatible across these browsers:
// At http://example.com/constimg=document.createElement('img');img.src='/foo';img.src;// returns "http://example.com/foo"img.getAttribute('src');// returns "/foo"
I'm not sure if this behavior is specified or not. In chrome we have a "URL" IDL attribute in the IDL for src which generates code to do this behavior.
In about:blank documents, however, Chrome returns an empty string, I think because it considers the URL to not be valid. Firefox and Safari just return what was assigned into the attribute:
// At about:blankconstimg=document.createElement('img');img.src='/foo';// Chrome returns ""// Firefox+Safari return "/foo"img.src;
What is the desired behavior here? Should I just make Chrome return whatever the actual attribute value is for non-valid URLs, like in about:blank documents?
The text was updated successfully, but these errors were encountered:
In particular, this means the bug is in Chromium's URL reflected attribute thing. This maybe the source of some of Chrome's Interop 2023 failures on URLs. /cc @hayatoito No, nevermind, HTMLAnchorElement does not use [Reflect, URL] in this way.
What is the issue with the HTML Standard?
Chrome, Firefox, and Safari all have special behavior in HTMLImageElement.src (and other URL-related reflected attributes?) which "completes" the URL from the string provided in the actual attribute.
At http://example.com, we have the following behavior which is compatible across these browsers:
I'm not sure if this behavior is specified or not. In chrome we have a "URL" IDL attribute in the IDL for
src
which generates code to do this behavior.In about:blank documents, however, Chrome returns an empty string, I think because it considers the URL to not be valid. Firefox and Safari just return what was assigned into the attribute:
What is the desired behavior here? Should I just make Chrome return whatever the actual attribute value is for non-valid URLs, like in about:blank documents?
The text was updated successfully, but these errors were encountered: