[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: webkit plasma API
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2010-10-02 20:28:59
Message-ID: 201010021329.00343.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday, October 2, 2010, Ulrich Schreiner wrote:
> http://websvn.kde.org/trunk/KDE/kdeexamples/plasma/webkit/plasmoids/dataeng
> ines/
> 
> after patching the metadata.desktop (the line
> "X-Plasma-MainScript=code/main.html" is missing) everyhing works like a
> charm.

that line shouldn't be necessary: code/main.html is the default main script 
for webkit plasmoids. does it really not work for you without that line?

> but now i want to query all "places" and show them, so i tried something
> like this (i have 5 places in the "sources" array) :
> 
> var places = window.plasmoid.dataEngine("places");
> var place1 = places.serviceForSource(places.sources[0]);

the places engine doesn't actually provide access to a service right now, so 
this isn't the API you need in any case.

> so it seems that in webkit there is no "serviceForSource". well no

you are correct: there is no serviceForSource in the binding. that should be 
added.

would you like to try your hand at doing so? it involves a bit of C++

> http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API
> 
> does not match with the webkit api ...

in part this is because much of that API is senseless when using HTML where 
you already have a canvas and form widgets. 

but also in part because while i maintain the Javascript ScriptEngines fairly 
rigorously, there isn't someone who does the same for the WebKit ScriptEngine. 
people contribute to it sporadically, mostly to get it to do what they need 
from it.

> it would be great if  the is an offical webkit-plasma api.
> 
> does anyone have a link to such a document?

no; documentation is lacking. it needs someone to read through the C++ and 
document it.

the code is in:

	kdebase/workspace/plasma/generic/scriptengines/webkit

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic