A small package to manipulate the DOM.
Usage
npm install --save @http404/dom
import dom from 'dom';
Environment
- [x] isMobileDevice
- [x] supportsTouchEvent
- [x] prefersReducedMotion
- [x] prefersColorScheme
- [ ] httpGet
- [ ] events
Manipulation
- [x] get
- [x] create
- [x] append
- [ ] render
- [x] remove
- [x] class
- [x] addClass
- [x] hasClass
- [ ] hasAnyClass
- [ ] hasEveryClass
- [x] toggleClass
- [ ] toggleClass force on-way operation
- [x] removeClass
CSS Style
- [ ] injectStyleSheet
- [ ] styles (@todo)
- [ ] addStyles
- [ ] inlineStyle
- [ ] removeStyles
- [ ] animateTo
Tests
- [x] reading.test.ts
- [ ] creating.test.ts
- [x] attributes.test.ts
Fix
- [ ] build documentation