blob: 749199f267aedd38febd05222984b4ff4f0c45b9 (
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
64
65
66
67
68
69
|
---
title: ArrayBuffer.prototype
slug: conflicting/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
tags:
- ArrayBuffer
- JavaScript
- Propriété
- Reference
translation_of: Web/JavaScript/Reference/Global_Objects/ArrayBuffer
translation_of_original: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/prototype
original_slug: Web/JavaScript/Reference/Objets_globaux/ArrayBuffer/prototype
---
<div>{{JSRef}}</div>
<p>La propriété <strong><code>ArrayBuffer.prototype</code></strong> représente le prototype de l'objet {{jsxref("ArrayBuffer")}}.</p>
<div>{{js_property_attributes(0,0,0)}}</div>
<h2 id="Description">Description</h2>
<p>Les instances de <code>ArrayBuffer</code> héritent toutes de <code>ArrayBuffer.prototype</code>. Il est donc possible de modifier le protoype du constructeur pour apporter des changements à chacune des instances <code>ArrayBuffer</code>.</p>
<h2 id="Propriétés">Propriétés</h2>
<dl>
<dt>ArrayBuffer.prototype.constructor</dt>
<dd>Définit la fonction qui crée le prototype d'un objet. La valeur initiale correspond au constructeur natif <code>ArrayBuffer</code>.</dd>
<dt>{{jsxref("ArrayBuffer.prototype.byteLength")}} {{readonlyInline}}</dt>
<dd>La taille du tableau en octets. Cette propriété est déterminée lors de la construction du tableau et ne peut pas être changée. <code>Propriété en lecture seule</code>.</dd>
</dl>
<h2 id="Méthodes">Méthodes</h2>
<dl>
<dt>{{jsxref("ArrayBuffer.prototype.slice()")}}</dt>
<dd>Renvoie un nouvel <code>ArrayBuffer</code> dont le contenu est une copie des octets contenus dans l'objet <code>ArrayBuffer</code> depuis <code>begin</code> (compris), jusqu'à <code>end</code> (non-compris). Si <code>begin</code> ou <code>end</code> est négatif, cela fait référence à l'indice à partir de la fin du tableau et non à l'indice à partir du début du tableau.</dd>
</dl>
<h2 id="Spécifications">Spécifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Spécification</th>
<th scope="col">Statut</th>
<th scope="col">Commentaires</th>
</tr>
<tr>
<td>{{SpecName('ES6', '#sec-arraybuffer.prototype', 'ArrayBuffer.prototype')}}</td>
<td>{{Spec2('ES6')}}</td>
<td>Définition initiale.</td>
</tr>
<tr>
<td>{{SpecName('ESDraft', '#sec-arraybuffer.prototype', 'ArrayBuffer.prototype')}}</td>
<td>{{Spec2('ESDraft')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
<p>{{Compat("javascript.builtins.ArrayBuffer.prototype")}}</p>
<h2 id="Voir_aussi">Voir aussi</h2>
<ul>
<li>{{jsxref("ArrayBuffer")}}</li>
</ul>
|