Check whether a HAST node is interactive.
npm:
npm install hast-util-interactive
var interactive = require('hast-util-interactive')
interactive({
type: 'element',
tagName: 'a',
properties: {},
children: []
}) // => false
interactive({
type: 'element',
tagName: 'a',
properties: {href: '#alpha'},
children: []
}) // => true
interactive({
type: 'element',
tagName: 'video',
properties: {controls: true},
children: []
}) // => true
node
(Node
, optional) — Node to check.
boolean
— Whether node
is an Element
categorised
as interactive.
See contributing.md
in syntax-tree/hast
for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.