Opened 6 years ago

Closed 6 years ago

#18867 closed defect (worksforme)

dojo/store/Memory Can't Get Reference Using Declarative Syntax

Reported by: George Sexton Owned by:
Priority: undecided Milestone: 1.12
Component: General Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:


Given a store created declaratively:

<div data-dojo-type="dojo/store/Memory" data-dojo-id="typeStore" data-dojo-props="data: [ a set of data]"></div>

later in the scripting, I'm trying to get a reference to the store.


var store=dojo.byId('typeStore');


var store=dom.byId('typeStore');


var store=registry.byId('typeStore');

The result of the byId() methods is null.

There should be some method of getting a reference to the store.

Change History (1)

comment:1 Changed 6 years ago by dylan

Milestone: tbd1.12
Resolution: worksforme
Status: newclosed

As noted on the mailing list, using data-dojo-id creates a global (unfortunate, but that's how it works). So it would be window.typeStore.

Note: See TracTickets for help on using tickets.