[Lazarus] The future of desktop

silvioprog silvioprog at gmail.com
Sat Nov 30 14:45:04 CET 2013


2013/11/30 Michael Van Canneyt <michael at freepascal.org>
>
> On Sat, 30 Nov 2013, silvioprog wrote:
>
>  2013/11/30 Michael Van Canneyt <michael at freepascal.org>
>>       [...]
>>       I want to program the browser itself. In Pascal.
>>
>>
>> Hello Michael,
>>
>> Why not use an existing webkit (like Qt or Chrome) and incorporate it
>> into Lazarus? That would leave the responsibility for compatibility
>> with HTML5, CSS3, mp3 encode, webGL, file manipulation, , support for
>> cross-platform etc. for the webkit.
>>
>
> You are missing the point, I think.
>
> The idea is not to create a new widgetset.
>
> The idea is just to be able to program in pascal, output Javascript.
>
> Using some kind of 'external' declarations would enable you to use Adobe
> Air,
> ExtJS, Node.js, Jquery, Kendo UI, node-webkit, Dojo or whatever you see
> fit.
>
> I am not making any assumptions on that.
>
> But, and this is what I miss in all other attempts mentioned here: I want
> to be able to program the browser WITHOUT necessarily having an application
> server running on a webserver.
>
> It must be possible to ship a HTML file and a Javascript file for a
> working application. That's it.


But that is exactly what the node-webkit does, however, using a webkit
ready, and without a HTTP server. But node-webkit uses JS, so the idea
would be to use Pascal. E.g., in a pseudo code, would be:

procedure TForm1.FormCreate(Sender: TObject);
begin
  webBrowser.load('<html><div id="hello">hello</div></html>');
  webBrowser.elementById('hello').on('onclick', @Button1Click);
  webBrowser.element('window').on('message', @Msg);
end;

procedure TForm1.Msg(wb: TWebBrowser);
begin
  ShowMessage(webBrowser.elementById('hello').value.asString);
end;


> Michael.




-- 
Silvio Cl├ęcio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131130/cd48e807/attachment-0003.html>


More information about the Lazarus mailing list