Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

Selector

Selector provides two different approaches for selecting DOM elements and then operating on them. Common to both ideas is the idea that Selector just selects elements, and operations are provided from somewhere else following the idea that they are functions that take an element first, and arguments second.

Examples of such a function would be:

functionparent(el){returnel.parentNode}functionsetText(el,val){el.textContent=valreturnel}

Examples of using the functional selector

select=require('selector/functional')select('#test')(parent)(setText,'Hello, world!')

In the functional selector, each call returns a function taking a new function to be applied to the currently selected elements.

About

Selects elements on the page and then lets you operate on them. Works well with browser-tools.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages