-
Notifications
You must be signed in to change notification settings - Fork 1
SimpleGesture.doCommand
utubo edited this page Nov 21, 2019
·
12 revisions
(DRAFT in version2.7) [jp]
You can use SimpleGesutre.doCommand()
to execute Simple-Gesutre's command.
SimpleGesture.doCommand(commandName);
I'm still debating the name of this API.
reload
, close
, etc...
You can select with select box, if you enable "Experimental features" in Setting-page.
toggleUserAgent
has a some options.
// toggle 'ABC' <-> default
SimpleGesture.doCommand('toggleUserAgent', { userAgent: 'ABC' });
// change to 'ABC'.
SimpleGesture.doCommand('toggleUserAgent', { userAgent: 'ABC', force: true });
// reset.
SimpleGesture.doCommand('toggleUserAgent', { userAgent: null });
you can't change target of basic commands.
// when
// TAB-A = current tab
// TAB-B = next tab
SimpleGesture.doCommand('nextTab'); // Show TAB-B (this works. but...)
SimpleGesture.doCommand('reload'); // Reload TAB-A (NOT TAB-B !)
Because Simple-Gesture is simple.
I'm still debating the name of this API.
SimpleGesture.doCommand()
, SimpleGesture.execute()
, SimpleGesture.do()
, SimpleGesture.execCommand()
or SimpleGesture.exec()
etc...
Which is best?