OOjs/fr

OOjs (abréviation de "Object-oriented JavaScript" pour "JavaScript Orienté Objet") est une librairie JavaScript destinée à manipuler des objets. Les fonctionnalités comprennent, , , et d'autres utilités pour travailler sur des objets et des tableaux. Il fournit aussi un mixin EventEmitteur pour la programmation orientée évènement, et un patterne usine pour découpler les consommateurs de fonctionnalités de l' implémentation d'une classe spécifique.

Extend prototype and static methods and properties of child constructor from a parent constructor.

Copy prototype and static methods and properties to a child constructor from a parent constructor.

Initialize a base class to be inherited by, or mixed into, a child class. Only required for classes that do not inherit or mixin other classes.

Allow event handlers to be attached, called when events occur, and detached.

Provide a simple map interface for associating arbitrary data with a symbolic name.

Registry of classes with instantiation abstraction.

Outils
See the API documentation for a complete reference of available utilities.

Compatibilité
OOjs is optimised for modern ECMAScript 5 environments. The source code is compatible with the older ECMAScript 3 engine (such as in older versions of Internet Explorer, broadly speaking IE8 and before), but users need a polyfill to provide required ECMAScript 5 methods.

It is packaged to be run in either Web browsers or Node.js.

Espace de nom
In the presence of a module system, such as in Node.js, OOjs exports all of its classes and methods. In other environments, such as Web browsers, a global variable is created named. You may access  the same way you would access   or.

If you are using eslint, you should add the following to your  file.



Voir aussi




Liens externes

 * Source code on phabricator.wikimedia.org/diffusion/ (GitHub mirror)
 * Package on npmjs.org
 * Phabricator project (issue tracker)
 * API Documentation