-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Remove a few pointless references to internal slots #18461
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
Conversation
files/en-us/web/javascript/reference/global_objects/date/tostring/index.md
Outdated
Show resolved
Hide resolved
| `boundThis` is `[[BoundThis]]`, | ||
| `args` is `[[BoundArguments]]`, followed by the | ||
| arguments passed by the function call. | ||
| The `bind()` function creates a new **bound function**, which is an _exotic function object_ that wraps the original function object (in some sense, this is a [proxy](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) that traps [apply](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply)). Calling the bound function generally results in the execution of its wrapped function. |
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.
I think we have never defined an exotic (function) object. Should we create a glossary entry or link to something like this?
Or completely hide the notion of exotic objects?
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.
Err... I'll just hide it. It's not a critical piece of information anyway. (Arrays being exotic is perhaps a more interesting case.)
| `boundThis` is `[[BoundThis]]`, | ||
| `args` is `[[BoundArguments]]`, followed by the | ||
| arguments passed by the function call. | ||
| The `bind()` function creates a new **bound function**, which is an _exotic function object_ that wraps the original function object (in some sense, this is a [proxy](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) that traps [apply](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply)). Calling the bound function generally results in the execution of its wrapped function. |
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.
The word trap is not defined here and it is uncommon (= not explained in a learn area article)
In the Proxy article, we have this definition:
Handler functions are sometimes called traps, presumably because they trap calls to the target object.
Maybe, here we should have a link to a glossary entry explaining terminology about proxies, or directly to a place inside the proxy article.
This can be done in a follow-up I think.
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.
I've just removed the mention of proxies as it's not too critical.
files/en-us/web/javascript/reference/global_objects/function/bind/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jean-Yves Perrier <[email protected]>
teoli2003
left a comment
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.
Thank you!
* Move new contrib docs * underscores * renaming * removing redirect about * creating moving * experimental * does belong * editorial * code style guide * writing style guide * howto and seo * related_criteria for inclusion * file rename, link update * Updated Syntax for fetch-related pages (#17914) * Updated Syntax * port changes Co-authored-by: Joshua Chen <[email protected]> * Fix wrong example quote (#18458) * Unshorten code in method definition (#18457) * fixes #18444 * Update index.md Co-authored-by: Joshua Chen <[email protected]> * fix: correct the language of code examples (#18455) * Add `const` var declaration to FileSystemFileHandle sample code (#17930) * Add `const` var declaration * Update index.md * Update index.md Co-authored-by: Joshua Chen <[email protected]> * Update dom-examples links (#18462) * MediaRecorder: Update dom-examples links (#18464) * Update dom-example link (#18465) * update a broken link (#18466) * remove a broken link (#18467) * Update a broken link (#18468) * Fixes broken live sample (#18456) * Intl.NumberFormat - flyby fixes (#18258) * Fix `channelCount` semantics in `MediaStreamAudioSourceNode`. (#18472) * Fix `channelCount` semantics. This sparked confusion, e.g. in WebAudio/web-audio-api#2496. Source: I am this specification's editor. * Fix markup. * Fix parenthesis * Fix `channelCount` semantics. (#18473) * Fix `channelCount` semantics. This sparked confusion, e.g. in WebAudio/web-audio-api#2496. Source: I am this specification's editor. * Fix markup. * Fix parenthesis * Remove a few pointless references to internal slots (#18461) * Remove a few pointless references to internal slots * Update index.md * Apply suggestions from code review Co-authored-by: Jean-Yves Perrier <[email protected]> * simplify description Co-authored-by: Jean-Yves Perrier <[email protected]> * Fix syntax errors (#18475) * Fix syntax error Reported in https://github.com/orgs/mdn/discussions/158 (PR11) The macro just prints `Deprected` on the next line. * Fix in blobbuilder * Remove js annotation for webidl blocks Co-authored-by: Jean-Yves Perrier <[email protected]> * fix: syntax errors in JS example sections (v5) (#18442) * syntax fixes * fix remaining syntax errors * Adapt syntax box Co-authored-by: Jean-Yves Perrier <[email protected]> * Use diff instead of js to mark a diff block (#18477) * Update good vs bad example * fix a typo * marking it as diff * Bump @mdn/yari from 1.10.0 to 1.10.2 (#18479) * Correct a few usage of internal methods (#18476) * Change 'nodes' link to link directly to DOM nodes (#18480) The link to DOM 'nodes' currently links to the 'nodes' glossary page. I changed the link to DOM 'nodes' to directly link to the DOM nodes page. * Shorten Global object glossary entry (#18474) * FF103 Native Error types are serializable (#18384) * FF104 Native Error types are serializable * Fix error - this is in FF103, not 104 * Update files/en-us/web/api/web_workers_api/structured_clone_algorithm/index.md Co-authored-by: Joshua Chen <[email protected]> * Remove stack info from release note * Update files/en-us/mozilla/firefox/releases/103/index.md Co-authored-by: Joshua Chen <[email protected]> * Demix invalid event from GlobalEventHandlers (#18451) * Demix slotchange from GlobalEventHandlers (#18225) * fix: various typos (#18483) * Fix typo (#18486) Remove stray 'a' in "contain a separator characters like the following" -> "contain separator characters like the following" * Fix link text (#18488) * Add missing period (#18487) * fix broken link (#18490) * Remove continuity descriptions from `steps(...)` (#18482) As per the spec (https://drafts.csswg.org/css-easing/#step-easing-functions), Figure 5, all step functions are right-continuous (i.e. You'd encounter solid dots approaching discontinuity from the right side). The `direction` keyword should strictly describe when the jumps (i.e. discontinuities) happen. * OpenType guide: font-variant-position is not mutually exclusive with <sup>/<sub> (#18459) Thank you! * Fix links for other references (#18501) * update a broken link (#18500) * Comment out ellipsis in code blocks (#18496) * Comment out ellipsis in code blocks (#18498) * Comment out ellipsis in code blocks (#18497) * Elaborate on destructuring assignment (#18495) * Elaborate on destructuring assignment * add headings * Mark kumascript code blocks js -> plain (#18493) * remove a broken link (#18499) * remove a broken link * Apply suggestions from code review Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> * Demix pointer capture events from GlobalEventHandlers (#18450) * Demix pointer capture events from GlobalEventHandlers * Update files/en-us/web/api/element/lostpointercapture_event/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Add event properties section (still seems redundant...) * Add additional event properties section Co-authored-by: Jean-Yves Perrier <[email protected]> * Improvements to a few Number APIs (#18502) * Minor spread syntax rewrite (#18503) * Minor spread syntax rewrite * Update files/en-us/web/javascript/reference/operators/spread_syntax/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> * Window.open() rework (#18118) * first pass linting: remove xref macros, fix examples, fix code words * 2nd pass: remove broken/insecure links, fix remaining typos * Third pass - rework * fix flaws * Apply 1st set of suggestions Co-authored-by: Jean-Yves Perrier <[email protected]> * Taking @teoli2003 review into account Co-authored-by: Jean-Yves Perrier <[email protected]> * Fix broken block code in `Bracket notation` section (#18507) Add three missing backticks at ending of block code * Fix typo (#18508) * Fix missing parenthesis (#18509) * Mention string iteration goes by Unicode characters (#18504) * Mention string iteration goes by Unicode characters * add a flag example * Fix "repository of wavetables" text's broken link (#18510) * Add TBD content to files frontmatter and macros * Add TBD content to more empty files * TBD content * Add missing front matter data to files * Fix slug * Fix slugs * fix remaining writing guideline docs Co-authored-by: Ruth John <[email protected]> Co-authored-by: Prajwal Borkar <[email protected]> Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: Davide Briano <[email protected]> Co-authored-by: Xavi Lee <[email protected]> Co-authored-by: A1lo <[email protected]> Co-authored-by: Zhang Yi Jiang <[email protected]> Co-authored-by: Onkar Ruikar <[email protected]> Co-authored-by: Hamish Willee <[email protected]> Co-authored-by: Paul Adenot <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Lion Ralfs <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: simonvarey <[email protected]> Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]> Co-authored-by: Nick Schonning <[email protected]> Co-authored-by: kokke <[email protected]> Co-authored-by: de-oz <[email protected]> Co-authored-by: Christopher Dignam <[email protected]> Co-authored-by: dshin-moz <[email protected]> Co-authored-by: J. S. Choi <[email protected]> Co-authored-by: Masahiro FUJIMOTO <[email protected]> Co-authored-by: SphinxKnight <[email protected]> Co-authored-by: Minh-Thuan Nguyen <[email protected]> Co-authored-by: Remco van 't Veer <[email protected]> Co-authored-by: Jeremy Pearson <[email protected]> Co-authored-by: Schalk Neethling <[email protected]>
* Move new contrib docs (#18041) * Move new contrib docs * underscores * renaming * removing redirect about * creating moving * experimental * does belong * editorial * code style guide * writing style guide * howto and seo * related_criteria for inclusion * file rename, link update * Updated Syntax for fetch-related pages (#17914) * Updated Syntax * port changes Co-authored-by: Joshua Chen <[email protected]> * Fix wrong example quote (#18458) * Unshorten code in method definition (#18457) * fixes #18444 * Update index.md Co-authored-by: Joshua Chen <[email protected]> * fix: correct the language of code examples (#18455) * Add `const` var declaration to FileSystemFileHandle sample code (#17930) * Add `const` var declaration * Update index.md * Update index.md Co-authored-by: Joshua Chen <[email protected]> * Update dom-examples links (#18462) * MediaRecorder: Update dom-examples links (#18464) * Update dom-example link (#18465) * update a broken link (#18466) * remove a broken link (#18467) * Update a broken link (#18468) * Fixes broken live sample (#18456) * Intl.NumberFormat - flyby fixes (#18258) * Fix `channelCount` semantics in `MediaStreamAudioSourceNode`. (#18472) * Fix `channelCount` semantics. This sparked confusion, e.g. in WebAudio/web-audio-api#2496. Source: I am this specification's editor. * Fix markup. * Fix parenthesis * Fix `channelCount` semantics. (#18473) * Fix `channelCount` semantics. This sparked confusion, e.g. in WebAudio/web-audio-api#2496. Source: I am this specification's editor. * Fix markup. * Fix parenthesis * Remove a few pointless references to internal slots (#18461) * Remove a few pointless references to internal slots * Update index.md * Apply suggestions from code review Co-authored-by: Jean-Yves Perrier <[email protected]> * simplify description Co-authored-by: Jean-Yves Perrier <[email protected]> * Fix syntax errors (#18475) * Fix syntax error Reported in https://github.com/orgs/mdn/discussions/158 (PR11) The macro just prints `Deprected` on the next line. * Fix in blobbuilder * Remove js annotation for webidl blocks Co-authored-by: Jean-Yves Perrier <[email protected]> * fix: syntax errors in JS example sections (v5) (#18442) * syntax fixes * fix remaining syntax errors * Adapt syntax box Co-authored-by: Jean-Yves Perrier <[email protected]> * Use diff instead of js to mark a diff block (#18477) * Update good vs bad example * fix a typo * marking it as diff * Bump @mdn/yari from 1.10.0 to 1.10.2 (#18479) * Correct a few usage of internal methods (#18476) * Change 'nodes' link to link directly to DOM nodes (#18480) The link to DOM 'nodes' currently links to the 'nodes' glossary page. I changed the link to DOM 'nodes' to directly link to the DOM nodes page. * Shorten Global object glossary entry (#18474) * FF103 Native Error types are serializable (#18384) * FF104 Native Error types are serializable * Fix error - this is in FF103, not 104 * Update files/en-us/web/api/web_workers_api/structured_clone_algorithm/index.md Co-authored-by: Joshua Chen <[email protected]> * Remove stack info from release note * Update files/en-us/mozilla/firefox/releases/103/index.md Co-authored-by: Joshua Chen <[email protected]> * Demix invalid event from GlobalEventHandlers (#18451) * Demix slotchange from GlobalEventHandlers (#18225) * fix: various typos (#18483) * Fix typo (#18486) Remove stray 'a' in "contain a separator characters like the following" -> "contain separator characters like the following" * Fix link text (#18488) * Add missing period (#18487) * fix broken link (#18490) * Remove continuity descriptions from `steps(...)` (#18482) As per the spec (https://drafts.csswg.org/css-easing/#step-easing-functions), Figure 5, all step functions are right-continuous (i.e. You'd encounter solid dots approaching discontinuity from the right side). The `direction` keyword should strictly describe when the jumps (i.e. discontinuities) happen. * OpenType guide: font-variant-position is not mutually exclusive with <sup>/<sub> (#18459) Thank you! * Fix links for other references (#18501) * update a broken link (#18500) * Comment out ellipsis in code blocks (#18496) * Comment out ellipsis in code blocks (#18498) * Comment out ellipsis in code blocks (#18497) * Elaborate on destructuring assignment (#18495) * Elaborate on destructuring assignment * add headings * Mark kumascript code blocks js -> plain (#18493) * remove a broken link (#18499) * remove a broken link * Apply suggestions from code review Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> * Demix pointer capture events from GlobalEventHandlers (#18450) * Demix pointer capture events from GlobalEventHandlers * Update files/en-us/web/api/element/lostpointercapture_event/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Add event properties section (still seems redundant...) * Add additional event properties section Co-authored-by: Jean-Yves Perrier <[email protected]> * Improvements to a few Number APIs (#18502) * Minor spread syntax rewrite (#18503) * Minor spread syntax rewrite * Update files/en-us/web/javascript/reference/operators/spread_syntax/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> * Window.open() rework (#18118) * first pass linting: remove xref macros, fix examples, fix code words * 2nd pass: remove broken/insecure links, fix remaining typos * Third pass - rework * fix flaws * Apply 1st set of suggestions Co-authored-by: Jean-Yves Perrier <[email protected]> * Taking @teoli2003 review into account Co-authored-by: Jean-Yves Perrier <[email protected]> * Fix broken block code in `Bracket notation` section (#18507) Add three missing backticks at ending of block code * Fix typo (#18508) * Fix missing parenthesis (#18509) * Mention string iteration goes by Unicode characters (#18504) * Mention string iteration goes by Unicode characters * add a flag example * Fix "repository of wavetables" text's broken link (#18510) * Add TBD content to files frontmatter and macros * Add TBD content to more empty files * TBD content * Add missing front matter data to files * Fix slug * Fix slugs * fix remaining writing guideline docs Co-authored-by: Ruth John <[email protected]> Co-authored-by: Prajwal Borkar <[email protected]> Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: Davide Briano <[email protected]> Co-authored-by: Xavi Lee <[email protected]> Co-authored-by: A1lo <[email protected]> Co-authored-by: Zhang Yi Jiang <[email protected]> Co-authored-by: Onkar Ruikar <[email protected]> Co-authored-by: Hamish Willee <[email protected]> Co-authored-by: Paul Adenot <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Lion Ralfs <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: simonvarey <[email protected]> Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]> Co-authored-by: Nick Schonning <[email protected]> Co-authored-by: kokke <[email protected]> Co-authored-by: de-oz <[email protected]> Co-authored-by: Christopher Dignam <[email protected]> Co-authored-by: dshin-moz <[email protected]> Co-authored-by: J. S. Choi <[email protected]> Co-authored-by: Masahiro FUJIMOTO <[email protected]> Co-authored-by: SphinxKnight <[email protected]> Co-authored-by: Minh-Thuan Nguyen <[email protected]> Co-authored-by: Remco van 't Veer <[email protected]> Co-authored-by: Jeremy Pearson <[email protected]> Co-authored-by: Schalk Neethling <[email protected]> * Page structures (#18644) Co-authored-by: Schalk Neethling <[email protected]> * docs: community docs (#18787) * docs: community docs Adds community docs to the `mdn` folder * Update files/en-us/mdn/community/contributing/getting-started/index.md * updating folder names Co-authored-by: Ruth John <[email protected]> Co-authored-by: Ruth John <[email protected]> * Contrib docs readthrough part 1 (#18994) * test change * Readthrough of contrib docs part1 * Move folders to howto and remove the duplicate inclusion_criteria (#19020) * Readthrough of contrib docs part2 (#19036) * chore: delete and redirect community docs (#19069) Deletes older documents and adds redirects to the new community docs. * adding sidebar for community docs (#19112) * adding sidebar for community docs * Update files/en-us/mdn/community/contributing/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/contributing/our_repositories/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/contributing/security_vulnerability_response/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/contributing/translated_content/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/discussions/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/issues/content_suggestions_feature_proposals/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/pull_requests/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/index.md Co-authored-by: Gabe <[email protected]> * Update files/en-us/mdn/writing_guidelines/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/users_teams/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/contributing/getting_started/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/issues/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/mdn_content/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/learn_forum/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/mdn_content/pull_requests/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/mdn_content/issues/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> * Update files/en-us/mdn/community/open_source_etiquette/index.md Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Gabe <[email protected]> * fix macros redirect * fix macros redirect * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects * fix redirects Co-authored-by: Dipika Bhattacharya <[email protected]> Co-authored-by: Ruth John <[email protected]> Co-authored-by: Prajwal Borkar <[email protected]> Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: Davide Briano <[email protected]> Co-authored-by: Xavi Lee <[email protected]> Co-authored-by: A1lo <[email protected]> Co-authored-by: Zhang Yi Jiang <[email protected]> Co-authored-by: Onkar Ruikar <[email protected]> Co-authored-by: Hamish Willee <[email protected]> Co-authored-by: Paul Adenot <[email protected]> Co-authored-by: Jean-Yves Perrier <[email protected]> Co-authored-by: Lion Ralfs <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: simonvarey <[email protected]> Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]> Co-authored-by: Nick Schonning <[email protected]> Co-authored-by: kokke <[email protected]> Co-authored-by: de-oz <[email protected]> Co-authored-by: Christopher Dignam <[email protected]> Co-authored-by: dshin-moz <[email protected]> Co-authored-by: J. S. Choi <[email protected]> Co-authored-by: Masahiro FUJIMOTO <[email protected]> Co-authored-by: SphinxKnight <[email protected]> Co-authored-by: Minh-Thuan Nguyen <[email protected]> Co-authored-by: Remco van 't Veer <[email protected]> Co-authored-by: Jeremy Pearson <[email protected]> Co-authored-by: Ruth John <[email protected]> Co-authored-by: Gabe <[email protected]>
Summary
Motivation
As discussed in https://github.com/orgs/mdn/discussions/150#discussioncomment-3168153, we'll gradually remove mentions of internal slots that just don't make much sense.
Supporting details
Related issues
Metadata