Opened 11 years ago

Closed 11 years ago

#7418 closed enhancement (wontfix)

dojo.behavior: add shorthand apply({}) api

Reported by: dante Owned by: anonymous
Priority: high Milestone: tbd
Component: Core Version: 1.1.1
Keywords: Cc: Robert Coup
Blocked By: Blocking:

Description

The current API for dojo.behavior requires you add and apply as separate function calls. A common usecase would be to apply({}) an object, and have it call .add then .apply for you.

patch and unit tests attached.

Attachments (1)

behavior.patch (2.5 KB) - added by dante 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by dante

Attachment: behavior.patch added

comment:2 Changed 11 years ago by dante

Resolution: wontfix
Status: newclosed

I think this is a wontfix, I'd rather have handles returned from add and introduce a remove API, then later address any sugar syntax like this.

Note: See TracTickets for help on using tickets.