--- title: WebAssembly.Memory.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory tags: - JavaScript - Propriété - Prototype - Reference - WebAssembly - memory translation_of: Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory translation_of_original: Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory/prototype original_slug: Web/JavaScript/Reference/Objets_globaux/WebAssembly/Memory/prototype ---
{{JSRef}} {{SeeCompatTable}}

La propriété WebAssembly.Memory.prototype représente le prototype du constructeur {{jsxref("WebAssembly.Memory()")}}.

{{js_property_attributes(0, 0, 0)}}

Description

Toutes les instances de {{jsxref("WebAssembly.Memory")}} héritent de Memory.prototype. Le prototype du constructeur {{jsxref("WebAssembly.Memory()")}} peut être modifié afin de modifier le comportement de l'ensemble des instances de {{jsxref( "WebAssembly.Memory")}}.

Propriétés

Memory.prototype.constructor
Renvoie la fonction qui a créé l'instance de l'objet. Par défaut, c'est le constructeur {{jsxref("WebAssembly.Memory()")}}.
{{jsxref("WebAssembly/Memory/buffer","Memory.prototype.buffer")}}
Une propriété d'accesseur qui renvoie le tampon contenu dans l'espace mémoire.

Méthodes

{{jsxref("WebAssembly/Memory/grow","Memory.prototype.grow()")}}
Cette méthode permet d'accroître la taille de l'espace mémoire en ajoutant un nombre de pages WebAssembly (dont chacune mesure 64 Ko).

Spécifications

Spécification État Commentaires
{{SpecName('WebAssembly JS', '#webassemblymemory-objects', 'Memory')}} {{Spec2('WebAssembly JS')}} Brouillon de définition initiale pour WebAssembly.

Compatibilité des navigateurs

{{Compat("javascript.builtins.WebAssembly.Memory.prototype")}}

Voir aussi