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

Support the undefined property of the GlobalObject #11

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

PrestonLTaylor
Copy link
Owner

We now support the undefined property on the GlobalObject.

This allows the value of undefined to be used within our AST.

For example:

if (x === undefined)
{
    // Do something if undefined
}

is now supported

This creates a property named "undefined" with the value of undefined as
defined in the spec.
In some places in the spec, a function returns a Property Descriptor or
undefined (etc.). So for this behaviour we use
The spec wants us to return a property descriptor not the actual value.
This allows support for undefined being resolved to work.

Before, when getting an undefined property value from object, we'd check if a
value was undefined and if it was we returned that the property doesn't
exist.

Now we can have properties that are defined but have a value of
undefined.
@PrestonLTaylor PrestonLTaylor merged commit 44f8b48 into master Apr 17, 2024
2 checks passed
@PrestonLTaylor PrestonLTaylor deleted the undefined-value-feat branch April 17, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant