[contextMenus] create or update contextMenus in a single call #312
Labels
enhancement
Enhancement or change to an existing feature
neutral: chrome
Not opposed or supportive from Chrome
neutral: firefox
Not opposed or supportive from Firefox
neutral: safari
Not opposed or supportive from Safari
The Problem
Current situation,
contextMenus.create()
orcontextMenus.update()
needs to specify an ID parameter. If the contextMenus with the ID already exist for create() or doesn't exist for update(), the method will fail (no effect).Note: there is no
contextMenus.get()
method. So to ensure that the create or update is executed successfully, developers need to do in this way:The Solution
I suggest improving this API to support create or update in a single call. For example, add an
override
option increateProperties
andupdateProperties
object, or add a new methodcontextMenus.createOrUpdate()
.The text was updated successfully, but these errors were encountered: