Opened 9 years ago

Closed 9 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:


If you look at, 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 9 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

Note: See TracTickets for help on using tickets.