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

Open
electricface opened this issue Jul 12, 2019 · 6 comments

Comments

@electricface
Copy link

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

This comment has been minimized.

Copy link
Author

commented Jul 12, 2019

set undefined?

@ALTree ALTree added the Question label Jul 12, 2019

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

@dpinela

This comment has been minimized.

Copy link
Contributor

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 label Aug 9, 2019

@agnivade

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

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

@andybons andybons closed this Aug 12, 2019

@neelance

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

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

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

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

@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

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Sure. Changed the title.

@neelance neelance self-assigned this Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.