Closed
Bug 732715
Opened 14 years ago
Closed 7 years ago
Documentation bug in Add-on SDK Annotator example
Categories
(Mozilla Labs :: Jetpack SDK, defect)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: magneus, Unassigned)
References
()
Details
Attachments
(1 file)
|
36.95 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build ID: 20120215223356
Steps to reproduce:
I was working through the Add-On SDK 1.5 examples at: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/addon-development/annotator/widget.html
And found that the first code example, "The Widget's Content Script," is broken. It's missing some boolean operators.
Actual results:
Source code example reads:
this.addEventListener('click', function(event) {
if(event.button == 0 event.shiftKey == false)
self.port.emit('left-click');
if(event.button == 2 || (event.button == 0 event.shiftKey == true))
self.port.emit('right-click');
event.preventDefault();
}, true);
Expected results:
It should read:
this.addEventListener('click', function(event) {
if(event.button == 0 && event.shiftKey == false)
self.port.emit('left-click');
if(event.button == 2 || (event.button == 0 && event.shiftKey == true))
self.port.emit('right-click');
event.preventDefault();
}, true);
| Reporter | ||
Comment 1•14 years ago
|
||
My first bug on here. Sorry if this is in the wrong place!
Updated•14 years ago
|
Component: Untriaged → Jetpack SDK
Product: Firefox → Mozilla Labs
QA Contact: untriaged → jetpack-sdk
Comment 2•14 years ago
|
||
Hey David!
The link that you informed in not working. Could you please send me the link again? Thanks!
Comment 3•7 years ago
|
||
Closing all inactive bugs in Mozilla labs :: *
Please reopen if this are still relevant.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•