Skip to content

Conversation

@ioedeveloper
Copy link
Collaborator

No description provided.

*/

const profile = {
name: 'fileExplorers',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this new API will be public, so we should take the new very carefully. cc @bunsenstraat

*/
registerContextMenuItem (item, callback) {
if (!item.name || !callback) return console.error('menu name and callback is mandatory')
if (!item.type && !item.path && !item.extension && !item.pattern) return console.error('invalid file matching criteria provided')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could also throw an error here, so it bounces back to the caller

* @param item { name: string, type?: string[], path?: string[], extension?: string[], pattern?: string[] }
* @param callback (...args) => void
*/
registerContextMenuItem (item, callback) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing a callback might not work in the context of an iframe... (e.g I don't think that function is a valid parameter for a remix api
cc @bunsenstraat

@yann300 yann300 mentioned this pull request Jan 20, 2021
3 tasks
@ioedeveloper ioedeveloper merged commit fca2055 into master Jan 20, 2021
@ioedeveloper ioedeveloper deleted the context-menu branch January 20, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants