pipes: Infixes

Description Usage Arguments Operators Examples

Description

Convenient pipes for more sophisticated selectors.

Usage

1
2
3
4
5
lhs %child% rhs

lhs %or% rhs

lhs %with% rhs

Arguments

lhs, rhs

Selectors as returned by sel_* family of functions.

Operators

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# select all paragraph 'p' with "red" class
sel_tag("p") %with% sel_class("red")

# the other way around works equally well
sel_class("red") %with% sel_tag("p")

# select multiple elements
# where id = "x" or class = "center" 
sel_id("x") %or% sel_class("center")

# select element with id = "x" and parent's id = "y"
sel_id("y") %child% sel_id("y")

linne documentation built on Jan. 8, 2021, 2:24 a.m.