From 34f3176259bdc8182a58fe57384bd5c8adea9b4e Mon Sep 17 00:00:00 2001 From: probablycorey Date: Tue, 26 Mar 2013 16:38:54 -0700 Subject: [PATCH] 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. --- native/v8_extensions/native.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/native/v8_extensions/native.mm b/native/v8_extensions/native.mm index 853d27c5f..e0e2e06a7 100644 --- a/native/v8_extensions/native.mm +++ b/native/v8_extensions/native.mm @@ -25,7 +25,7 @@ namespace v8_extensions { "writeToPasteboard", "readFromPasteboard", "quit", "watchPath", "unwatchPath", "getWatchedPaths", "unwatchAllPaths", "moveToTrash", "reload", "setWindowState", "getWindowState", "isMisspelled", - "getCorrectionsForMisspelling" + "getCorrectionsForMisspelling", "beep" }; CefRefPtr nativeObject = CefV8Value::CreateObject(NULL); @@ -191,6 +191,10 @@ namespace v8_extensions { return true; } + else if (name == "beep") { + NSBeep(); + } + return false; } };