DOM manipulation using document queries. Uses DOMQL API.
yarn add classql
Initialization:
import DOM from 'qsql'
DOM.query({
logo: { query: '.logo' }
})
Attributes:
DOM.query({
modal: {
query: '.modal',
style: { display: 'none' }
}
})
Events and update:
DOM.query({
CTA: {
query: '.button',
on: {
click: (event, element, node) => {
DOM.find('modal').update({
style: { display: 'block' }
})
}
}
}
})