Upgrade Notes

This MR (2797) supports the new WebBrowser control (using WebView2). MR 2779 and earlier supports the old WebBrowser control (using CEF).

After you upgraded to this MR (2797), you should full build your project for the new WebBrowser control (using WebView2) to take effect.

There are a few differences between the new WebBrowser control (using WebView2) and the old WebBrowser control (using CEF):

  • If an error occurs during the execution of JavaScript codes, the WebView2 event returns null but CEF event returns specific error message.

  • In the ResourceRedirect event, the request headers are obtained in the headers argument in WebView2 while the response headers are obtained in CEF.

  • The differences in return values between WebView2 and CEF are listed in the following table.

    WebView2

    CEF

    Unsupported type

    Returns null.

    Result:{"type":"null","value":null}

    Returns undefined type and value.

    Result:{"type":"undefined","value":"undefined"}

    Unsupported functions

    Returns object.

    Result:{"type":"object","value":{}}

    Returns function.

    Result:{"type":"function","value":"unsupport"

    DateTime type

    Not supported. Returns object.

    Result:{"type":"object","value":{}}

    Supported. Returns datetime.

    Result:{"type":"datetime","value":"2022-06-30 16:41:15.859"}

    Integer type boundary value

    Returns double.

    Result:{"type":"double","value":2147483648.0}

    Returns integer.

    Result:{"type":"integer","value":-2147483648}

    Array

    Returns JSON with two-level structure.

    Result:{"type":"array","value":[1,2,3,4]}

    Returns JSON with three-level structure.

    Result:{"type":"array","value":[{"type":"integer","value":1},{"type":"integer","value":2},{"type":"integer","value":3},{"type":"integer","value":4}]}

    Nan, Infinity and -Infinity

    Not supported. Returns null.

    Supported.