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

→‎Specifying Contexts: Page context can be undefined or null
(→‎Specifying Contexts: Page context can be undefined or null)
Line 98: Line 98:
; string: A CSS selector.  The context arises when the menu is invoked on a node that either matches this selector or has an ancestor that matches.
; string: A CSS selector.  The context arises when the menu is invoked on a node that either matches this selector or has an ancestor that matches.


; null: The page context.  The context arises when the menu is invoked on a non-interactive portion of the page.  The definition of "non-interactive" is at Jetpack's discretion.
; undefined or null: The page context.  The context arises when the menu is invoked on a non-interactive portion of the page.  The definition of "non-interactive" is at Jetpack's discretion.


; function: An arbitrary predicate.  The context arises when the function returns true.  The function is passed an object describing the current context.  See [[#Context_Descriptions]].
; function: An arbitrary predicate.  The context arises when the function returns true.  The function is passed an object describing the current context.  See [[#Context_Descriptions]].
Confirmed users
764

edits