Closed Bug 615164 Opened 15 years ago Closed 15 years ago

rename Tab.pinned to isPinned, make read-only, and add pin()/unpin() methods

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: irakli)

References

Details

Attachments

(1 file)

For consistency with API conventions for boolean properties and recent changes away from the use of setters for side effects, the "pinned" property of tabs should be renamed "isPinned", it should become read-only, and pin() and unpin() methods should be added to replace the behavior of setting the property. This should block the beta because of the difficulty of changing the behavior afterwards.
Assignee: nobody → dietrich
Assignee: dietrich → rFobic
Still think that pinned had advantage of simpler toggling API: tab.pinned = !tab.pinned vs if (tab.isPinned) tab.unpin() else tab.pin()
Attachment #493660 - Flags: review?(dietrich)
Yes, toggling is simpler with the old API, but you can still toggle in one statement with the new one: tab.isPinned ? tab.unpin() : tab.pin()
Comment on attachment 493660 [details] [diff] [review] https://github.com/mozilla/addon-sdk/pull/56 r=me, thanks for adding the doc clarifications.
Attachment #493660 - Flags: review?(dietrich) → review+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: