aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/window/cut_event/index.md
blob: 0b32599b9181d175304389df5207b118b25a605f (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
62
63
---
title: 'Window: cut event'
slug: Web/API/Window/cut_event
tags:
  - API
  - API Presse-papiers
  - Cut
  - Evènement
  - Reference
  - Web
  - Window
translation_of: Web/API/Window/cut_event
---
{{APIRef}}

L'événement **`cut`** est déclenché lorsque l'utilisateur a lancé une action de "cut" via l'interface utilisateur du navigateur.

<table class="properties">
  <tbody>
    <tr>
      <th scope="row">Bulles</th>
      <td>Oui</td>
    </tr>
    <tr>
      <th scope="row">Annulable</th>
      <td>Oui</td>
    </tr>
    <tr>
      <th scope="row">Interface</th>
      <td>{{domxref("ClipboardEvent")}}</td>
    </tr>
    <tr>
      <th scope="row">Propriété de gestionnaire d'événements</th>
      <td>{{domxref("HTMLElement/oncut", "oncut")}}</td>
    </tr>
  </tbody>
</table>

La cible d'origine de cet événement est le {{domxref("Element")}} qui était la cible prévue de l'action cut. Vous pouvez écouter cet événement sur l'interface {{domxref("Window")}} pour le gérer dans les phases de capture ou de bullage. Pour plus de détails sur cet événement, veuillez consulter la page sur l'événement [Element: cut event](/en-US/docs/Web/API/Element/cut_event).

## Exemples

```js
window.addEventListener('cut', (event) => {
    console.log('cut action initiated')
});
```

## Spécifications

| Spécification                                                            | Statut                               |
| ------------------------------------------------------------------------ | ------------------------------------ |
| {{SpecName('Clipboard API', '#clipboard-event-cut')}} | {{Spec2('Clipboard API')}} |

## Compatibilité des navigateurs

{{Compat("api.Window.cut_event")}}

## Voir également

- Événements liés: {{domxref("Window/copy_event", "copy")}}, {{domxref("Window/paste_event", "paste")}}
- Cet événement sur {{domxref("Element")}} targets: {{domxref("Element/cut_event", "cut")}}
- Cet événement sur {{domxref("Document")}} targets: {{domxref("Document/cut_event", "cut")}}