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
{{ message }}
Repository navigation
Commit 746f570
Browse filesBrowse the repository at this point in the historyBrowse files
WebView2 headers collection pages state 997's enumerator and its four derived classes; FAQ: VBP import carries the startup object, icon form and the console flag
Copy file name to clipboardExpand all lines: docs/Miscellaneous/FAQs.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,6 +248,8 @@ You can import individual files, from VB projects or any type, through the Impor
248
248
> You can select .bas/.cls files individually, but to import Forms, UserControls, Property Pages, and Resource Files you must currently select the .vbp file they're associated with. You'll then be shown a list of files you can import (with their new twinBASIC extensions .tbform/.twin etc-- make sure to import both, e.g. for Form1.frm you'll see Form1.frm.tbform and Form1.frm.twin:
249
249
250
250
{:style="width:50%; height:auto;"}
251
+
252
+
Importing a .vbp also carries over its [startup object](tB/IDE/Project/Settings#startup-object) and its [icon form](tB/IDE/Project/Settings#icon-form). A VB6 project that was linked as a console program --- its `LinkSwitches` line contains `/SUBSYSTEM:CONSOLE`, written in capitals --- becomes a [console application](tB/IDE/Project/Settings#is-console-application). No other linker switch is carried over.
Copy file name to clipboardExpand all lines: docs/Reference/Built-In/WebView2/WebView2HeadersCollection.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,9 @@ has_toc: false
10
10
11
11
An enumerator that yields [**WebView2Header**](WebView2Header) values one by one. Returned by **WebView2RequestHeaders.GetHeaders**, **WebView2ResponseHeaders.GetHeaders**, and by `For Each` over a [**WebView2RequestHeaders**](WebView2RequestHeaders) or [**WebView2ResponseHeaders**](WebView2ResponseHeaders) instance.
12
12
13
-
The collection is forward-only: once iterated it is exhausted. It does not implement **Reset**, **Skip**, or **Clone**, and calling those raises run-time error 80004001 (*Not implemented*).
13
+
The collection implements the COM enumerator operations **Next**, **Skip**, **Reset** and **Clone**, which `For Each` and other COM enumerator clients call. They are not members that BASIC code can call. A loop reads the headers once, front to back; **Reset** starts the enumeration again from the first header. Every call to **GetHeaders** and every `For Each` loop produces a new enumerator, so a new loop always starts at the first header.
14
+
15
+
A **WebView2HeadersCollection** is never created by application code. The package returns one of the four derived classes listed under [Derived classes](#derived-classes), typed as **WebView2HeadersCollection**.
14
16
15
17
```tb check_build
16
18
Private Sub WebView21_NavigationStarting( _
@@ -27,14 +29,20 @@ Private Sub WebView21_NavigationStarting( _
27
29
End Sub
28
30
```
29
31
32
+
## Derived classes
33
+
34
+
Four public classes inherit from **WebView2HeadersCollection**. Each is `[COMCreatable(False)]`, and application code does not create them: the package creates them and returns them as **WebView2HeadersCollection**. Each overrides **Reset** and **Clone** to work on its own source of headers.
35
+
36
+
| Class | Returned by | Yields |
37
+
|-------|-------------|--------|
38
+
|**WebView2HeadersCollection_RequestGetHeaders**|[**WebView2RequestHeaders.GetHeaders**](WebView2RequestHeaders#getheaders)| the request headers whose name matches the *name* argument |
39
+
|**WebView2HeadersCollection_RequestEnumerator**|`For Each` over a [**WebView2RequestHeaders**](WebView2RequestHeaders)| every request header |
40
+
|**WebView2HeadersCollection_ResponseGetHeaders**|[**WebView2ResponseHeaders.GetHeaders**](WebView2ResponseHeaders#getheaders)| the response headers whose name matches the *name* argument |
41
+
|**WebView2HeadersCollection_ResponseEnumerator**|`For Each` over a [**WebView2ResponseHeaders**](WebView2ResponseHeaders)| every response header |
42
+
30
43
## Methods
31
44
32
45
### New
33
46
{: .no_toc }
34
47
35
-
Constructs the collection. Created internally by the package; application code does not normally invoke this.
: *required* An internal iterator handed in by the runtime.
48
+
Constructs the collection from the runtime's header iterator. The constructor is **Protected**: only the four derived classes call it, and application code cannot create a **WebView2HeadersCollection**.
Returns a [**WebView2HeadersCollection**](WebView2HeadersCollection)iterator restricted to the headers that match *name* --- useful for headers that may have multiple values.
70
+
Returns a [**WebView2HeadersCollection**](WebView2HeadersCollection)enumerator restricted to the headers that match *name* --- useful for headers that may have multiple values. Each call returns a new enumerator that starts at the first matching header.
Returns a [**WebView2HeadersCollection**](WebView2HeadersCollection)iterator restricted to the headers that match *name*.
65
+
Returns a [**WebView2HeadersCollection**](WebView2HeadersCollection)enumerator restricted to the headers that match *name*. Each call returns a new enumerator that starts at the first matching header.
Copy file name to clipboardExpand all lines: docs/Reference/Built-In/WebView2/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Beyond the control itself, the package exposes a small set of wrapper objects th
19
19
-[WebView2](WebView2/) -- the control: navigation, scripting, settings, deferral-aware events, and PDF / suspend / download / task-manager features controlled by the underlying Edge runtime
20
20
-[WebView2EnvironmentOptions](WebView2/EnvironmentOptions) -- pre-creation configuration for the WebView2 environment (user-data folder, executable folder, locale, tracking-prevention, …); reached via the control's **EnvironmentOptions** property
21
21
-[WebView2Header](WebView2Header) -- one HTTP header (Name / Value); the element type yielded by header iteration
22
-
-[WebView2HeadersCollection](WebView2HeadersCollection) -- enumerable wrapper used by `For Each` over request / response headers
22
+
-[WebView2HeadersCollection](WebView2HeadersCollection) -- enumerator returned by **GetHeaders** and used by `For Each` over request / response headers; also describes its four derived classes
23
23
-[WebView2Request](WebView2Request) -- the request side of a **WebResourceRequested** event -- **Method**, **Uri**, **Headers**, and the request body as bytes or UTF-8 text
24
24
-[WebView2RequestHeaders](WebView2RequestHeaders) -- mutable request-header collection passed to **NavigationStarting** and reached via **WebView2Request.Headers**
25
25
-[WebView2Response](WebView2Response) -- the response side of a **WebResourceRequested** event -- **StatusCode**, **ReasonPhrase**, **Headers**, and the body as bytes or UTF-8 text
0 commit comments