You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/GetFavicon.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,10 @@ A favicon (favorite icon) is a tiny icon included along with a website, which is
3
3
like to have an API which allows them to retrieve the Favicon of a webpage, if it has been set, as well as get an update whenever the favicon has changed.
4
4
5
5
# Description
6
-
We propose a new Webview2 event which would allow developers access the current Favicon of a page,
7
-
as well as be notified when the favicon changes. This means when a page first loads, it would fire
8
-
the Favicon change event as the icon has inialized to null. DOM or Javascript may change the Favicon,
9
-
causing the event to fire again.
6
+
We propose a new Webview2 event which would allow developers to access the current Favicon of a page,
7
+
as well as be notified when the favicon changes. This means when a page first loads, it would raise
8
+
the FaviconChanged event since before parsing the HTML document there is no known favicon. DOM or JavaScript may change the Favicon,
9
+
causing the event to be raised again for the same document.
10
10
11
11
# Examples
12
12
## Win32 C++ Registering a listener for favicon changes
@@ -65,7 +65,7 @@ See [API Details](#api-details) Section below for API reference
65
65
## Win32 C++
66
66
```cpp
67
67
/// This interface is a handler for when the `Favicon` is changed.
68
-
/// The sender is the embedded_browser which handle the change and the
68
+
/// The sender is the ICoreWebView2 object the top-level document of which has changed favicon and the eventArgs is nullptr. Use the FaviconUri property and GetFavicon method to obtain the favicon data.
69
69
/// second argument is null.
70
70
/// For more information see `add_FaviconChanged`.
/// This is the ICoreWebView2 Experimental Favicon interface.
90
-
/// It has the capability to fire an event for the changing of the
90
+
/// The `FaviconChanged` event is raised when the [favicon](https://developer.mozilla.org/en-US/docs/Glossary/Favicon) of the top-level document changes. The favicon can change when navigating to a new document or if script dynamically changes the favicon. When navigating from a document with a favicon to a new URI, the FaviconChanged event will be raised first for first navigating to a new document which declares a favicon in its HTML or has script to set its favicon, the document and the FaviconChanged event will be raised for that
91
91
/// Favicon. When a new page loads event would fire due to Favicon not being set.
92
92
/// The event would also set the Favicon when the set by DOM or Javascript.
0 commit comments