We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have a behavior difference in Firefox and Chrome where Firefox replaces an anchor with <span> when it has extra attributes while Chrome does not.
<span>
Repro: https://bug378931.bmoattachments.org/attachment.cgi?id=263746
Per the unlink command algorithm, it clears the value of the target anchor elements, where it removes href attribute in step 9. And then its step 10 has this note:
href
If we get past this step, we're something like <b class=foo> where we want to keep the extra attributes, so we stick them on a span.
<b class=foo>
Per the note the purpose of it is to keep the extra attributes of the element. But then the step says:
If element's specified command value for command is null, return the empty list.
Here, the "specified command value" becomes always null for "unlink" because the previous step just removed href:
"unlink"
If command is "createLink" or "unlink": If element is an a element and has an href attribute, return the value of that attribute. Return null.
Since the value is always null, the anchor elements always must disappear regardless of extra attributes.
The spec agrees with Chrome behavior but the note clearly suggests the original intention was for Firefox behavior.
What should be done here? Should Firefox be fixed or the spec?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have a behavior difference in Firefox and Chrome where Firefox replaces an anchor with
<span>
when it has extra attributes while Chrome does not.Repro: https://bug378931.bmoattachments.org/attachment.cgi?id=263746
Per the unlink command algorithm, it clears the value of the target anchor elements, where it removes
href
attribute in step 9. And then its step 10 has this note:Per the note the purpose of it is to keep the extra attributes of the element. But then the step says:
Here, the "specified command value" becomes always null for
"unlink"
because the previous step just removedhref
:Since the value is always null, the anchor elements always must disappear regardless of extra attributes.
The spec agrees with Chrome behavior but the note clearly suggests the original intention was for Firefox behavior.
What should be done here? Should Firefox be fixed or the spec?
The text was updated successfully, but these errors were encountered: