Closed Bug 667151 Opened 13 years ago Closed 13 years ago

Documentation error in tabs attach example

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaws, Assigned: wbamberg)

Details

Attachments

(1 file)

The example for the tabs attach method uses |postMessage| where it should be |self.postMessage|.

This slowed me down (and probably others) since this example code is likely to be copy/pasted as simple scaffolding code.
Assignee: nobody → wbamberg
OS: Windows XP → All
Priority: -- → P1
Hardware: x86 → All
Target Milestone: --- → 1.1
I ended up replacing the example there, since the existing example gave you an error if you just copy-paste-cfx-run it, as it expects the page to contain an element with ID "#my-watched-element".

This example doesn't use postMessage at all, but hopefully it's pretty obvious you can postMessage from the content script, and the example earlier (line 47) includes that.
Attachment #544627 - Flags: review?(warner-bugzilla)
Comment on attachment 544627 [details] [diff] [review]
Replace tab.attach example

looks good! much simpler.
Attachment #544627 - Flags: review?(warner-bugzilla) → review+
Landed in: https://github.com/mozilla/addon-sdk/commit/f1ea4beb42c26e2384ff6bec26b50156e20b68cf
Status: NEW → RESOLVED
Closed: 13 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: