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

Add Sizzle/jQuery support #22

Closed
GoogleCodeExporter opened this Issue Jul 26, 2015 · 6 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Jul 26, 2015

I've made changes against the trunk to support Sizzle (the selector engine for 
jQuery). As I am sure you know many folks use jQuery, so I think saying 
firepath supports it will bring it even more users (as it deserves).

I've attached the patch file. You also need to add sizzle.js (from 
http://sizzlejs.com/) to the content directory. You do not need all of jQuery.

At a user level, Sizzle has been added to the drop-down of evaluation modes. 
The user can select it and create Sizzle queries just like they do with 
CSS/Xpath. I believe it also properly turns red when the query is wrong. There 
isn't functionality for generating a Sizzle selector because that would just be 
a CSS selector.

At the code level, I added the evaluationMode "sizzle". And updated the 
evaluate and validate code to use it. In the end Sizzle works like the existing 
css selector behavior, its just called slightly differently. I also had to 
change code to have a sizzle selector error. I refactored how error messages 
are created to support that in a clean way (and I think a cleaner way in 
general).

Original issue reported on code.google.com by coolr...@gmail.com on 15 Mar 2011 at 3:13

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 26, 2015

Here is the patch file against the trunk as of 3/15/11

Original comment by coolr...@gmail.com on 15 Mar 2011 at 3:14

Attachments:

GoogleCodeExporter commented Jul 26, 2015

Here is the patch file against the trunk as of 3/15/11

Original comment by coolr...@gmail.com on 15 Mar 2011 at 3:14

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 26, 2015

Thanks you very much for your contribution!
I will try to take a look at the patch and integrate it to trunk sometime this 
week.

Original comment by pierre.t...@gmail.com on 16 Mar 2011 at 1:31

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

GoogleCodeExporter commented Jul 26, 2015

Thanks you very much for your contribution!
I will try to take a look at the patch and integrate it to trunk sometime this 
week.

Original comment by pierre.t...@gmail.com on 16 Mar 2011 at 1:31

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 26, 2015

I apply the patch and made the changes necessary to inject Sizzle inside the 
document in which to evaluate the selector. The changes were committed to trunk 
at revision r29.

Could you please try it and let me know if it works for you.

Also could you add yourself as a contributor to the install.rdf and send me the 
patch.

Thanks again for your contribution.

Original comment by pierre.t...@gmail.com on 20 Mar 2011 at 1:52

  • Changed state: Fixed
  • Added labels: Milestone-0.9.6

GoogleCodeExporter commented Jul 26, 2015

I apply the patch and made the changes necessary to inject Sizzle inside the 
document in which to evaluate the selector. The changes were committed to trunk 
at revision r29.

Could you please try it and let me know if it works for you.

Also could you add yourself as a contributor to the install.rdf and send me the 
patch.

Thanks again for your contribution.

Original comment by pierre.t...@gmail.com on 20 Mar 2011 at 1:52

  • Changed state: Fixed
  • Added labels: Milestone-0.9.6
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 26, 2015

Seems to be working just fine for me, very handy really :). I've attached the 
contributor patch (thanks :).

Original comment by coolr...@gmail.com on 21 Mar 2011 at 9:21

Attachments:

GoogleCodeExporter commented Jul 26, 2015

Seems to be working just fine for me, very handy really :). I've attached the 
contributor patch (thanks :).

Original comment by coolr...@gmail.com on 21 Mar 2011 at 9:21

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 26, 2015

Patch applied, thanks again.

Original comment by pierre.t...@gmail.com on 22 Mar 2011 at 7:41

  • Changed state: Verified

GoogleCodeExporter commented Jul 26, 2015

Patch applied, thanks again.

Original comment by pierre.t...@gmail.com on 22 Mar 2011 at 7:41

  • Changed state: Verified
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 26, 2015

Released on March 22, 2011

Original comment by pierre.t...@gmail.com on 6 Aug 2011 at 3:38

  • Changed state: Released

GoogleCodeExporter commented Jul 26, 2015

Released on March 22, 2011

Original comment by pierre.t...@gmail.com on 6 Aug 2011 at 3:38

  • Changed state: Released
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment