Package Exports
- html-element-attributes
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (html-element-attributes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
html-element-attributes
Map of HTML elements to allowed attributes.
Also contains global attributes under '*'
.
Includes attributes from HTML 4 and HTML (the WHATWG living standard).
Note: Includes deprecated attributes.
Note: Attributes which were not global in HTML 4 but are in HTML, are only included in the list of global attributes.
Install
npm:
npm install html-element-attributes
Use
var htmlElementAttributes = require('html-element-attributes')
console.log(htmlElementAttributes['*'])
console.log(htmlElementAttributes.ol)
Yields:
[ 'accesskey',
'autocapitalize',
'autofocus',
'class',
// ...
'style',
'tabindex',
'title',
'translate' ]
[ 'compact', 'reversed', 'start', 'type' ]
API
htmlElementAttributes
Object.<Array.<string>>
— Map of lower-case tag-names to an array of
lower-case attribute names.
The object contains one special key: '*'
, which contains global
attributes which apply to all HTML elements.
Related
web-namespaces
— List of web namespaceshtml-tag-names
— List of HTML tagsmathml-tag-names
— List of MathML tagssvg-tag-names
— List of SVG tagshtml-void-elements
— List of void HTML tag-namessvg-element-attributes
— Map of SVG elements to allowed attributesaria-attributes
— List of ARIA attributes