Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1822)

Unified Diff: chrome/common/extensions/api/webview_tag.json

Issue 335403002: Clarify documentation of contentload, loadcommit, and loadstop for webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use <em> instead of <i> Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/webview_tag.json
diff --git a/chrome/common/extensions/api/webview_tag.json b/chrome/common/extensions/api/webview_tag.json
index 1b5a8f358dffe65be2992dd51720d3b29f13a135..858fe091d76492f14b46ace2fd1a8092a2c542fc 100644
--- a/chrome/common/extensions/api/webview_tag.json
+++ b/chrome/common/extensions/api/webview_tag.json
@@ -576,7 +576,7 @@
{
"name": "contentload",
"options": { "supportsDom": true },
- "description": "Fired when the guest window fires a <code>load</code> event.<p>The following example code modifies the default font size of the guest's <code>body</code> element after the page loads:</p><pre>webview.addEventListener('contentload', function() {\r webview.executeScript({ code: 'document.body.style.fontSize = \"42px\"' });\r});</pre>",
+ "description": "Fired when the guest window fires a <code>load</code> event, i.e., when a new document is loaded. This does <em>not</em> include page navigation within the current document or asynchronous resource loads. <p>The following example code modifies the default font size of the guest's <code>body</code> element after the page loads:</p><pre>webview.addEventListener('contentload', function() {\r webview.executeScript({ code: 'document.body.style.fontSize = \"42px\"' });\r});</pre>",
"parameters": []
},
{
@@ -660,7 +660,7 @@
{
"name": "loadabort",
"options": { "supportsDom": true },
- "description": "Fired when a top-level load has aborted without committing. <p class=\"note\"><strong>Note:</strong> When a resource load is aborted, a <code>loadabort</code> event will be followed by a <code>loadstop</code> event.</p>",
+ "description": "Fired when a top-level load has aborted without committing. <p class=\"note\"><strong>Note:</strong> When a resource load is aborted, a <code>loadabort</code> event will eventually be followed by a <code>loadstop</code> event, even if all committed loads since the last <code>loadstop</code> event (if any) were aborted.</p>",
"parameters": [
{
"name": "url",
@@ -683,7 +683,7 @@
{
"name": "loadcommit",
"options": { "supportsDom": true },
- "description": "Fired when a load has committed.",
+ "description": "Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does <em>not</em> include asynchronous resource loads.",
"parameters": [
{
"name": "url",
@@ -739,7 +739,7 @@
{
"name": "loadstop",
"options": { "supportsDom": true },
- "description": "Fired when all loads in the guest page (including all subframes) have completed. Fires in addition to any related <code>loadcommit</code> or <code>loadabort</code> events, which occur per-frame. <p class=\"note\"><strong>Note:</strong> When a resource load is aborted, a <code>loadstop</code> event will follow a <code>loadabort</code> event.</p>",
+ "description": "Fired when all frame-level loads in a guest page (including all its subframes) have completed. This includes navigation within the current document as well as subframe document-level loads, but does <em>not</em> include asynchronous resource loads. This event fires every time the number of document-level loads transitions from one (or more) to zero. For example, if a page that has already finished loading (i.e., <code>loadstop</code> already fired once) creates a new iframe which loads a page, then a second <code>loadstop</code> will fire when the iframe page load completes. This pattern is commonly observed on pages that load ads. <p class=\"note\"><strong>Note:</strong> When a committed load is aborted, a <code>loadstop</code> event will eventually follow a <code>loadabort</code> event, even if all committed loads since the last <code>loadstop</code> event (if any) were aborted.</p>",
"parameters": []
},
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698