-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Add __proto__ key initializer to "Inheritance and the prototype chain" #16090
Conversation
TBH, I'm not entirely sure what the organization of this page is. We have "Different ways to create objects and the resulting prototype chain" as an H2 heading, and then "Summary of methods for extending the prototype chain" as a child H3 heading, which seems to describe how to create an object ( On second thought I think maybe I can move my section to be parallel with |
That might be better yeah — but agreed, the organization of the page overall leaves a bit to be desired |
Preview URLsFlawsNone! 🎉 External URLsURL: No new external URLs (this comment was updated 2022-05-17 11:18:17.182930) |
console.log(inst.bar_prop); | ||
``` | ||
|
||
<table class="standard-table"> |
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.
Note to other reviewers: the reason this is an HTML table here rather than a Markdown table is that the corresponding existing sections of this article use similar HTML tables — so this is following the existing structure.
Probably we should replace all the HTML tables in the docs with Markdown tables, but that’s outside the scope of this patch.
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.
In fact, I'm not entirely sure how that can be converted to a Markdown table: is there a syntax for <caption>
?
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.
In fact, I'm not entirely sure how that can be converted to a Markdown table: is there a syntax for
<caption>
?
The equivalent is to just have a paragraph that precedes the table.
Proof that I don't understand the KumaScript syntax... Need some guidance on how to point to the right document. Is using URL links the only way? |
files/en-us/web/javascript/inheritance_and_the_prototype_chain/index.md
Outdated
Show resolved
Hide resolved
…/index.md Co-authored-by: Michael[tm] Smith <[email protected]>
In general it’s always OK to not use a KumaScript macro at all but instead just use a normal Markdown hyperlink — for example, object initializer (Also worth mentioning that it’s OK to assume that existing content may have been written in a way that doesn’t follow current best practices, so you’re free to use your judgement to depart from the whatever (potentially bad) precedents may exist in whatever content you may be updating.) |
Being a first-time contributor, I'm not really aware of what the best practices for MDN is. And TBH, as a docs framework developer myself, the biggest complaint I've heard is that "URL links are not stable enough" and "we want immutable doc references" which |
After a few re-reads I think I've got the gist of how the two places differ. I think the current approach makes more sense, but it's definitely not immediately apparent to a reader what the logical division is. |
I'm slightly confused about the Netlify deploy preview: is it enabled for MDN? |
files/en-us/web/javascript/inheritance_and_the_prototype_chain/index.md
Outdated
Show resolved
Hide resolved
Dunno — where do you see it mentioned? |
Ah, the action seems to be |
Joshua, thanks much, and congrats on landing your first docs change here — welcome aboard 🎉 |
Thank you! ⭐️ |
Summary
Motivation
Close #16068
Supporting details
I've run some benchmarks:
https://jsben.ch/vLqVS
The
__proto__
key turns out to be the fastest!Related issues
Metadata