|
vor 2 Jahren | |
---|---|---|
.. | ||
index.json | vor 2 Jahren | |
license | vor 2 Jahren | |
package.json | vor 2 Jahren | |
readme.md | vor 2 Jahren |
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.
npm:
npm install html-element-attributes
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' ]
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.
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