Closed Bug 616736 Opened 15 years ago Closed 15 years ago

Improve widget doc further

Categories

(Add-on SDK Graveyard :: Documentation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adw, Assigned: adw)

References

Details

(Whiteboard: [cherry-pick-1.0b1])

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
This patch makes these changes: * label is a required option, not an optional option, so brackets should not be used * documents widget instance properties (none currently are), including properties and methods inherited from Loader and EventEmitter * adds a section on widget events * misc wording improvements
Attachment #495287 - Flags: review?(myk)
Oh, it also corrects some other inaccuracies: * currently contentScript and contentScriptFile are said to be arrays, but they can also be strings * the formatting of `allow` is incorrect and makes it seem like its `script` property is actually a property of the options object passed to the Widget ctor ... so technically this should block beta 1.
Attached patch patch 2Splinter Review
Actually contentURL in the options object is a string, not a "URL", and the contentURL property of Widget instances is a URL object, not a string.
Attachment #495287 - Attachment is obsolete: true
Attachment #495289 - Flags: review?(myk)
Attachment #495287 - Flags: review?(myk)
Comment on attachment 495289 [details] [diff] [review] patch 2 >- @prop [onClick] {callback} >- An optional function to be called when the widget is clicked. It is called >- as `onClick(widget)`, where `widget` is the `Widget` instance. >+ @prop [onClick] {function} >+ An optional "click" event listener. See Events above. It's too bad the docs use fragments to refer to pages, since that makes it hard to refer to anchors (such as "Events" in this text, which would ideally link to the Events section of this page). Anyway, this looks great, r=myk!
Attachment #495289 - Flags: review?(myk) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: -- → 0.10
(In reply to comment #3) > It's too bad the docs use fragments to refer to pages, since that makes it hard > to refer to anchors (such as "Events" in this text, which would ideally link to > the Events section of this page). Yeah, this has come up several times before. We should make each page of the docs a proper page.
Whiteboard: [cherry-pick-needed]
Target Milestone: 0.10 → 1.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: