Confirmed users
133
edits
Luke-chang (talk | contribs) m (→Proposed API) |
Luke-chang (talk | contribs) m (→Proposed API) |
||
Line 66: | Line 66: | ||
# Introduce a new "'''mozbrowsercontextmenuchange'''" event. This event should be triggered whenever the <menuitem> within the mozbrowser iframe is appended (including first loaded), removed or modified. Also, it should be triggered as well when the focus in the iframe is moved (in or out) to an element whose "contextmenu" is defined to override the parent's one. | # Introduce a new "'''mozbrowsercontextmenuchange'''" event. This event should be triggered whenever the <menuitem> within the mozbrowser iframe is appended (including first loaded), removed or modified. Also, it should be triggered as well when the focus in the iframe is moved (in or out) to an element whose "contextmenu" is defined to override the parent's one. | ||
# The event object of "mozbrowsercontextmenuchange" is identical to "mozbrowsercontextmenu" which includes the attributes "label", "icon", "callback" and so on. | |||
# We also need a convention between app and system app in Gaia: If there are two softkeys on the device, the first <menuitem> will be considered LSK (left softkey) and the second one will be RSK (right softkey). If there are more than two <menuitem>s, the first <menuitem> will still be LSK but system app will create an "Option" button to be RSK and display a drop menu to contain the rest <menuitem>s when user clicks RSK. | # We also need a convention between app and system app in Gaia: If there are two softkeys on the device, the first <menuitem> will be considered LSK (left softkey) and the second one will be RSK (right softkey). If there are more than two <menuitem>s, the first <menuitem> will still be LSK but system app will create an "Option" button to be RSK and display a drop menu to contain the rest <menuitem>s when user clicks RSK. | ||
# If an app doesn't define its own context menu, the default set of softkeys will be involved in system app. | # If an app doesn't define its own context menu, the default set of softkeys will be involved in system app. |