Labs/Jetpack/Reboot/JEP/112: Difference between revisions

Jump to navigation Jump to search
Added Issues section
(Added Issues section)
Line 42: Line 42:
* Access to content pages and their DOMs.
* Access to content pages and their DOMs.
* Access to the browser's DOM, including popupshowing and popuphiding events.
* Access to the browser's DOM, including popupshowing and popuphiding events.
* Menuitem icons should be package-able in XPIs, reference-able from code.


=== Internal Methods ===
=== Internal Methods ===
Line 184: Line 185:
);
);
</pre>
</pre>
=== Issues ===
* [[#Specifying Contexts|Specifying contexts]]
** People will see random code on the web that passes <tt>"*"</tt> as the context.  They won't understand what it means, they'll copy and paste, ruin the purpose of contexts.
*** Don't allow <tt>"*"</tt>?  Easy to circumvent, e.g., <tt>"html *"</tt>, but at least it's clearer that <tt>"html *"</tt> is a selector.
*** Don't allow selectors that match <tt>html</tt> or <tt>body</tt>?  No, responsible devs that need to match the entire page but no part in particular will use those.
*** Don't allow selectors that match <tt>html</tt> or <tt>body</tt> <em>and</em> at least another node?
** Passing <tt>"*"</tt> is easier than passing a function or any other selector.
* [[#Specifying New Menuitems|Icons]]: Icon URLs should be able to point to resources in the XPI.  How?
* [[#Specifying New Menuitems|Context objects]]: It's simpler just to pass the node the user clicked, but that forces you to do <tt>node.ownerDocument.defaultView</tt> just to get the window.  Trade-off?
* [[#Specifying New Menuitems|Command]]: What should be the name of the <tt>command</tt> function on menuitems?
Confirmed users
764

edits

Navigation menu