Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-event-attributes

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-event-attributes

List of HTML event handler attributes

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by46.67%
Maintainers
1
Weekly downloads
 
Created
Source

html-event-attributes

Build Coverage Downloads Size

List of HTML event handler attributes.

Contents

What is this?

This is a list of all HTML event handlers (onclick, etc). It includes events from HTML 4 and HTML (the living standard).

When should I use this?

You can use this package if you want to figure out whether an HTML attribute is a known event handler.

Install

This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:

npm install html-event-attributes

In Deno with esm.sh:

import {htmlEventAttributes} from 'https://esm.sh/html-event-attributes@2'

In browsers with esm.sh:

<script type="module">
  import {htmlEventAttributes} from 'https://esm.sh/html-event-attributes@2?bundle'
</script>

Use

import {htmlEventAttributes} from 'html-event-attributes'

console.log(htmlEventAttributes.slice(0, 10))

Yields:

[
  'onabort',
  'onafterprint',
  'onauxclick',
  'onbeforeprint',
  'onbeforeunload',
  'onblur',
  'oncancel',
  'oncanplay',
  'oncanplaythrough',
  'onchange'
]

API

This package exports the identifier htmlEventAttributes. There is no default export.

htmlEventAttributes

List of HTML event handler attributes (Array<string>).

Types

This package is fully typed with TypeScript. It exports no additional types.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.

Security

This package is safe.

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 01 Nov 2023

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