hast utility to check if an element is script-supporting.
npm:
npm install hast-util-script-supportingvar scriptSupporting = require('hast-util-script-supporting')
scriptSupporting({
type: 'element',
tagName: 'a',
properties: {href: '#alpha', title: 'Bravo'},
children: [{type: 'text', value: 'Charlie'}]
}) // => false
scriptSupporting({
type: 'element',
tagName: 'template',
children: [{type: 'text', value: 'Delta'}]
}) // => trueCheck if the given value is a script-supporting element.
hast-util-script-supporting does not change the syntax tree so there are no
openings for cross-site scripting (XSS) attacks.
See contributing.md in syntax-tree/.github for ways to get
started.
See support.md for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.