How to translate this JavaScript code snippet to Parenscript?

145 Views Asked by At

I have this code snippet working on the browser using JavaScript:

document.querySelectorAll('[rel="next"]');

It returns an array that is empty or filled depending on the current web page.

I am trying to translate it to Parenscript inside a function as:

  (ps:chain document query-selector-all ...)

I am unable to figure out how to translate the placement of [rel="next"] as an argument to the function call. Could someone give a hint?

Obs.: I am using Common Lisp/SBCL.

1

There are 1 best solutions below

0
On BEST ANSWER
(ps:chain document (query-selector-all "[rel=\"next\"]"))