I just wanted to give a heads up that I've been landing some breaking changes to the experimental context menus API, and these will be showing up in dev builds soon.
Changes that are already committed, and will be in the next dev build:
-enum-type values now lowercase, e.g. 'page' instead of 'PAGE'
-name now plural (contextMenus instead contextMenu)
-stopped firing onclick handlers for parent items when a child item is clicked
-removed the 'enabledContexts' property, will provide a better mechanism later
-return the id of new items synchronously from contextMenus.create
Changes that will be committed soon:
-can specify url patterns for only matching certain document and target (src/href) urls
-can specify tab ids for only matching on certain tabs
Documentation for the bleeding edge trunk is
here, and once the next dev build rolls out you can see the dev documentation
here (this link won't work until we push the next dev build).