-
Notifications
You must be signed in to change notification settings - Fork 2
/
officeextension.eventhandlers.yml
80 lines (78 loc) · 3.12 KB
/
officeextension.eventhandlers.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
### YamlMime:TSType
name: OfficeExtension.EventHandlers
uid: office!OfficeExtension.EventHandlers:class
package: office!
fullName: OfficeExtension.EventHandlers
summary: ''
remarks: ''
isPreview: false
isDeprecated: false
type: class
constructors:
- name: (constructor)(context, parentObject, name, eventInfo)
uid: office!OfficeExtension.EventHandlers:constructor(1)
package: office!
fullName: (constructor)(context, parentObject, name, eventInfo)
summary: Construit une nouvelle instance de la `EventHandlers` classe
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo<T>);'
parameters:
- id: context
description: ''
type: <xref uid="office!OfficeExtension.ClientRequestContext:class" />
- id: parentObject
description: ''
type: <xref uid="office!OfficeExtension.ClientObject:class" />
- id: name
description: ''
type: string
- id: eventInfo
description: ''
type: <xref uid="office!OfficeExtension.EventInfo:interface" /><T>
methods:
- name: add(handler)
uid: office!OfficeExtension.EventHandlers#add:member(1)
package: office!
fullName: add(handler)
summary: Ajoute une fonction à appeler lorsque l’événement est déclenché.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'add(handler: (args: T) => Promise<any>): EventHandlerResult<T>;'
parameters:
- id: handler
description: Fonction basée sur une promesse qui prend tous les arguments d’événement pertinents.
type: '(args: T) => Promise<any>'
return:
type: <xref uid="office!OfficeExtension.EventHandlerResult:class" /><T>
description: ''
- name: remove(handler)
uid: office!OfficeExtension.EventHandlers#remove:member(1)
package: office!
fullName: remove(handler)
summary: >-
Supprime la fonction spécifiée de la liste du handler d’événements afin qu’elle ne soit pas appelée lors des événements suivants.
**Remarque**: le même [objet RequestContext](xref:office!OfficeExtension.ClientRequestContext:class) que le handler a été ajouté doit être utilisé lors de la suppression du handler. Pour plus d’informations, voir [Supprimer un handler d’événements](https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler)<!-- -->.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'remove(handler: (args: T) => Promise<any>): void;'
parameters:
- id: handler
description: Référence à une fonction précédemment fournie à la méthode en tant `add` que handler d’événements.
type: '(args: T) => Promise<any>'
return:
type: void
description: ''
metadata:
ms.openlocfilehash: b169c4c405c9c9b4706a70d9943af6417dfb034c
ms.sourcegitcommit: a8a86cfcaff5ad7dacc653d63502c76b1fedbebe
ms.translationtype: MT
ms.contentlocale: fr-FR
ms.lasthandoff: 03/26/2021
ms.locfileid: "51307159"