I don't actually use Dojo, so if I get any of this wrong please correct me.
This page is a work-in-progress.
decl
for Dojo users
As discussed on the home page, decl
and Dojo's declare
are similar. Here, we will discuss the differences.
Dojo's declare
creates properties of
the constructor functions and prototypes it returns.
These seem to be a mix of internal stuff for Dojo and "convenience methods," explained
here. These "convenience methods" are documented:
Regarding inherited
/getInherited
:
With decl
, calling this.extend
within a declaration function returns a reference to the parent
constructor's prototype. Invoke its function properties with apply
.
Regarding isInstanceOf
:
Objects created by constructors produced by decl
work with
the instanceof
operator in the usual way, so this is
not necessary.