[Sugar-devel] View Source Code [BROWSE]
Sebastian Silva
sebastian at fuentelibre.org
Fri May 6 01:56:23 EDT 2016
El 06/05/16 a las 00:39, Utkarsh Tiwari escribió:
>
> Hi Sebastian,
> I want to display the html code of the
> current open webpage in a new tab inside Browse. For that I tried
> 'document.write('fetched-html-code') but it isn't working as expected.
>
I don't think you should use Javascript for that; instead use the Python
API to fill the webview. Try to use text/plain mime type to avoid it
rendering the HTML.
While you are exploring source browsing in Webkit, one interesting
feature of it is the Inspector tool. Basically it is possible to use
similar developer tools as Chrome includes. I played with it to some
extent in 2011 [1]. Perhaps it makes sense to not reinvent it, or
perhaps a simpler version would be good to have.
[1] http://git.sugarlabs.org/websdk
More information about the Sugar-devel
mailing list