zqqq / phpdesktop

Automatically exported from code.google.com/p/phpdesktop
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 i...@taapo.com on 15 Mar 2014 at 3:33

GoogleCodeExporter commented 9 years ago
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 i...@taapo.com on 16 Mar 2014 at 10:14

GoogleCodeExporter commented 9 years ago
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 czarek.t...@gmail.com on 16 Mar 2014 at 3:42

GoogleCodeExporter commented 9 years ago
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 czarek.t...@gmail.com on 15 Oct 2014 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 21 Oct 2014 at 10:38