[Sugar-devel] View Source Code [BROWSE]

Sebastian Silva sebastian at fuentelibre.org
Thu May 5 13:46:54 EDT 2016



El 05/05/16 a las 02:20, Utkarsh Tiwari escribió:
> Hi,
>     I need to add the facility to view the source code of the current
> open webpage in a new tab. I tried that by fetching the source code
> using webkit and displaying it via javascript query
> 'browser.execute_query('JS_Query')' but have been some problems while
> parsing the html code to string.
>
> Could anyone here suggest any other possible way to get about it?

It is not clear 100% to me what you are asking but from Webkit
documentation you can try the method
`browser.load_string( content, mime_type, encoding, base_uri )` instead.

Reference:
http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#webkit-web-view-load-string

>
> Thanks,
> Utkarsh Tiwari
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160505/1621c121/attachment.html>


More information about the Sugar-devel mailing list