Opened 5 years ago
Closed 5 years ago
#18686 closed defect (wontfix)
All sample code snippets in API documentation "events" are the exact same
Reported by: | Gavin R | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.13 |
Component: | Documentation | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
All events on the api pages inside dijit - for example "dijit/form/Button" all have the example "example" code https://dojotoolkit.org/api/#1_10dijit_form_Button_onBlur
btn.subscribe("/my/topic"...
Attachments (1)
Change History (4)
Changed 5 years ago by
Attachment: | same-example.PNG added |
---|
comment:1 Changed 5 years ago by
This is because _WidgetBase contains the following:
// summary: // Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. // // Connects specified obj/event to specified method of this object // and registers for disconnect() on widget destroy. // // Provide widget-specific analog to dojo.connect, except with the // implicit use of this widget as the target object. // Events connected with `this.connect` are disconnected upon // destruction. // returns: // A handle that can be passed to `disconnect` in order to disconnect before // the widget is destroyed. // example: // | var btn = new Button(); // | // when foo.bar() is called, call the listener we're going to // | // provide in the scope of btn // | btn.connect(foo, "bar", function(){ // | console.debug(this.toString()); // | }); // tags: // protected
comment:2 Changed 5 years ago by
That doesn't explain why onBlur() shows that code example for connect().
comment:3 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Dojo 2 will use JSDoc, so this isn't going to get fixed, unless someone wants to work on patching this.
Note: See
TracTickets for help on using
tickets.
all the example code is the same