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

→‎Separator: Separators don't take options, can't be added to top-level menu
(→‎Separator: Separators don't take options, can't be added to top-level menu)
Line 181: Line 181:
==== Separator ====
==== Separator ====


<tt>Separator(options)</tt>
<tt>Separator()</tt>


The <tt>Separator</tt> constructor creates menu separators.  Separators can only be contained in <tt>Menu</tt>s; they can't be added to the top-level context menu.
The <tt>Separator</tt> constructor creates menu separators.  Separators can only be contained in <tt>Menu</tt>s; they can't be added to the top-level context menu.
; options: An object that defines the following properties.  If no properties are defined, then this argument is optional.
<blockquote>
; context: If the item is added to the top-level context menu, this specifies the context under which the item will appear.  See [[#Specifying Contexts]].  If undefined, the page context is assumed.  This property is ignored if the item is contained in a submenu.
</blockquote>


=== Specifying Existing Menuitems ===
=== Specifying Existing Menuitems ===
Confirmed users
764

edits