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

Line 190: Line 190:
* [[#Specifying Contexts|Specifying contexts]]
* [[#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.
** 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 <tt>"*"</tt>?  Easy to circumvent, e.g., <tt>"html *"</tt> or <tt>"body *"</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>?  No, responsible devs that need to match the entire page but no part in particular will use those. Doesn't prevent <tt>"body *"</tt> anyway.
*** Don't allow selectors that match <tt>html</tt> or <tt>body</tt> <em>and</em> at least another node?
*** Don't allow selectors that match every node in the page?  How to check that?
*** Don't allow selectors that match both <tt>html</tt> and <tt>body</tt>?
** Passing <tt>"*"</tt> is easier than passing a function or any other selector.
** 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|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|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?
* [[#Specifying New Menuitems|Command]]: What should be the name of the <tt>command</tt> function on menuitems?
Confirmed users
764

edits