Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5990520
README.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
README.md
View Options
[](https://www.npmjs.com/package/oojs)
#
OOjs
OOjs
is
a
JavaScript
library
for
working
with
objects
.
Key
features
include
inheritance
,
mixins
and
utilities
for
working
with
objects
.
<
pre
lang
=
"javascript"
>
/* Example */
function
Animal
()
{}
function
Magic
()
{}
function
Unicorn
()
{
Animal
.
call
(
this
);
Magic
.
call
(
this
);
}
OO
.
inheritClass
(
Unicorn
,
Animal
);
OO
.
mixinClass
(
Unicorn
,
Magic
);
</
pre
>
##
Quick
start
This
library
is
available
as
an
[
npm
](
https
:
//npmjs.org/) package! Install it right away:
<
pre
lang
=
"bash"
>
npm
install
oojs
</
pre
>
Or
clone
the
repo
,
`
git
clone
https
:
//gerrit.wikimedia.org/r/oojs/core`.
##
Browser
support
We
officially
support
these
browsers
,
aligned
with
[
MediaWiki
'
s
compatibility
guideline
](
https
:
//www.mediawiki.org/wiki/Compatibility#Browsers):
*
Firefox
:
last
three
years
(
Firefox
78
+,
2020
)
*
Chrome
:
last
three
years
(
Chrome
80
+,
2020
)
*
Edge
:
last
three
years
(
Edge
80
+,
2020
)
*
Opera
:
last
thee
years
(
Opera
67
+,
2020
)
*
iOS
:
11.3
+
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
.
##
Bug
tracker
Found
a
bug
?
Please
report
it
in
the
[
issue
tracker
](
https
:
//phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=OOjs)!
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 01:32 (3 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b7/6d/386e302fd341d12605aecfc232f1
Default Alt Text
README.md (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment