Closed
Bug 1058552
Opened 12 years ago
Closed 12 years ago
Content script self object documentation should describe properties and methods like SDK modules do
Categories
(Developer Documentation Graveyard :: Add-ons, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1058556
People
(Reporter: anaran, Assigned: wbamberg)
References
()
Details
See:
https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts#Accessing_port_in_the_content_script
Details:
The Note in this section makes a good start at point out the self object is not the be confused with the Addon-SDK self module.
But then it falls short to provide a clear overview of the self object.
The sidebar covers the object but does not reveal its structure:
The port API
port.emit()
port.on()
port.removeListener()
port.once()
JSON-serializable values
The postMessage API
Suggestion:
-----------
Follow the convention use the by Add-on SDK for describing objects.
E.g.
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs#Tab
describes the structure of objects well in the sidebar:
Globals
Functions
open(options)
Properties
activeTab
length
Events
open
close
ready
activate
deactivate
Tab
Methods
pin()
unpin()
close(callback)
reload()
activate()
getThumbnail()
attach(options)
Properties
id
title
url
favicon
contentType
index
isPinned
window
Events
close
ready
load
pageshow
activate
deactivate
I would suggest to do the same for the content script self object, leading to this structure in the sidebar:
Self
Properties:
port
Methods:
postMessage
on
once
removeListener
Port
Methods:
emit
on
once
removeListener
| Reporter | ||
Updated•12 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•