WebAPI/BrowserAPI/Common Subset: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Chrome methods)
(Add chrome methods)
Line 24: Line 24:
! Go forward
! Go forward
| goForward()
| goForward()
|
| forward()
|
|
|-
|-
Line 35: Line 35:
| getCanGoForward()
| getCanGoForward()
| canGoForward()
| canGoForward()
|
|-
! Go to particular history entry
|
| go()
|
|
|}
|}
Line 53: Line 58:
|
|
|-
|-
! Clear all resources
! Clear resources
| purgeHistory()
| purgeHistory()
|
| clearData()
|
|
|-
|-
Line 61: Line 66:
| download()
| download()
|
|
|
|-
! Inject Script
|
| executeScript
|
|-
! Inject CSS
|
| insertCSS()
|  
|  
|}
|}
Line 91: Line 106:
! Zooming
! Zooming
| zoom()
| zoom()
| setZoom()
|
|
|-
! Get current zoom factor
|
| getZoom()
|
|
|-
|-
Line 97: Line 117:
| getContentDimensions()
| getContentDimensions()
|
|
|
|-
! Search content
|
| find()
|
|-
! Stop search content
|
| stopFinding()
|
|-
! Get UserAgent
|
| getUserAgent()
|
|-
! Check if UserAgent is overridden
|
| isUserAgentOverridden()
|
|-
! Override UserAgent
|
| setUserAgentOverride()
|
|-
! Print page
|
| print()
|
|
|}
|}
Line 107: Line 157:
| setInputMethodActive()
| setInputMethodActive()
|
|
|
|-
! Get process identifier
|
| getProcessId()
|
|-
! Stop a process
|
| terminate()
|
|
|}
|}

Revision as of 06:06, 14 January 2015

This wiki page aims to document the difference and common subset of <webview> API provided by various vendors.

API categories

Navigation methods

API Mozilla Google Microsoft
Reload reload() reload()
Stop stop() stop()
Go back goBack() back()
Go forward goForward() forward()
Can go back? getCanGoBack() canGoBack()
Can go forward? getCanGoForward() canGoForward()
Go to particular history entry go()

Resource Management methods

API Mozilla Google Microsoft
Change visibility state setVisible() & setActive()
Get visibility state getVisible() & getActive()
Clear resources purgeHistory() clearData()
Download on behalf of URL download()
Inject Script executeScript
Inject CSS insertCSS()

Event Dispatch methods

API Mozilla Google Microsoft
Mouse Event sendMouseEvent()
Touch Event sendTouchEvent()

Miscellaneous methods

API Mozilla Google Microsoft
Screenshot getScreenshot()
Zooming zoom() setZoom()
Get current zoom factor getZoom()
Get content's real dimension getContentDimensions()
Search content find()
Stop search content stopFinding()
Get UserAgent getUserAgent()
Check if UserAgent is overridden isUserAgentOverridden()
Override UserAgent setUserAgentOverride()
Print page print()

WebApp methods

API Mozilla Google Microsoft
Indicating a active InputMethod App setInputMethodActive()
Get process identifier getProcessId()
Stop a process terminate()

Attributes

API Mozilla Google Microsoft
App manifest URL mozapp
Widget manifest URL mozwidget

DOM Events

API Mozilla Google Microsoft
on scroll mozbrowserasyncscroll
on window.close() mozbrowserclose
on context menu mozbrowsercontextmenu
on error to load mozbrowsererror
on favicon change mozbrowsericonchange
on load end mozbrowserloadend
on load start mozbrowserloadstart
on location change mozbrowserlocationchange
on window.open() mozbrowseropenwindow
on SSL state change mozbrowsersecuritychange
on prompt (alert, confirm, prompt) mozbrowsershowmodalprompt
on title change mozbrowsertitlechange
on HTTP auth mozbrowserusernameandpasswordrequired
on search engine result mozbrowseropensearch
After paint addNextPaintListener() && removeNextPaintListener()

Links

Mozilla Browser Element

API doc
https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API
WebIDL
http://mxr.mozilla.org/mozilla-central/source/dom/webidl/BrowserElement.webidl

Google Webview Element

API doc
https://developer.chrome.com/apps/tags/webview

Microsoft Webview Element

API doc
http://msdn.microsoft.com/en-gb/library/windows/apps/dn301831.aspx