You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program returns the 2 <td> nodes under the first <tr> even though the selector gives the impression that it should look for a .start class in the decendents of that <tr> (and should not find any):
Correct me if I'm wrong but I think it might be working as intended in Cascadia, even though it differs from what folks may be used to with jQuery, in that (IIUC) the selector is always started from the root of the document, but only descendents of the contextual node are returned (if they do match).
This has come up in the context of PuerkitoBio/goquery#468, but after investigation and reading through some issues you closed, I have the feeling it is by design.
Thanks,
Martin
The text was updated successfully, but these errors were encountered:
Yes, you're understanding it correctly. Cascadia selectors have no concept of context. They work like vanilla JavaScript, not like JQuery. To understand what I mean by that, open that HTML in a browser and type the following in the console:
Hello Andy,
The following program returns the 2
<td>
nodes under the first<tr>
even though the selector gives the impression that it should look for a.start
class in the decendents of that<tr>
(and should not find any):Correct me if I'm wrong but I think it might be working as intended in Cascadia, even though it differs from what folks may be used to with jQuery, in that (IIUC) the selector is always started from the root of the document, but only descendents of the contextual node are returned (if they do match).
This has come up in the context of PuerkitoBio/goquery#468, but after investigation and reading through some issues you closed, I have the feeling it is by design.
Thanks,
Martin
The text was updated successfully, but these errors were encountered: