phpdesktop icon indicating copy to clipboard operation
phpdesktop copied to clipboard

New javascript API functions: CloseWindow() and ExitApplication()

Open GoogleCodeExporter opened this issue 10 years ago • 5 comments

Is there a possibility that would be able to close the main window using the 
javascriptAPI? Clicking a link would then close the program.


Original issue reported on code.google.com by [email protected] on 15 Mar 2014 at 3:33

GoogleCodeExporter avatar Aug 28 '15 11:08 GoogleCodeExporter

A solution that worked was posted in the forum:

<button onclick="window.close();">Close</button>
Or 
<button onclick="self.close();">Close</button>

Original comment by [email protected] on 16 Mar 2014 at 10:14

GoogleCodeExporter avatar Aug 28 '15 11:08 GoogleCodeExporter

Using window.close for closing main application windowed is not guaranteed to 
work in future phpdesktop versions. We should introduce an official API for 
that, a CloseWindow() method on the "phpdesktop" javascript object.

Implementing CloseWindow() is also a part of Issue 26 "Custom window themes 
with the use of HTML 5".

Original comment by [email protected] on 16 Mar 2014 at 3:42

  • Changed title: Javascript API to close window
  • Changed state: Accepted

GoogleCodeExporter avatar Aug 28 '15 11:08 GoogleCodeExporter

window.close should keep working for backwards compatibility. A javascript 
binding should overwrite the default implementation of window.close.

It should also be possible to close all application windows by introducing 
phpdesktop.`ExitApplication()` function.

Original comment by [email protected] on 15 Oct 2014 at 1:21

  • Changed title: New javascript API functions: CloseWindow() and ExitApplication()

GoogleCodeExporter avatar Aug 28 '15 11:08 GoogleCodeExporter

Original comment by [email protected] on 21 Oct 2014 at 10:38

  • Added labels: Restrict-AddIssueComment-Commit

GoogleCodeExporter avatar Aug 28 '15 11:08 GoogleCodeExporter

Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/phpdesktop/issues/95

Original comment by [email protected] on 24 Aug 2015 at 3:28

GoogleCodeExporter avatar Aug 28 '15 11:08 GoogleCodeExporter