Selectors

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(linne)

Introduction

The Get Started guide present basic selectors which are plenty enough in most cases. However, linne comes with some more sophisticated ones if needed.

Basics

Below are the basic selectors available in linne.

Examples

sel_id("btn")
sel_class("aClass")

Operators

You can also use some special operators to broaden or narrow down the selection.

Examples

sel_id('myId') %or% sel_class('myClass')
sel_tag('div') %with% sel_class('aClass')

When

You can also use the when_* family of functions to narrow the selection based on the state of the element.

Examples

sel_tag("a") # select all a tag
sel_tag("a") %>% when_active() # selects a tags that are active
sel_id("myId") %>% when_hover()


Try the linne package in your browser

Any scripts or data that you put into this service are public.

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