New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-element-attributes

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-element-attributes

Map of HTML elements to allowed attributes

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
159K
decreased by-13.65%
Maintainers
1
Weekly downloads
 
Created
Source

html-element-attributes

Build Downloads Size

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.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 13 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc