我正在写一个Ubiquity命令,但我在JS上有0个表示。如何使用JS打开一个url(例如http://www.stackoverflow.com)?使用Java脚本为Ubiquity命令打开一个url
编辑:
感谢你的一切,我相信你是正确的,但下面的代码,我不能够跳到左右。这可能与Ubiquity有关,但它被声明为JS。
CmdUtils.CreateCommand({
names: ["so"],
preview: "go to stackoverflow",
execute: function so_execute() {
displayMessage("Hello, World!");
window.open('http://www.stackoverflow.com', 'dialog');
//neither other two method will work
}
});