Debian Codegraph @

src/common/command.js

raw
1 /**
2 * Executes a given operation type.
3 * @param {String} type
4 * @return {Boolean}
5 */
6 export default function command(type) {
7 try {
8 return document.execCommand(type);
9 } catch (err) {
10 return false;
11 }
12 }