#13762 closed defect (fixed)
dojo/on event delegation doesn't work on document
Reported by: | tomc974 | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | Events | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I tried to do event delegation with dojo/on following the documentation instructions but it doesn't work. This code
on(document, "li:click", function() { console.log(this.innerHTML) } ) ;
results in :
context.getAttribute is not a function old = context.getAttribute( "id" ),
Changing document to dojo.body() makes it works. This is either a bug in dojo/on or a documentation error.
(trunk was used)
Change History (2)
comment:1 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|
Note: See
TracTickets for help on using
tickets.
In [27531]: