Add $native.beep

I could have created an npm for this. I also could wash my hands every 10 seconds, but I'm not crazy, so I did neither.
This commit is contained in:
probablycorey
2013-03-26 16:38:54 -07:00
parent d3fa24be57
commit 34f3176259

View File

@@ -25,7 +25,7 @@ namespace v8_extensions {
"writeToPasteboard", "readFromPasteboard", "quit", "watchPath",
"unwatchPath", "getWatchedPaths", "unwatchAllPaths", "moveToTrash",
"reload", "setWindowState", "getWindowState", "isMisspelled",
"getCorrectionsForMisspelling"
"getCorrectionsForMisspelling", "beep"
};
CefRefPtr<CefV8Value> nativeObject = CefV8Value::CreateObject(NULL);
@@ -191,6 +191,10 @@ namespace v8_extensions {
return true;
}
else if (name == "beep") {
NSBeep();
}
return false;
}
};