View Source API
Categories
(GeckoView :: General, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: JanH, Unassigned)
Details
As a fallback you can simply prepend view-source: to the URL, but doing it properly means going through ViewSourceUtils, which means a GeckoView API is needed?
Reporter | ||
Comment 1•7 years ago
|
||
I wonder what the best way to implement that API would be? It can't be a simple viewSource()
method on the Session
, because that causes complications when wanting to view the source in a new Session
. In that case you'd either have to first load the page normally in a new session before being able to call viewSource()
, which is stupid, or if you simply intercept onLoadRequest()
and then load the URI manually in a new Session
that means that ViewSourceUtils
and whatever additional work that is doing would be bypassed same as if you just tried directly loading "view-source:" + original URL.
So to me that would seem to indicate that perhaps it should be a load flag instead?
Yup, load flag seems reasonable to me.
Updated•7 years ago
|
Updated•3 years ago
|
Description
•