diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 10efcf12c84c661..cb0890fc2b79a06 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -8118,7 +8118,7 @@ /en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.oncanplay /en-US/docs/Web/API/GlobalEventHandlers/oncanplay /en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.oncanplaythrough /en-US/docs/Web/API/GlobalEventHandlers/oncanplaythrough /en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.oncuechange /en-US/docs/Web/API/TextTrack/cuechange_event -/en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.ondurationchange /en-US/docs/Web/API/GlobalEventHandlers/ondurationchange +/en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.ondurationchange /en-US/docs/Web/API/HTMLMediaElement/durationchange_event /en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.onemptied /en-US/docs/Web/API/GlobalEventHandlers/onemptied /en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.onended /en-US/docs/Web/API/GlobalEventHandlers/onended /en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.oninvalid /en-US/docs/Web/API/GlobalEventHandlers/oninvalid @@ -8135,6 +8135,7 @@ /en-US/docs/Web/API/GlobalEventHandlers/onabort /en-US/docs/Web/API/HTMLMediaElement/abort_event /en-US/docs/Web/API/GlobalEventHandlers/oncuechange /en-US/docs/Web/API/TextTrack/cuechange_event /en-US/docs/Web/API/GlobalEventHandlers/ondragexit /en-US/docs/Web/API/GlobalEventHandlers/ondragleave +/en-US/docs/Web/API/GlobalEventHandlers/ondurationchange /en-US/docs/Web/API/HTMLMediaElement/durationchange_event /en-US/docs/Web/API/GlobalEventHandlers/onmozfullscreenchange /en-US/docs/Web/API/Document/fullscreenchange_event /en-US/docs/Web/API/GlobalEventHandlers/onmozfullscreenerror /en-US/docs/Web/API/Document/fullscreenerror_event /en-US/docs/Web/API/GlobalEventHandlers/onpointerdown/drag /en-US/docs/Web/API/GlobalEventHandlers/ondrag diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 94080b12d5f5a1e..2cebbe2b06646ef 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -44482,18 +44482,6 @@ "AFBarstow" ] }, - "Web/API/GlobalEventHandlers/ondurationchange": { - "modified": "2020-10-15T21:43:47.156Z", - "contributors": [ - "suvyme", - "mfluehr", - "fscholz", - "sideshowbarker", - "wbamberg", - "rolfedh", - "Guillaume-Heras" - ] - }, "Web/API/GlobalEventHandlers/onemptied": { "modified": "2020-10-15T21:44:06.259Z", "contributors": [ diff --git a/files/en-us/web/api/globaleventhandlers/index.md b/files/en-us/web/api/globaleventhandlers/index.md index 63095637e526f04..ceb1ea8281f41c9 100644 --- a/files/en-us/web/api/globaleventhandlers/index.md +++ b/files/en-us/web/api/globaleventhandlers/index.md @@ -73,8 +73,6 @@ These event handlers are defined on the {{domxref("GlobalEventHandlers")}} mixin - : An [event handler](/en-US/docs/Web/Events/Event_handlers) representing the code to be called when the {{domxref("HTMLElement/dragstart_event", "dragstart")}} event is raised. - {{domxref("GlobalEventHandlers.ondrop")}} - : An [event handler](/en-US/docs/Web/Events/Event_handlers) representing the code to be called when the {{domxref("HTMLElement/drop_event", "drop")}} event is raised. -- {{domxref("GlobalEventHandlers.ondurationchange")}} - - : An [event handler](/en-US/docs/Web/Events/Event_handlers) representing the code to be called when the {{event("durationchange")}} event is raised. - {{domxref("GlobalEventHandlers.onemptied")}} - : An [event handler](/en-US/docs/Web/Events/Event_handlers) representing the code to be called when the {{event("emptied")}} event is raised. - {{domxref("GlobalEventHandlers.onended")}} diff --git a/files/en-us/web/api/globaleventhandlers/ondurationchange/index.md b/files/en-us/web/api/globaleventhandlers/ondurationchange/index.md deleted file mode 100644 index 21722c22d52173d..000000000000000 --- a/files/en-us/web/api/globaleventhandlers/ondurationchange/index.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: GlobalEventHandlers.ondurationchange -slug: Web/API/GlobalEventHandlers/ondurationchange -page-type: web-api-instance-property -tags: - - API - - Event Handler - - GlobalEventHandlers - - Property - - Reference -browser-compat: api.GlobalEventHandlers.ondurationchange ---- -{{ ApiRef("HTML DOM") }} - -The **`ondurationchange`** property of the -{{domxref("GlobalEventHandlers")}} mixin is the [event handler](/en-US/docs/Web/Events/Event_handlers) for -processing {{event("durationchange")}} events. - -The `durationchange` event is fired when the `duration` attribute -has been updated. - -## Syntax - -```js -element.ondurationchange = handlerFunction; -var handlerFunction = element.ondurationchange; -``` - -`handlerFunction` is either `null` or a [JavaScript function](/en-US/docs/Web/JavaScript/Reference/Functions) -specifying the handler for the event. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} - -## See also - -- {{event("durationchange")}} -- [DOM event handlers](/en-US/docs/Web/Events/Event_handlers) diff --git a/files/en-us/web/api/htmlmediaelement/durationchange_event/index.md b/files/en-us/web/api/htmlmediaelement/durationchange_event/index.md index 968621fdffc8174..35d4a9e0757f2d8 100644 --- a/files/en-us/web/api/htmlmediaelement/durationchange_event/index.md +++ b/files/en-us/web/api/htmlmediaelement/durationchange_event/index.md @@ -14,36 +14,19 @@ browser-compat: api.HTMLMediaElement.durationchange_event The `durationchange` event is fired when the `duration` attribute has been updated. - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BubblesNo
CancelableNo
Interface{{DOMxRef("Event")}}
TargetElement
Default ActionNone
Event handler property - {{domxref("GlobalEventHandlers.ondurationchange")}} -
+## Syntax + +Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property. + +```js +addEventListener('durationchange', event => { }); + +ondurationchange = event => { }; +``` + +## Event type + +A generic {{domxref("Event")}}. ## Examples