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

Are there any method to create an empty Selection? #34

Closed
guotie opened this issue Mar 21, 2014 · 3 comments
Closed

Are there any method to create an empty Selection? #34

guotie opened this issue Mar 21, 2014 · 3 comments

Comments

@guotie
Copy link

guotie commented Mar 21, 2014

Can I use Select{nil, nil, nil} ?

@githubnemo
Copy link

In go creating a new instance of an object zeros its memory, so &Selection{} gives you &Selection{nil, nil, nil}. However, I can't see a way to ever set a value to the document attribute, making the selection useless.

@mna
Copy link
Member

mna commented Mar 22, 2014

As @githubnemo said, you could create a zero-value selection, but it wouldn't be very useful because there is no document available. What are you trying to do?

@guotie
Copy link
Author

guotie commented Mar 23, 2014

I'm trying to delete some child selection of a selection. I think i should do it by use the html.Node

@guotie guotie closed this as completed Mar 23, 2014
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

No branches or pull requests

3 participants