All predicatesShow -- Call jQuery on the SWISH interface

Select objects in the SWISH interface using jQuery, run an arbitrary JavaScript function on them and return the result. This predicate was introduced while adding functionality to request the contents of tabs in the SWISH interface.

Source jquery(+Selector, +Function) is det
Source jquery(+Selector, +Function, -Reply) is det
Run a jQuery query in the SWISH interface. Selector defines the receiver of the jQuery method, Function is the JavaScript function to run on the receiver and Reply is the Prolog representation of the result.
Selector- selects the jQuery receiver. It takes three forms:
  • If the selector is a string, it is simply interpreted as $(Selector).
  • If the selector is a compound, the functor defines the start point. If a (single) argument provided it is handed to the jQuery find method. Defines starting points are:
    The current SWISH runner object, jQuery class prologRunner.
    The current notebook (query) cell. jQuery class nbCell.
    The current notebook. jQuery class notebook
    The SWISH instance. jQuery class swish.
Function- is a compound term representing a JavaScript call. The functor name is used as method and the remaining arguments are converted by json_write_dict/2.
Reply- is the JavaScript reply, converted to Prolog by the Pengine.stringify() method.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

Source jquery(Arg1, Arg2, Arg3)