Labs/Jetpack/JEP/14: Difference between revisions

Jump to navigation Jump to search
Added Menu/ContextMenuSet.remove()
(Added Menu/ContextMenuSet.remove())
Line 133: Line 133:
<blockquote>
<blockquote>
; <code>node</code> : The menu is attached to this DOM node.
; <code>node</code> : The menu is attached to this DOM node.
</blockquote>
===== <code>remove(target)</code> =====
Removes an item from the menu.
<blockquote>
; <code>target</code> : Indicates the existing item to remove.  See [[#Targets|Targets]].  If no such target exists, the call silently fails.
</blockquote>
</blockquote>


Line 140: Line 148:


<blockquote>
<blockquote>
; <code>target</code> : Indicates the existing item to replace.  See [[#Targets|Targets]].  If no such target exists, this call silently fails.
; <code>target</code> : Indicates the existing item to replace.  See [[#Targets|Targets]].  If no such target exists, the call silently fails.
; <code>newItems</code> : A single menuitem or an array of menuitems.
; <code>newItems</code> : A single menuitem or an array of menuitems.
</blockquote>
</blockquote>
Line 359: Line 367:
* <code>insertAfter(newItems, target)</code>
* <code>insertAfter(newItems, target)</code>
* <code>insertBefore(newItems, target)</code>
* <code>insertBefore(newItems, target)</code>
* <code>remove(target)</code>
* <code>replace(target, newItems)</code>
* <code>replace(target, newItems)</code>
* <code>reset()</code>
* <code>reset()</code>
Confirmed users
764

edits

Navigation menu