-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[zh-cn]: update the translation of Location hash
property
#24798
base: main
Are you sure you want to change the base?
Conversation
Preview URLs (comment last updated: 2024-12-13 12:43:01) |
<a id="myAnchor" href="/zh-CN/docs/Location.href#示例">示例</a> | ||
<script> | ||
var anchor = document.getElementById("myAnchor"); | ||
console.log(anchor.hash); // 返回'#Examples' | ||
const anchor = document.getElementById("myAnchor"); | ||
console.log(anchor.hash); // '#示例' | ||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the example here appropriate?
The
Location
interface is accessible via Document.location and Window.location respectively.
--- from TheLocation
interface
I don't think we should use an <a>
element here, as <a>
element is the implemetation of HTMLAnchorElement
interface (not the Location
interface).
Another issue on the content of this example. The hash
property would be percent-encoded (see the test I made below), so the description above is also wrong 😢
It seems that only non-ascii characters will be encoded (details: mdn/content#37003)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我先去修改上游
This pull request has merge conflicts that must be resolved before it can be merged. |
Description
Related issues and pull requests