| 1 | [](https://www.npmjs.com/package/oojs) |
| 2 | |
| 3 | # OOjs |
| 4 | |
| 5 | OOjs is a JavaScript library for working with objects. |
| 6 | |
| 7 | Key features include inheritance, mixins and utilities for working with objects. |
| 8 | |
| 9 | <pre lang="javascript"> |
| 10 | /* Example */ |
| 11 | function Animal() {} |
| 12 | function Magic() {} |
| 13 | function Unicorn() { |
| 14 | Animal.call( this ); |
| 15 | Magic.call( this ); |
| 16 | } |
| 17 | OO.inheritClass( Unicorn, Animal ); |
| 18 | OO.mixinClass( Unicorn, Magic ); |
| 19 | </pre> |
| 20 | |
| 21 | ## Quick start |
| 22 | |
| 23 | This library is available as an [npm](https://npmjs.org/) package! Install it right away: |
| 24 | |
| 25 | <pre lang="bash"> |
| 26 | npm install oojs |
| 27 | </pre> |
| 28 | |
| 29 | Or clone the repo, `git clone https://gerrit.wikimedia.org/r/oojs/core`. |
| 30 | |
| 31 | ## Browser support |
| 32 | |
| 33 | We officially support these browsers, aligned with [MediaWiki's compatibility guideline](https://www.mediawiki.org/wiki/Compatibility#Browsers): |
| 34 | |
| 35 | * Firefox: last three years (Firefox 78+, 2020) |
| 36 | * Chrome: last three years (Chrome 80+, 2020) |
| 37 | * Edge: last three years (Edge 80+, 2020) |
| 38 | * Opera: last thee years (Opera 67+, 2020) |
| 39 | * iOS: 11.3+ |
| 40 | |
| 41 | OOjs requires a modern ES2015 (ECMAScript 6) environment. To support older browsers with ECMAScript 5 engines (such as IE 11), use the last OOjs 6.x release. |
| 42 | |
| 43 | ## Bug tracker |
| 44 | |
| 45 | Found a bug? Please report it in the [issue tracker](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=OOjs)! |