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

syscall/js: add "delete" operator #33079

Closed
electricface opened this issue Jul 12, 2019 · 7 comments
Closed

syscall/js: add "delete" operator #33079

electricface opened this issue Jul 12, 2019 · 7 comments
Labels
arch-wasm WebAssembly issues FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@electricface
Copy link

electricface commented Jul 12, 2019

What version of Go are you using (go version)?

$ go version
1.13beta1

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

What did you expect to see?

What did you see instead?

@electricface electricface changed the title syscall/js how to delete object syscall/js how to delete object property? Jul 12, 2019
@electricface
Copy link
Author

set undefined?

@ALTree ALTree changed the title syscall/js how to delete object property? syscall/js: how to delete object property? Jul 12, 2019
@dpinela
Copy link
Contributor

dpinela commented Jul 17, 2019

There's no way to do delete properties through syscall/js right now - perhaps we should add one? (Setting a property to undefined isn't quite the same thing as deleting it.)

cc @neelance

@agnivade agnivade added the arch-wasm WebAssembly issues label Aug 9, 2019
@agnivade
Copy link
Contributor

agnivade commented Aug 9, 2019

There is no direct way as of now. You have to resort to using eval.

@neelance
Copy link
Member

I think we should add this to js.Value, since this is one of JavaScript's basic operations. Setting to undefined is not the same. I'm waiting for the next development phase. Reopening.

@neelance neelance reopened this Aug 12, 2019
@andybons
Copy link
Member

@neelance can you retitle and label the issue to more accurately describe what changes you'll be making/investigating?

@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 12, 2019
@andybons andybons added this to the Go1.14 milestone Aug 12, 2019
@neelance neelance changed the title syscall/js: how to delete object property? syscall/js: add "delete" operator Aug 15, 2019
@neelance
Copy link
Member

Sure. Changed the title.

@neelance neelance self-assigned this Aug 15, 2019
@gopherbot
Copy link

Change https://golang.org/cl/197840 mentions this issue: syscall/js: add Value.Delete for deleting JavaScript properties

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants