Repository navigation
Set translate as an attribute, not a property - #57
Open
Neverbirth wants to merge 2 commits into
Open
Neverbirth wants to merge 2 commits into
Neverbirth wants to merge 2 commits into
Conversation
The translate property is a boolean, so assigning "no" to it set translate="yes". Needs haxetink/tink_domspec#44 for the attribute; the tink_domspec pin points at that PR's commit until it is merged.
Neverbirth
force-pushed
the
translate-attribute
branch
from
November 24, 2026 18:57
a65be09 to
c87ce94
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
translate="no"work, so page translators (Google, Microsoft, Safari) leave an element alone.Attributes are assigned as DOM properties by default, but the
translateproperty is a boolean: assigning"no"to it is truthy and setstranslate="yes".translateis now set withsetAttribute, asrolealready is.The new
Translatetest fails without the change ("yes" == "no") and passes with it; all 31 assertions pass in Chromium.tink_domspec is pinned to its master (46a2202), which has the attribute since haxetink/tink_domspec#44.