Opened 7 years ago

Closed 7 years ago

#17047 closed defect (invalid)

Docs for Observable should not use `new` in the sample code

Reported by: dancrumb Owned by:
Priority: undecided Milestone: tbd
Component: Documentation Version: 1.8.3
Keywords: Cc: Kris Zyp
Blocked By: Blocking:

Description

If you look at http://dojotoolkit.org/reference-guide/1.8/dojo/store/Observable.html#dojo-store-observable, you will see the following code sample:

require(["dojo/store/Observable", "dojo/store/Memory"], function(Observable, Memory){
    // create the initial Observable store
    store = new Observable(new Memory({data: someData}));
...
...

Should not be using new, since Observable does not instantiate a new object

Change History (1)

comment:1 Changed 7 years ago by bill

Cc: Kris Zyp added
Resolution: invalid
Status: newclosed

Actually, I believe using "new" in the docs is intentional. The side effects of Observable() are an implementation detail rather than part of the API. We discussed this ad-nauseam in http://thread.gmane.org/gmane.comp.web.dojo.devel/17161/focus=17188.

Note: See TracTickets for help on using tickets.