new SourceView()
SourceView displays source of current page in an iframe as an overlay on
top of mozapps.
Members
-
active
-
Return true if viewer exists and is visible, false otherwise.
-
viewer
-
Return DOM element used to show source, if exists.
Methods
-
hide()
-
Hide SourceView#viewer, and point the iframe to about:blank.
-
show()
-
Show SourceView#viewer and point the iframe to the current page
but using the "view-source:" scheme.
If shown for the first time, create and insert the viewer DOM element. -
start() → {Object}
-
Initialize SourceView instance: listen for 'home+volume' and 'locked'
events to toggle SourceView instance when needed.
Return the instance itself for chaining.Returns:
Object -
stop()
-
Cleanup SourceView instance: Detach from 'home+volume' and 'locked'
events and remove SourceView#viewer if inserted to document. -
toggle()
-
Toggle the source viewer, calling SourceView#show if hidden
(SourceView#active is false) or SourceView#hide if shown
(SourceView#active is true).