[Sugar-devel] web-activity: env.getEnvironment dependency with Python code
Daniel Narvaez
dwnarvaez at gmail.com
Wed Nov 27 06:04:06 EST 2013
Since I replied twenty times to myself and probably confused everyone...
Let me try to summarise. I think it make sense to
1 Test if the approach you suggested works. I think it didn't when I
tried but it's certainly worth another try.
2 If load_started doesn't work, send email to the webkitgtk mailing list
and see what they suggest.
Thanks for looking into this, the current implementation is certainly not
very nice.
On Wednesday, 27 November 2013, Rogelio Mita wrote:
> I noticed existence of a WebKitWebView event which is emitted before what
> any resource be loaded, called webkit_loaded_started<http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WEBKIT-LOAD-STARTED:CAPS>
>
>> WEBKIT_LOAD_STARTED: A new load request has been made. No data has been
>> received yet, empty structures have been allocated to perform the load; the
>> load may still fail due to transport issues such as not being able to
>> resolve a name, or connect to a port.
>
> I did a concept proof on sugar-toolkit-gtk3 to show this behaviour and the
> result was:
>
> [image: Imágenes integradas 1]
>
> I think that this behaviour can solve the issue with env.getEnvironment
> and your hard dependency with sugar var provided by python code.
>
> This log also show how load_event_finished is executed between successive
> requests, then there is no doubt about the current problem existence.
>
> You think this may be a solution?, change the script so that it is now run
> in this event (load_event_started) and rewrite getEnvironment disregarding
> the possibility that there is no environment variable provided by the
> Python code, in others words ever when activity is in sugar mode,
> window.sugar.environment will be present
>
>
> --
> Roger
>
> Activity Central <http://activitycentral.com/>
>
--
Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131127/d71308e1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 149292 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131127/d71308e1/attachment-0001.png>
More information about the Sugar-devel
mailing list