Skip to content

Commit

Permalink
events: deprecate event.srcElement
Browse files Browse the repository at this point in the history
  • Loading branch information
deokjinkim committed Jan 4, 2023
1 parent 9b1ed04 commit 1b33fbc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3334,6 +3334,19 @@ In a future version of Node.js, [`message.headers`][],
[`message.headersDistinct`][], [`message.trailers`][], and
[`message.trailersDistinct`][] will be read-only.

### DEPXXXX: `event.srcElement`

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/46085
description: Documentation-only deprecation.
-->

Type: Documentation-only

The [`event.srcElement`][] is deprecated. Use [`event.target`][] instead.

[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
Expand Down Expand Up @@ -3384,6 +3397,8 @@ In a future version of Node.js, [`message.headers`][],
[`domain`]: domain.md
[`ecdh.setPublicKey()`]: crypto.md#ecdhsetpublickeypublickey-encoding
[`emitter.listenerCount(eventName)`]: events.md#emitterlistenercounteventname
[`event.srcElement`]: events.md#eventsrcelement
[`event.target`]: events.md#eventtarget
[`events.listenerCount(emitter, eventName)`]: events.md#eventslistenercountemitter-eventname
[`fs.FileHandle`]: fs.md#class-filehandle
[`fs.access()`]: fs.md#fsaccesspath-mode-callback
Expand Down
3 changes: 3 additions & 0 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1850,8 +1850,11 @@ This is not used in Node.js and is provided purely for completeness.

<!-- YAML
added: v14.5.0
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated
* Type: {EventTarget} The `EventTarget` dispatching the event.

Alias for `event.target`.
Expand Down

0 comments on commit 1b33fbc

Please sign in to comment.