aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/htmlmediaelement/abort_event/index.html
blob: 82045136cfb5399e181cb9aab13bf18b0a05cda8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: 'HTMLMediaElement: abort event'
slug: Web/API/HTMLMediaElement/abort_event
translation_of: Web/API/HTMLMediaElement/abort_event
---
<div>{{APIRef}}</div>

<p>Событие <strong><code>abort</code></strong> запускается, когда ресурс не был полностью загружен, но не в результате ошибки.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Всплываемость</th>
   <td>No</td>
  </tr>
  <tr>
   <th scope="row">Отменяемость</th>
   <td>No</td>
  </tr>
  <tr>
   <th scope="row">Интерфейс</th>
   <td>{{domxref("Event")}}</td>
  </tr>
  <tr>
   <th scope="row">Свойство обработчика событий</th>
   <td>{{domxref("GlobalEventHandlers/onabort", "onabort")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Примеры">Примеры</h2>

<pre class="brush: js">const video = document.querySelector('video');
const videoSrc = 'https://path/to/video.webm';

video.addEventListener('abort', () =&gt; {
  console.log(`Abort loading: ${videoSrc}`);
});

const source = document.createElement('source');
source.setAttribute('src', videoSrc);
source.setAttribute('type', 'video/webm');

video.appendChild(source);</pre>

<h2 id="Спецификации">Спецификации</h2>

{{Specifications}}

<h2 id="Совместимость_с_браузерами">Совместимость с браузерами</h2>

<p>{{Compat("api.HTMLMediaElement.abort_event")}}</p>

<h2 id="Смотрите_также">Смотрите также</h2>

<ul>
 <li>{{domxref("HTMLAudioElement")}}</li>
 <li>{{domxref("HTMLVideoElement")}}</li>
 <li>{{HTMLElement("audio")}}</li>
 <li>{{HTMLElement("video")}}</li>
</ul>