Skip to content
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

fix(reactivity): align the get/set operations to ECMA spec #3025

Closed
wants to merge 1 commit into from
Closed

fix(reactivity): align the get/set operations to ECMA spec #3025

wants to merge 1 commit into from

Conversation

HcySunYang
Copy link
Member

close: #3024

I would say that this PR introduces expensive operations(Reflect.getOwnPropertyDescriptor?), but it aligns with the ECMA spec. For issue #3024, I think it's also a good way to document it so that expensive operations can be avoided.

Related specs: https://www.ecma-international.org/ecma-262/11.0/index.html#sec-invariants-of-the-essential-internal-methods

The main part is:

[[Get]] ( P, Receiver )

  • The normal return type is any ECMAScript language type.
  • If P was previously observed as a non-configurable, non-writable own data property of the target with value V, then [[Get]] must return the SameValue as V.
  • If P was previously observed as a non-configurable own accessor property of the target whose [[Get]] attribute is undefined, the [[Get]] operation must return undefined.

[[Set]] ( P, V, Receiver )

  • The normal return type is Boolean.
  • If P was previously observed as a non-configurable, non-writable own data property of the target, then [[Set]] must return false unless V is the SameValue as P's [[Value]] attribute.
  • If P was previously observed as a non-configurable own accessor property of the target whose [[Set]] attribute is undefined, the [[Set]] operation must return false.

@LinusBorg LinusBorg added the need guidance The approach/solution in the PR is unclear and requires guidance from maintainer to proceed further. label Feb 1, 2021
@LinusBorg
Copy link
Member

@evan as this might be an expensive change, can you take a look for cost/benefit?

@LinusBorg LinusBorg added scope: reactivity 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. and removed 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Feb 1, 2021
@JshGrn
Copy link

JshGrn commented Mar 15, 2021

I don't suppose anyone has looked at this any further?

@HcySunYang HcySunYang added the 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. label Mar 19, 2021
@garyo
Copy link

garyo commented Sep 13, 2021

Just wondering what the status of this is, specifically regarding using three.js in Vue 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. need guidance The approach/solution in the PR is unclear and requires guidance from maintainer to proceed further. scope: reactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reactivity VS object with non-writable non-configurable property
5 participants