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

Seek does not seem to support DocumentFragment #5

Open
lns0801 opened this issue Oct 23, 2018 · 2 comments
Open

Seek does not seem to support DocumentFragment #5

lns0801 opened this issue Oct 23, 2018 · 2 comments

Comments

@lns0801
Copy link

lns0801 commented Oct 23, 2018

I was looking for a lightweight selector engine, but seek seems to be the best alternative.
I am sorry that I can not find some element.

The code I have implemented is shown below.

var context = document.createDocumentFragment();
var wrapper= document.createElement('div');
wrapper.id = 'siblingTest';
wrapper.innerHTML= "<em id=\"siblingfirst\">1</em><em id=\"siblingnext\">2</em><em id=\"siblingthird\"><em id=\"siblingchild\"><em id=\"siblinggrandchild\"><em id=\"siblinggreatgrandchild\"></em></em></em></em><span id=\"siblingspan\"></span>";
context.appendChild( wrapper );
console.log( seek( "em:nth-child(2)", context ) );

When you insert the above code, the following value should be output to console.
[" </ em>"]
But seek returns an empty array.

I think it is an issue caused by DocumentFragment.
Please fix it.

Thank you.

@wonseop
Copy link
Contributor

wonseop commented Oct 24, 2018

This is so true, thanks!
Let's have a look ASAP.

@dhjang
Copy link

dhjang commented Nov 11, 2018

I fixed this issue through #26

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