using text predicate in selectors

12 views
Skip to first unread message

Oliver Mooney

unread,
Jul 7, 2015, 4:06:56 PM7/7/15
to enf...@googlegroups.com
How complete is Kioo's coverage of Enlive's selectors? I've the following utility function that works fine with enlive: 

(defn text= [s] (pred #(= s (text %))))

When I use it with Kioo (via reagent) it complains of undeclared vars (pred and text) whether or not I use them as naked vars or prefaced with the kioo.reagent namespace. Any attempt to use it in selectors won't compile, e.g.

[(text= "Text to match")] identity

results in a null-pointer exception.

I'm trying to match an <option> tag based on its text content. The HTML is available at compile time. If I'm going about it the wrong way any pointers would be great.

Thanks,
Oliver.

Creighton Kirkendall

unread,
Jul 7, 2015, 4:14:31 PM7/7/15
to Enfocus
Oliver,
Right now kioo does not support custom selectors.  I have put some thought into how to support them and I think it is possible.  Can you create a ticket for this?

Creighton

--

---
You received this message because you are subscribed to the Google Groups "Enfocus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enfocus+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oliver Mooney

unread,
Jul 7, 2015, 4:27:33 PM7/7/15
to enf...@googlegroups.com
Thanks Creighton, it's issue 55: https://github.com/ckirkendall/kioo/issues/55
Reply all
Reply to author
Forward
0 new messages