diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j index d955e30ed..64e914b3b 100644 --- a/AppKit/CPApplication.j +++ b/AppKit/CPApplication.j @@ -333,6 +333,11 @@ CPRunContinuesResponse = -1002; [CPPlatform activateIgnoringOtherApps:shouldIgnoreOtherApps]; } +- (void)hideOtherApplications:(id)aSender +{ + [CPPlatform hideOtherApplications:self]; +} + /*! Calls \c -finishLaunching method which results in starting the main event loop. @@ -515,6 +520,11 @@ CPRunContinuesResponse = -1002; return _windows; } +- (void)hide:(id)aSender +{ + [CPPlatform hide:self]; +} + // Accessing the Main Menu /*! Returns the application's main menu diff --git a/AppKit/Platform/CPPlatform.j b/AppKit/Platform/CPPlatform.j index a5eac3712..8635c7aac 100644 --- a/AppKit/Platform/CPPlatform.j +++ b/AppKit/Platform/CPPlatform.j @@ -53,4 +53,20 @@ #endif } ++ (void)hideOtherApplications:(id)aSender +{ +#if PLATFORM(DOM) + if (typeof window["cpHideOtherApplications"] === "function") + window.cpHideOtherApplications(); +#endif +} + ++ (void)hide:(id)aSender +{ +#if PLATFORM(DOM) + if (typeof window["cpHide"] === "function") + window.cpHide(); +#endif +} + @end