@girs/sdk-gnome-49 5.1.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/javascriptcore-4.1/javascriptcore-4.1.d.ts +44 -44
- package/javascriptcore-6.0/javascriptcore-6.0.d.ts +44 -44
- package/package.json +7 -7
- package/webkit-6.0/webkit-6.0.d.ts +827 -369
- package/webkit2-4.1/webkit2-4.1.d.ts +473 -415
- package/webkit2webextension-4.1/webkit2webextension-4.1.d.ts +64 -61
- package/webkitwebprocessextension-6.0/webkitwebprocessextension-6.0.d.ts +41 -40
|
@@ -185,7 +185,7 @@ export namespace WebKit2 {
|
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Enum values used to denote the stock actions for
|
|
188
|
-
* {@link WebKit2.ContextMenuItem}
|
|
188
|
+
* {@link WebKit2.ContextMenuItem} objects
|
|
189
189
|
* @gir-type Enum
|
|
190
190
|
*/
|
|
191
191
|
enum ContextMenuAction {
|
|
@@ -246,7 +246,7 @@ export namespace WebKit2 {
|
|
|
246
246
|
*/
|
|
247
247
|
RELOAD = 13,
|
|
248
248
|
/**
|
|
249
|
-
* Copy current selection the clipboard.
|
|
249
|
+
* Copy current selection to the clipboard.
|
|
250
250
|
*/
|
|
251
251
|
COPY = 14,
|
|
252
252
|
/**
|
|
@@ -326,11 +326,11 @@ export namespace WebKit2 {
|
|
|
326
326
|
*/
|
|
327
327
|
OPEN_AUDIO_IN_NEW_WINDOW = 33,
|
|
328
328
|
/**
|
|
329
|
-
* Copy video link location
|
|
329
|
+
* Copy video link location to the clipboard.
|
|
330
330
|
*/
|
|
331
331
|
COPY_VIDEO_LINK_TO_CLIPBOARD = 34,
|
|
332
332
|
/**
|
|
333
|
-
* Copy audio link location
|
|
333
|
+
* Copy audio link location to the clipboard.
|
|
334
334
|
*/
|
|
335
335
|
COPY_AUDIO_LINK_TO_CLIPBOARD = 35,
|
|
336
336
|
/**
|
|
@@ -536,7 +536,7 @@ export namespace WebKit2 {
|
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
/**
|
|
539
|
-
* Describes the status of a {@link
|
|
539
|
+
* Describes the status of a {@link Feature}.
|
|
540
540
|
*
|
|
541
541
|
* The status for a given feature can be obtained with
|
|
542
542
|
* `webkit_feature_get_status`.
|
|
@@ -545,9 +545,9 @@ export namespace WebKit2 {
|
|
|
545
545
|
*/
|
|
546
546
|
enum FeatureStatus {
|
|
547
547
|
/**
|
|
548
|
-
* Feature that
|
|
548
|
+
* Feature that adjusts behavior for
|
|
549
549
|
* specific application needs. The feature is not part of a Web platform
|
|
550
|
-
* feature,
|
|
550
|
+
* feature, nor a mature feature intended to be always on.
|
|
551
551
|
*/
|
|
552
552
|
EMBEDDER = 0,
|
|
553
553
|
/**
|
|
@@ -558,7 +558,7 @@ export namespace WebKit2 {
|
|
|
558
558
|
UNSTABLE = 1,
|
|
559
559
|
/**
|
|
560
560
|
* Feature for debugging the WebKit engine.
|
|
561
|
-
* The feature is not generally useful for
|
|
561
|
+
* The feature is not generally useful for users or web developers, and
|
|
562
562
|
* always disabled by default.
|
|
563
563
|
*/
|
|
564
564
|
INTERNAL = 2,
|
|
@@ -608,7 +608,7 @@ export namespace WebKit2 {
|
|
|
608
608
|
*/
|
|
609
609
|
enum HardwareAccelerationPolicy {
|
|
610
610
|
/**
|
|
611
|
-
* Hardware acceleration is enabled/disabled as
|
|
611
|
+
* Hardware acceleration is enabled/disabled as requested by web contents. Deprecated 2.54.
|
|
612
612
|
*/
|
|
613
613
|
ON_DEMAND = 0,
|
|
614
614
|
/**
|
|
@@ -663,6 +663,11 @@ export namespace WebKit2 {
|
|
|
663
663
|
* Editable element expects a password
|
|
664
664
|
*/
|
|
665
665
|
PASSWORD = 6,
|
|
666
|
+
/**
|
|
667
|
+
* Edited field contents will be used for searching data.
|
|
668
|
+
* @since 2.54
|
|
669
|
+
*/
|
|
670
|
+
SEARCH = 7,
|
|
666
671
|
}
|
|
667
672
|
|
|
668
673
|
|
|
@@ -710,7 +715,7 @@ export namespace WebKit2 {
|
|
|
710
715
|
static SCRIPT_FAILED: number;
|
|
711
716
|
|
|
712
717
|
/**
|
|
713
|
-
* An unsupported parameter has been used to call
|
|
718
|
+
* An unsupported parameter has been used to call an async function from API. Since 2.40
|
|
714
719
|
*/
|
|
715
720
|
static INVALID_PARAMETER: number;
|
|
716
721
|
|
|
@@ -1160,9 +1165,9 @@ export namespace WebKit2 {
|
|
|
1160
1165
|
* of this process model is that the rendering process for a web view
|
|
1161
1166
|
* can crash while the rest of the views keep working normally. This
|
|
1162
1167
|
* process model is indicated for applications which may use a number
|
|
1163
|
-
* of web views and the content
|
|
1164
|
-
* rest
|
|
1165
|
-
* multiple tabs.
|
|
1168
|
+
* of web views and the content in each must not interfere with the
|
|
1169
|
+
* rest (for example, a full-fledged web browser with support for
|
|
1170
|
+
* multiple tabs).
|
|
1166
1171
|
*/
|
|
1167
1172
|
MULTIPLE_SECONDARY_PROCESSES = 1,
|
|
1168
1173
|
}
|
|
@@ -1335,7 +1340,7 @@ export namespace WebKit2 {
|
|
|
1335
1340
|
}
|
|
1336
1341
|
|
|
1337
1342
|
/**
|
|
1338
|
-
* Specifies in which frames user style sheets are to be inserted
|
|
1343
|
+
* Specifies in which frames user style sheets are to be inserted.
|
|
1339
1344
|
* @gir-type Enum
|
|
1340
1345
|
* @since 2.6
|
|
1341
1346
|
*/
|
|
@@ -1387,7 +1392,7 @@ export namespace WebKit2 {
|
|
|
1387
1392
|
}
|
|
1388
1393
|
|
|
1389
1394
|
/**
|
|
1390
|
-
* Specifies at which place of documents
|
|
1395
|
+
* Specifies at which place of documents a user script will be inserted.
|
|
1391
1396
|
* @gir-type Enum
|
|
1392
1397
|
* @since 2.6
|
|
1393
1398
|
*/
|
|
@@ -1413,13 +1418,13 @@ export namespace WebKit2 {
|
|
|
1413
1418
|
}
|
|
1414
1419
|
|
|
1415
1420
|
/**
|
|
1416
|
-
* Specifies how to treat
|
|
1421
|
+
* Specifies how to treat a user style sheet.
|
|
1417
1422
|
* @gir-type Enum
|
|
1418
1423
|
* @since 2.6
|
|
1419
1424
|
*/
|
|
1420
1425
|
enum UserStyleLevel {
|
|
1421
1426
|
/**
|
|
1422
|
-
* The style sheet is
|
|
1427
|
+
* The style sheet is a user style sheet,
|
|
1423
1428
|
* its contents always override other style sheets. This is the default.
|
|
1424
1429
|
*/
|
|
1425
1430
|
USER = 0,
|
|
@@ -1441,7 +1446,7 @@ export namespace WebKit2 {
|
|
|
1441
1446
|
|
|
1442
1447
|
// Static fields
|
|
1443
1448
|
/**
|
|
1444
|
-
* An unknown error
|
|
1449
|
+
* An unknown error occurred.
|
|
1445
1450
|
*/
|
|
1446
1451
|
static UNKNOWN: number;
|
|
1447
1452
|
|
|
@@ -1575,7 +1580,7 @@ export namespace WebKit2 {
|
|
|
1575
1580
|
* the current cursor position. If there's a selection, the selected text
|
|
1576
1581
|
* will be used as the link text, otherwise the URL itself will be used.
|
|
1577
1582
|
* It receives the link URL as argument. This command should be executed
|
|
1578
|
-
* with `webkit_web_view_execute_editing_command_with_argument()
|
|
1583
|
+
* with `webkit_web_view_execute_editing_command_with_argument()`.
|
|
1579
1584
|
* @since 2.10
|
|
1580
1585
|
* @default CreateLink
|
|
1581
1586
|
*/
|
|
@@ -1594,7 +1599,7 @@ export namespace WebKit2 {
|
|
|
1594
1599
|
|
|
1595
1600
|
/**
|
|
1596
1601
|
* The insert image command. Creates an image element that is inserted at
|
|
1597
|
-
* the current cursor position. It receives
|
|
1602
|
+
* the current cursor position. It receives a URI as argument,
|
|
1598
1603
|
* that is used as the image source. This command should be executed with
|
|
1599
1604
|
* `webkit_web_view_execute_editing_command_with_argument()`.
|
|
1600
1605
|
* @since 2.10
|
|
@@ -1666,7 +1671,7 @@ export namespace WebKit2 {
|
|
|
1666
1671
|
* Like `webkit_get_micro_version()`, but from the headers used at
|
|
1667
1672
|
* application compile time, rather than from the library linked
|
|
1668
1673
|
* against at application run time.
|
|
1669
|
-
* @default
|
|
1674
|
+
* @default 0
|
|
1670
1675
|
*/
|
|
1671
1676
|
const MICRO_VERSION: number;
|
|
1672
1677
|
|
|
@@ -1674,7 +1679,7 @@ export namespace WebKit2 {
|
|
|
1674
1679
|
* Like `webkit_get_minor_version()`, but from the headers used at
|
|
1675
1680
|
* application compile time, rather than from the library linked
|
|
1676
1681
|
* against at application run time.
|
|
1677
|
-
* @default
|
|
1682
|
+
* @default 54
|
|
1678
1683
|
*/
|
|
1679
1684
|
const MINOR_VERSION: number;
|
|
1680
1685
|
|
|
@@ -1896,7 +1901,7 @@ export namespace WebKit2 {
|
|
|
1896
1901
|
CASE_INSENSITIVE = 1,
|
|
1897
1902
|
/**
|
|
1898
1903
|
* search text only at the
|
|
1899
|
-
*
|
|
1904
|
+
* beginning of the words.
|
|
1900
1905
|
*/
|
|
1901
1906
|
AT_WORD_STARTS = 2,
|
|
1902
1907
|
/**
|
|
@@ -1981,7 +1986,7 @@ export namespace WebKit2 {
|
|
|
1981
1986
|
*/
|
|
1982
1987
|
SPELLCHECK = 1,
|
|
1983
1988
|
/**
|
|
1984
|
-
* Suggest to not
|
|
1989
|
+
* Suggest to not autocapitalize
|
|
1985
1990
|
*/
|
|
1986
1991
|
LOWERCASE = 2,
|
|
1987
1992
|
/**
|
|
@@ -2328,7 +2333,7 @@ export namespace WebKit2 {
|
|
|
2328
2333
|
is_for_proxy(): boolean;
|
|
2329
2334
|
|
|
2330
2335
|
/**
|
|
2331
|
-
* Determine whether this
|
|
2336
|
+
* Determine whether this is a first attempt or a retry for this authentication challenge.
|
|
2332
2337
|
* @returns `true` if authentication attempt is a retry or `false` otherwise.
|
|
2333
2338
|
* @since 2.2
|
|
2334
2339
|
*/
|
|
@@ -2475,10 +2480,10 @@ export namespace WebKit2 {
|
|
|
2475
2480
|
|
|
2476
2481
|
// Methods
|
|
2477
2482
|
/**
|
|
2478
|
-
* Get the
|
|
2483
|
+
* Get the previously set {@link WebKit2.ApplicationInfo}.
|
|
2479
2484
|
*
|
|
2480
|
-
* Get the {@link WebKit2.
|
|
2481
|
-
* @returns the {@link WebKit2.
|
|
2485
|
+
* Get the {@link WebKit2.ApplicationInfo} previously set with `webkit_automation_session_set_application_info()`.
|
|
2486
|
+
* @returns the {@link WebKit2.ApplicationInfo} of `session`, or `null` if no one has been set.
|
|
2482
2487
|
* @since 2.18
|
|
2483
2488
|
*/
|
|
2484
2489
|
get_application_info(): ApplicationInfo;
|
|
@@ -2513,7 +2518,7 @@ export namespace WebKit2 {
|
|
|
2513
2518
|
* This signal is emitted when `back_forward_list` changes. This happens
|
|
2514
2519
|
* when the current item is updated, a new item is added or one or more
|
|
2515
2520
|
* items are removed. Note that both `item_added` and `items_removed` can
|
|
2516
|
-
* `null` when only the current item is updated. Items are only removed
|
|
2521
|
+
* be `null` when only the current item is updated. Items are only removed
|
|
2517
2522
|
* when the list is cleared or the maximum items limit is reached.
|
|
2518
2523
|
* @signal
|
|
2519
2524
|
* @run-last
|
|
@@ -2538,7 +2543,7 @@ export namespace WebKit2 {
|
|
|
2538
2543
|
* Methods `webkit_web_view_go_back()` and `webkit_web_view_go_forward()` move
|
|
2539
2544
|
* the current item backward or forward by one. Method
|
|
2540
2545
|
* `webkit_web_view_go_to_back_forward_list_item()` sets the current item to the
|
|
2541
|
-
* specified item. All other methods returning {@link WebKit2.BackForwardListItem}
|
|
2546
|
+
* specified item. All other methods returning {@link WebKit2.BackForwardListItem} objects
|
|
2542
2547
|
* do not change the value of the current item, they just return the requested
|
|
2543
2548
|
* item or items.
|
|
2544
2549
|
* @gir-type Class
|
|
@@ -2642,7 +2647,7 @@ export namespace WebKit2 {
|
|
|
2642
2647
|
* One item of the {@link WebKit2.BackForwardList}.
|
|
2643
2648
|
*
|
|
2644
2649
|
* A history item is part of the {@link WebKit2.BackForwardList} and consists
|
|
2645
|
-
*
|
|
2650
|
+
* of a title and a URI.
|
|
2646
2651
|
* @gir-type Class
|
|
2647
2652
|
*/
|
|
2648
2653
|
class BackForwardListItem extends GObject.InitiallyUnowned {
|
|
@@ -2798,7 +2803,7 @@ export namespace WebKit2 {
|
|
|
2798
2803
|
* Whenever the user interacts with an <input type='color' />
|
|
2799
2804
|
* HTML element, WebKit will need to show a dialog to choose a color. For that
|
|
2800
2805
|
* to happen in a general way, instead of just opening a {@link Gtk.ColorChooser}
|
|
2801
|
-
* (which might be
|
|
2806
|
+
* (which might not be desirable for applications that prefer to use their
|
|
2802
2807
|
* own color chooser dialog), WebKit will fire the
|
|
2803
2808
|
* {@link WebKit2.WebView.SignalSignatures.run_color_chooser | WebKit2.WebView::run-color-chooser} signal with a {@link WebKit2.ColorChooserRequest}
|
|
2804
2809
|
* object, which will allow the client application to specify the color to be
|
|
@@ -3222,7 +3227,7 @@ export namespace WebKit2 {
|
|
|
3222
3227
|
* You can get it from a {@link WebKit2.WebsiteDataManager} with
|
|
3223
3228
|
* `webkit_website_data_manager_get_cookie_manager()`, and use it to set where to
|
|
3224
3229
|
* store cookies with `webkit_cookie_manager_set_persistent_storage()`,
|
|
3225
|
-
* or to set the acceptance policy, with `
|
|
3230
|
+
* or to set the acceptance policy, with `webkit_cookie_manager_set_accept_policy()`.
|
|
3226
3231
|
* @gir-type Class
|
|
3227
3232
|
*/
|
|
3228
3233
|
class CookieManager extends GObject.Object {
|
|
@@ -3455,7 +3460,7 @@ export namespace WebKit2 {
|
|
|
3455
3460
|
*
|
|
3456
3461
|
* When the operation is finished, `callback` will be called. You can then call
|
|
3457
3462
|
* `webkit_cookie_manager_get_cookies_finish()` to get the result of the operation.
|
|
3458
|
-
* @param uri the URI associated
|
|
3463
|
+
* @param uri the URI associated with the cookies to be retrieved
|
|
3459
3464
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
3460
3465
|
* @since 2.20
|
|
3461
3466
|
*/
|
|
@@ -3469,7 +3474,7 @@ export namespace WebKit2 {
|
|
|
3469
3474
|
*
|
|
3470
3475
|
* When the operation is finished, `callback` will be called. You can then call
|
|
3471
3476
|
* `webkit_cookie_manager_get_cookies_finish()` to get the result of the operation.
|
|
3472
|
-
* @param uri the URI associated
|
|
3477
|
+
* @param uri the URI associated with the cookies to be retrieved
|
|
3473
3478
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
3474
3479
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
|
|
3475
3480
|
* @since 2.20
|
|
@@ -3484,7 +3489,7 @@ export namespace WebKit2 {
|
|
|
3484
3489
|
*
|
|
3485
3490
|
* When the operation is finished, `callback` will be called. You can then call
|
|
3486
3491
|
* `webkit_cookie_manager_get_cookies_finish()` to get the result of the operation.
|
|
3487
|
-
* @param uri the URI associated
|
|
3492
|
+
* @param uri the URI associated with the cookies to be retrieved
|
|
3488
3493
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
3489
3494
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
|
|
3490
3495
|
* @since 2.20
|
|
@@ -3613,8 +3618,8 @@ export namespace WebKit2 {
|
|
|
3613
3618
|
* By default, `cookie_manager` doesn't store the cookies persistently, so you need to call this
|
|
3614
3619
|
* method to keep cookies saved across sessions.
|
|
3615
3620
|
*
|
|
3616
|
-
* This method should never be called on a {@link WebKit2.CookieManager} associated
|
|
3617
|
-
* @param filename the filename to read
|
|
3621
|
+
* This method should never be called on a {@link WebKit2.CookieManager} associated with an ephemeral {@link WebKit2.WebsiteDataManager}.
|
|
3622
|
+
* @param filename the filename to read from/write to
|
|
3618
3623
|
* @param storage a {@link WebKit2.CookiePersistentStorage}
|
|
3619
3624
|
*/
|
|
3620
3625
|
set_persistent_storage(filename: string, storage: CookiePersistentStorage): void;
|
|
@@ -3633,8 +3638,8 @@ export namespace WebKit2 {
|
|
|
3633
3638
|
* A permission request for enumerating the user's media devices
|
|
3634
3639
|
*
|
|
3635
3640
|
* WebKitDeviceInfoPermissionRequest represents a request for
|
|
3636
|
-
* permission to whether WebKit should be allowed to access the user's
|
|
3637
|
-
*
|
|
3641
|
+
* permission to decide whether WebKit should be allowed to access the user's
|
|
3642
|
+
* device information when requested through the MediaDevices.enumerateDevices
|
|
3638
3643
|
* API.
|
|
3639
3644
|
*
|
|
3640
3645
|
* When a WebKitDeviceInfoPermissionRequest is not handled by the user,
|
|
@@ -3809,7 +3814,7 @@ export namespace WebKit2 {
|
|
|
3809
3814
|
* This value will range from 0.0 to 1.0. The value is an estimate
|
|
3810
3815
|
* based on the total number of bytes expected to be received for
|
|
3811
3816
|
* a download.
|
|
3812
|
-
* If you need
|
|
3817
|
+
* If you need more accurate progress information you can connect to
|
|
3813
3818
|
* {@link WebKit2.Download.SignalSignatures.received_data | WebKit2.Download::received-data} signal to track the progress.
|
|
3814
3819
|
* @read-only
|
|
3815
3820
|
* @default 1
|
|
@@ -3821,7 +3826,7 @@ export namespace WebKit2 {
|
|
|
3821
3826
|
* This value will range from 0.0 to 1.0. The value is an estimate
|
|
3822
3827
|
* based on the total number of bytes expected to be received for
|
|
3823
3828
|
* a download.
|
|
3824
|
-
* If you need
|
|
3829
|
+
* If you need more accurate progress information you can connect to
|
|
3825
3830
|
* {@link WebKit2.Download.SignalSignatures.received_data | WebKit2.Download::received-data} signal to track the progress.
|
|
3826
3831
|
* @read-only
|
|
3827
3832
|
* @default 1
|
|
@@ -3906,11 +3911,10 @@ export namespace WebKit2 {
|
|
|
3906
3911
|
get_elapsed_time(): number;
|
|
3907
3912
|
|
|
3908
3913
|
/**
|
|
3909
|
-
* Gets the value of the {@link WebKit2.Download.estimated_progress} property.
|
|
3910
3914
|
* Gets the value of the {@link WebKit2.Download.estimated_progress} property.
|
|
3911
3915
|
* You can monitor the estimated progress of the download operation by
|
|
3912
3916
|
* connecting to the notify::estimated-progress signal of `download`.
|
|
3913
|
-
* @returns an estimate of the
|
|
3917
|
+
* @returns an estimate of the percent complete for a download as a range from 0.0 to 1.0.
|
|
3914
3918
|
*/
|
|
3915
3919
|
get_estimated_progress(): number;
|
|
3916
3920
|
|
|
@@ -3984,7 +3988,7 @@ export namespace WebKit2 {
|
|
|
3984
3988
|
// Signal signatures
|
|
3985
3989
|
interface SignalSignatures extends GObject.Object.SignalSignatures {
|
|
3986
3990
|
/**
|
|
3987
|
-
* Emitted when the
|
|
3991
|
+
* Emitted when the {@link WebKit2.EditorState} is changed.
|
|
3988
3992
|
* @signal
|
|
3989
3993
|
* @since 2.44
|
|
3990
3994
|
* @run-last
|
|
@@ -4128,12 +4132,12 @@ export namespace WebKit2 {
|
|
|
4128
4132
|
/**
|
|
4129
4133
|
* Provides access to the icons associated with web sites.
|
|
4130
4134
|
*
|
|
4131
|
-
* WebKit will automatically look for available icons in
|
|
4135
|
+
* WebKit will automatically look for available icons in `<link>`
|
|
4132
4136
|
* elements on opened pages as well as an existing favicon.ico and
|
|
4133
4137
|
* load the images found into a memory cache if possible. That cache
|
|
4134
4138
|
* is frozen to an on-disk database for persistence.
|
|
4135
4139
|
*
|
|
4136
|
-
* If {@link
|
|
4140
|
+
* If {@link WebsiteDataManager.is_ephemeral} is `true`, new icons
|
|
4137
4141
|
* won't be added to the on-disk database and no existing icons will
|
|
4138
4142
|
* be deleted from it. Nevertheless, WebKit will still store them in
|
|
4139
4143
|
* the in-memory cache during the current execution.
|
|
@@ -4176,8 +4180,9 @@ export namespace WebKit2 {
|
|
|
4176
4180
|
* Asynchronously obtains a favicon image.
|
|
4177
4181
|
*
|
|
4178
4182
|
* Asynchronously obtains an image of the favicon for the
|
|
4179
|
-
* given page URI.
|
|
4180
|
-
*
|
|
4183
|
+
* given page URI. If the icon is already in the memory cache, its image data
|
|
4184
|
+
* is not read from the database again. The result is always delivered
|
|
4185
|
+
* asynchronously.
|
|
4181
4186
|
*
|
|
4182
4187
|
* This is an asynchronous method. When the operation is finished, callback will
|
|
4183
4188
|
* be invoked. You can then call `webkit_favicon_database_get_favicon_finish()`
|
|
@@ -4191,8 +4196,9 @@ export namespace WebKit2 {
|
|
|
4191
4196
|
* Asynchronously obtains a favicon image.
|
|
4192
4197
|
*
|
|
4193
4198
|
* Asynchronously obtains an image of the favicon for the
|
|
4194
|
-
* given page URI.
|
|
4195
|
-
*
|
|
4199
|
+
* given page URI. If the icon is already in the memory cache, its image data
|
|
4200
|
+
* is not read from the database again. The result is always delivered
|
|
4201
|
+
* asynchronously.
|
|
4196
4202
|
*
|
|
4197
4203
|
* This is an asynchronous method. When the operation is finished, callback will
|
|
4198
4204
|
* be invoked. You can then call `webkit_favicon_database_get_favicon_finish()`
|
|
@@ -4207,8 +4213,9 @@ export namespace WebKit2 {
|
|
|
4207
4213
|
* Asynchronously obtains a favicon image.
|
|
4208
4214
|
*
|
|
4209
4215
|
* Asynchronously obtains an image of the favicon for the
|
|
4210
|
-
* given page URI.
|
|
4211
|
-
*
|
|
4216
|
+
* given page URI. If the icon is already in the memory cache, its image data
|
|
4217
|
+
* is not read from the database again. The result is always delivered
|
|
4218
|
+
* asynchronously.
|
|
4212
4219
|
*
|
|
4213
4220
|
* This is an asynchronous method. When the operation is finished, callback will
|
|
4214
4221
|
* be invoked. You can then call `webkit_favicon_database_get_favicon_finish()`
|
|
@@ -4264,8 +4271,8 @@ export namespace WebKit2 {
|
|
|
4264
4271
|
* file type, WebKit will need to show a dialog to choose one or
|
|
4265
4272
|
* more files to be uploaded to the server along with the rest of the
|
|
4266
4273
|
* form data. For that to happen in a general way, instead of just
|
|
4267
|
-
* opening a {@link Gtk.FileChooserDialog} (which might be
|
|
4268
|
-
*
|
|
4274
|
+
* opening a {@link Gtk.FileChooserDialog} (which might not be desirable for
|
|
4275
|
+
* applications that prefer to use their own file chooser
|
|
4269
4276
|
* dialog), WebKit will fire the {@link WebKit2.WebView.SignalSignatures.run_file_chooser | WebKit2.WebView::run-file-chooser}
|
|
4270
4277
|
* signal with a {@link WebKit2.FileChooserRequest} object, which will allow
|
|
4271
4278
|
* the client application to specify the files to be selected, to
|
|
@@ -4328,7 +4335,7 @@ export namespace WebKit2 {
|
|
|
4328
4335
|
|
|
4329
4336
|
/**
|
|
4330
4337
|
* A `null`-terminated array of strings containing the list of
|
|
4331
|
-
* selected files associated
|
|
4338
|
+
* selected files associated with the current request. See
|
|
4332
4339
|
* `webkit_file_chooser_request_get_selected_files()` for more details.
|
|
4333
4340
|
* @read-only
|
|
4334
4341
|
*/
|
|
@@ -4336,7 +4343,7 @@ export namespace WebKit2 {
|
|
|
4336
4343
|
|
|
4337
4344
|
/**
|
|
4338
4345
|
* A `null`-terminated array of strings containing the list of
|
|
4339
|
-
* selected files associated
|
|
4346
|
+
* selected files associated with the current request. See
|
|
4340
4347
|
* `webkit_file_chooser_request_get_selected_files()` for more details.
|
|
4341
4348
|
* @read-only
|
|
4342
4349
|
*/
|
|
@@ -4401,14 +4408,14 @@ export namespace WebKit2 {
|
|
|
4401
4408
|
*
|
|
4402
4409
|
* See `webkit_file_chooser_request_get_mime_types()` if you are
|
|
4403
4410
|
* interested in getting the list of accepted MIME types.
|
|
4404
|
-
* @returns a {@link Gtk.FileFilter} if a list of accepted MIME types is defined or `null` otherwise. The returned object is owned by WebKit should not be modified or freed.
|
|
4411
|
+
* @returns a {@link Gtk.FileFilter} if a list of accepted MIME types is defined or `null` otherwise. The returned object is owned by WebKit and should not be modified or freed.
|
|
4405
4412
|
*/
|
|
4406
4413
|
get_mime_types_filter(): Gtk.FileFilter;
|
|
4407
4414
|
|
|
4408
4415
|
/**
|
|
4409
4416
|
* Whether the file chooser should allow selecting multiple files.
|
|
4410
4417
|
*
|
|
4411
|
-
* Determine whether the file chooser associated
|
|
4418
|
+
* Determine whether the file chooser associated with this
|
|
4412
4419
|
* {@link WebKit2.FileChooserRequest} should allow selecting multiple files,
|
|
4413
4420
|
* which depends on the HTML input element having a 'multiple'
|
|
4414
4421
|
* attribute defined.
|
|
@@ -4417,12 +4424,12 @@ export namespace WebKit2 {
|
|
|
4417
4424
|
get_select_multiple(): boolean;
|
|
4418
4425
|
|
|
4419
4426
|
/**
|
|
4420
|
-
* Get the list of selected files associated
|
|
4427
|
+
* Get the list of selected files associated with the request.
|
|
4421
4428
|
*
|
|
4422
|
-
* Get the list of selected files currently associated
|
|
4429
|
+
* Get the list of selected files currently associated with the
|
|
4423
4430
|
* request. Initially, the return value of this method contains any
|
|
4424
4431
|
* files selected in previous file chooser requests for this HTML
|
|
4425
|
-
* input element. Once webkit_file_chooser_request_select_files, the
|
|
4432
|
+
* input element. Once `webkit_file_chooser_request_select_files()` has been called, the
|
|
4426
4433
|
* value will reflect whatever files are given.
|
|
4427
4434
|
*
|
|
4428
4435
|
* This function should normally be called only before presenting the
|
|
@@ -4493,14 +4500,14 @@ export namespace WebKit2 {
|
|
|
4493
4500
|
* Controls text search in a {@link WebKit2.WebView}.
|
|
4494
4501
|
*
|
|
4495
4502
|
* A {@link WebKit2.FindController} is used to search text in a {@link WebKit2.WebView}. You
|
|
4496
|
-
* can get a {@link WebKit2.WebView}
|
|
4503
|
+
* can get a {@link WebKit2.WebView}'s {@link WebKit2.FindController} with
|
|
4497
4504
|
* `webkit_web_view_get_find_controller()`, and later use it to search
|
|
4498
4505
|
* for text using `webkit_find_controller_search()`, or get the
|
|
4499
4506
|
* number of matches using `webkit_find_controller_count_matches()`. The
|
|
4500
4507
|
* operations are asynchronous and trigger signals when ready, such as
|
|
4501
4508
|
* {@link WebKit2.FindController.SignalSignatures.found_text | WebKit2.FindController::found-text},
|
|
4502
4509
|
* {@link WebKit2.FindController.SignalSignatures.failed_to_find_text | WebKit2.FindController::failed-to-find-text} or
|
|
4503
|
-
* {@link WebKit2.FindController.SignalSignatures.counted_matches | WebKit2.FindController::counted-matches}
|
|
4510
|
+
* {@link WebKit2.FindController.SignalSignatures.counted_matches | WebKit2.FindController::counted-matches}.
|
|
4504
4511
|
* @gir-type Class
|
|
4505
4512
|
*/
|
|
4506
4513
|
class FindController extends GObject.Object {
|
|
@@ -4536,13 +4543,13 @@ export namespace WebKit2 {
|
|
|
4536
4543
|
get text(): string;
|
|
4537
4544
|
|
|
4538
4545
|
/**
|
|
4539
|
-
* The {@link WebKit2.WebView} this controller is associated
|
|
4546
|
+
* The {@link WebKit2.WebView} this controller is associated with.
|
|
4540
4547
|
* @construct-only
|
|
4541
4548
|
*/
|
|
4542
4549
|
get web_view(): WebView;
|
|
4543
4550
|
|
|
4544
4551
|
/**
|
|
4545
|
-
* The {@link WebKit2.WebView} this controller is associated
|
|
4552
|
+
* The {@link WebKit2.WebView} this controller is associated with.
|
|
4546
4553
|
* @construct-only
|
|
4547
4554
|
*/
|
|
4548
4555
|
get webView(): WebView;
|
|
@@ -4617,7 +4624,7 @@ export namespace WebKit2 {
|
|
|
4617
4624
|
get_search_text(): string;
|
|
4618
4625
|
|
|
4619
4626
|
/**
|
|
4620
|
-
* Gets the {@link WebKit2.WebView} this find controller is associated
|
|
4627
|
+
* Gets the {@link WebKit2.WebView} this find controller is associated with.
|
|
4621
4628
|
*
|
|
4622
4629
|
* Do
|
|
4623
4630
|
* not dereference the returned instance as it belongs to the
|
|
@@ -4732,22 +4739,22 @@ export namespace WebKit2 {
|
|
|
4732
4739
|
|
|
4733
4740
|
// Methods
|
|
4734
4741
|
/**
|
|
4735
|
-
* Get the values of the text fields contained in the form associated
|
|
4742
|
+
* Get the values of the text fields contained in the form associated with `request`.
|
|
4736
4743
|
*
|
|
4737
4744
|
* Get a {@link GLib.HashTable} with the values of the text fields contained in the form
|
|
4738
|
-
* associated
|
|
4745
|
+
* associated with `request`. Note that fields will be missing if the form
|
|
4739
4746
|
* contains multiple text input elements with the same name, so this
|
|
4740
4747
|
* function does not reliably return all text fields.
|
|
4741
4748
|
* @returns a {@link GLib.HashTable} with the form text fields, or `null` if the form doesn't contain text fields.
|
|
4742
|
-
* @deprecated since 2.20
|
|
4749
|
+
* @deprecated since 2.20: Use `webkit_form_submission_request_list_text_fields()` instead.
|
|
4743
4750
|
*/
|
|
4744
4751
|
get_text_fields(): never | null;
|
|
4745
4752
|
|
|
4746
4753
|
/**
|
|
4747
|
-
* Get lists of the text fields contained in the form associated
|
|
4754
|
+
* Get lists of the text fields contained in the form associated with `request`.
|
|
4748
4755
|
*
|
|
4749
4756
|
* Get lists with the names and values of the text fields contained in
|
|
4750
|
-
* the form associated
|
|
4757
|
+
* the form associated with `request`. Note that names and values may be
|
|
4751
4758
|
* `null`.
|
|
4752
4759
|
*
|
|
4753
4760
|
* If this function returns `false`, then both `field_names` and
|
|
@@ -6149,7 +6156,7 @@ export namespace WebKit2 {
|
|
|
6149
6156
|
*
|
|
6150
6157
|
* When a select element in a {@link WebKit2.WebView} needs to display a dropdown menu, the signal
|
|
6151
6158
|
* {@link WebKit2.WebView.SignalSignatures.show_option_menu | WebKit2.WebView::show-option-menu} is emitted, providing a WebKitOptionMenu with the
|
|
6152
|
-
* {@link WebKit2.OptionMenuItem}
|
|
6159
|
+
* {@link WebKit2.OptionMenuItem} objects that should be displayed.
|
|
6153
6160
|
* @gir-type Class
|
|
6154
6161
|
* @since 2.18
|
|
6155
6162
|
*/
|
|
@@ -6224,7 +6231,7 @@ export namespace WebKit2 {
|
|
|
6224
6231
|
|
|
6225
6232
|
/**
|
|
6226
6233
|
* Gets the length of the `menu`.
|
|
6227
|
-
* @returns the number of {@link WebKit2.OptionMenuItem}
|
|
6234
|
+
* @returns the number of {@link WebKit2.OptionMenuItem} objects in `menu`
|
|
6228
6235
|
* @since 2.18
|
|
6229
6236
|
*/
|
|
6230
6237
|
get_n_items(): number;
|
|
@@ -6234,7 +6241,7 @@ export namespace WebKit2 {
|
|
|
6234
6241
|
*
|
|
6235
6242
|
* Selecting an item changes the
|
|
6236
6243
|
* text shown by the combo button, but it doesn't change the value of the element. You need to
|
|
6237
|
-
* explicitly activate the item with `
|
|
6244
|
+
* explicitly activate the item with `webkit_option_menu_activate_item()` or close the menu with
|
|
6238
6245
|
* `webkit_option_menu_close()` in which case the currently selected item will be activated.
|
|
6239
6246
|
* @param index the index of the item
|
|
6240
6247
|
* @since 2.18
|
|
@@ -6451,7 +6458,7 @@ export namespace WebKit2 {
|
|
|
6451
6458
|
download(): void;
|
|
6452
6459
|
|
|
6453
6460
|
/**
|
|
6454
|
-
*
|
|
6461
|
+
* Ignore the action which triggered this decision.
|
|
6455
6462
|
*
|
|
6456
6463
|
* Ignore the action which triggered this decision. For instance, for a
|
|
6457
6464
|
* {@link WebKit2.ResponsePolicyDecision}, this would cancel the request.
|
|
@@ -6471,7 +6478,7 @@ export namespace WebKit2 {
|
|
|
6471
6478
|
* in the origin associated with the accepted navigation action.
|
|
6472
6479
|
*
|
|
6473
6480
|
* For example, a navigation decision to a video sharing website may
|
|
6474
|
-
* be accepted under the
|
|
6481
|
+
* be accepted under the proviso no movies are allowed to autoplay. The
|
|
6475
6482
|
* autoplay policy in this case would be set in the `policies`.
|
|
6476
6483
|
* @param policies a {@link WebKit2.WebsitePolicies}
|
|
6477
6484
|
* @since 2.30
|
|
@@ -6495,7 +6502,7 @@ export namespace WebKit2 {
|
|
|
6495
6502
|
apply: () => void;
|
|
6496
6503
|
/**
|
|
6497
6504
|
* Emitted after change of selected printer in the dialog. The actual page setup
|
|
6498
|
-
* and print settings are available and the custom widget can
|
|
6505
|
+
* and print settings are available and the custom widget can update itself
|
|
6499
6506
|
* according to their values.
|
|
6500
6507
|
* @signal
|
|
6501
6508
|
* @since 2.16
|
|
@@ -6515,9 +6522,9 @@ export namespace WebKit2 {
|
|
|
6515
6522
|
}
|
|
6516
6523
|
|
|
6517
6524
|
/**
|
|
6518
|
-
* Allows
|
|
6525
|
+
* Allows embedding a custom widget in the print dialog.
|
|
6519
6526
|
*
|
|
6520
|
-
* A WebKitPrintCustomWidget allows
|
|
6527
|
+
* A WebKitPrintCustomWidget allows embedding a custom widget in the print
|
|
6521
6528
|
* dialog by connecting to the {@link WebKit2.PrintOperation.SignalSignatures.create_custom_widget | WebKit2.PrintOperation::create-custom-widget}
|
|
6522
6529
|
* signal, creating a new WebKitPrintCustomWidget with
|
|
6523
6530
|
* `webkit_print_custom_widget_new()` and returning it from there. You can later
|
|
@@ -6630,7 +6637,7 @@ export namespace WebKit2 {
|
|
|
6630
6637
|
* Emitted when displaying the print dialog with `webkit_print_operation_run_dialog()`.
|
|
6631
6638
|
* The returned {@link WebKit2.PrintCustomWidget} will be added to the print dialog and
|
|
6632
6639
|
* it will be owned by the `print_operation`. However, the object is guaranteed
|
|
6633
|
-
* to be alive until the {@link WebKit2.PrintCustomWidget.SignalSignatures.apply | WebKit2.PrintCustomWidget::apply} is emitted.
|
|
6640
|
+
* to be alive until the {@link WebKit2.PrintCustomWidget.SignalSignatures.apply | WebKit2.PrintCustomWidget::apply} signal is emitted.
|
|
6634
6641
|
* @signal
|
|
6635
6642
|
* @since 2.16
|
|
6636
6643
|
* @deprecated since 2.40
|
|
@@ -6793,8 +6800,8 @@ export namespace WebKit2 {
|
|
|
6793
6800
|
* is returned and the print operation starts. In this case, the {@link WebKit2.PrintOperation.SignalSignatures.finished | WebKit2.PrintOperation::finished}
|
|
6794
6801
|
* signal is emitted when the operation finishes. If an error occurs while printing, the signal
|
|
6795
6802
|
* {@link WebKit2.PrintOperation.SignalSignatures.failed | WebKit2.PrintOperation::failed} is emitted before {@link WebKit2.PrintOperation.SignalSignatures.finished | WebKit2.PrintOperation::finished}.
|
|
6796
|
-
* If the print dialog is not cancelled current print settings and page setup of `print_operation`
|
|
6797
|
-
* are updated with options selected by the user when Print button is pressed in print dialog.
|
|
6803
|
+
* If the print dialog is not cancelled, the current print settings and page setup of `print_operation`
|
|
6804
|
+
* are updated with the options selected by the user when the Print button is pressed in the print dialog.
|
|
6798
6805
|
* You can get the updated print settings and page setup by calling
|
|
6799
6806
|
* `webkit_print_operation_get_print_settings()` and `webkit_print_operation_get_page_setup()`
|
|
6800
6807
|
* after this method.
|
|
@@ -6893,7 +6900,7 @@ export namespace WebKit2 {
|
|
|
6893
6900
|
/**
|
|
6894
6901
|
* Return the {@link WebKit2.URIRequest} associated with the response decision.
|
|
6895
6902
|
*
|
|
6896
|
-
* Modifications to the returned object are
|
|
6903
|
+
* Modifications to the returned object are *not* taken
|
|
6897
6904
|
* into account when the request is sent over the network, and is intended
|
|
6898
6905
|
* only to aid in evaluating whether a response decision should be taken or
|
|
6899
6906
|
* not. To modify requests before they are sent over the network the
|
|
@@ -6910,7 +6917,7 @@ export namespace WebKit2 {
|
|
|
6910
6917
|
|
|
6911
6918
|
/**
|
|
6912
6919
|
* Gets whether the request is the main frame main resource
|
|
6913
|
-
* @returns `true` if the request is the main frame main
|
|
6920
|
+
* @returns `true` if the request is the main frame main resource or `false` otherwise
|
|
6914
6921
|
* @since 2.40
|
|
6915
6922
|
*/
|
|
6916
6923
|
is_main_frame_main_resource(): boolean;
|
|
@@ -7289,7 +7296,7 @@ export namespace WebKit2 {
|
|
|
7289
7296
|
}
|
|
7290
7297
|
|
|
7291
7298
|
/**
|
|
7292
|
-
* Control the
|
|
7299
|
+
* Control the behavior of a {@link WebKit2.WebView}.
|
|
7293
7300
|
*
|
|
7294
7301
|
* {@link WebKit2.Settings} can be applied to a {@link WebKit2.WebView} to control text charset,
|
|
7295
7302
|
* color, font sizes, printing mode, script support, loading of images and various
|
|
@@ -7311,7 +7318,7 @@ export namespace WebKit2 {
|
|
|
7311
7318
|
* Whether file access is allowed from file URLs. By default, when
|
|
7312
7319
|
* something is loaded in a {@link WebKit2.WebView} using a file URI, cross
|
|
7313
7320
|
* origin requests to other file resources are not allowed. This
|
|
7314
|
-
* setting allows you to change that
|
|
7321
|
+
* setting allows you to change that behavior, so that it would be
|
|
7315
7322
|
* possible to do a XMLHttpRequest of a local file, for example.
|
|
7316
7323
|
* @since 2.10
|
|
7317
7324
|
* @default false
|
|
@@ -7323,7 +7330,7 @@ export namespace WebKit2 {
|
|
|
7323
7330
|
* Whether file access is allowed from file URLs. By default, when
|
|
7324
7331
|
* something is loaded in a {@link WebKit2.WebView} using a file URI, cross
|
|
7325
7332
|
* origin requests to other file resources are not allowed. This
|
|
7326
|
-
* setting allows you to change that
|
|
7333
|
+
* setting allows you to change that behavior, so that it would be
|
|
7327
7334
|
* possible to do a XMLHttpRequest of a local file, for example.
|
|
7328
7335
|
* @since 2.10
|
|
7329
7336
|
* @default false
|
|
@@ -7334,7 +7341,7 @@ export namespace WebKit2 {
|
|
|
7334
7341
|
/**
|
|
7335
7342
|
* Determine whether it's allowed to create and run modal dialogs
|
|
7336
7343
|
* from a {@link WebKit2.WebView} through JavaScript with
|
|
7337
|
-
*
|
|
7344
|
+
* `window.showModalDialog`. If it's set to
|
|
7338
7345
|
* `false`, the associated {@link WebKit2.WebView} won't be able to create
|
|
7339
7346
|
* new modal dialogs, so not even the {@link WebKit2.WebView.SignalSignatures.create | WebKit2.WebView::create}
|
|
7340
7347
|
* signal will be emitted.
|
|
@@ -7346,7 +7353,7 @@ export namespace WebKit2 {
|
|
|
7346
7353
|
/**
|
|
7347
7354
|
* Determine whether it's allowed to create and run modal dialogs
|
|
7348
7355
|
* from a {@link WebKit2.WebView} through JavaScript with
|
|
7349
|
-
*
|
|
7356
|
+
* `window.showModalDialog`. If it's set to
|
|
7350
7357
|
* `false`, the associated {@link WebKit2.WebView} won't be able to create
|
|
7351
7358
|
* new modal dialogs, so not even the {@link WebKit2.WebView.SignalSignatures.create | WebKit2.WebView::create}
|
|
7352
7359
|
* signal will be emitted.
|
|
@@ -7359,7 +7366,7 @@ export namespace WebKit2 {
|
|
|
7359
7366
|
* Whether or not the top frame is allowed to navigate to data URLs. It is disabled by default
|
|
7360
7367
|
* due to the risk it poses when loading untrusted URLs, with data URLs being used in scamming
|
|
7361
7368
|
* and phishing attacks. In contrast, a scenario where it could be enabled could be an app that
|
|
7362
|
-
* embeds a WebView and you have control of the pages being
|
|
7369
|
+
* embeds a WebView and you have control of the pages being shown instead of a generic browser.
|
|
7363
7370
|
* @since 2.28
|
|
7364
7371
|
* @default false
|
|
7365
7372
|
*/
|
|
@@ -7370,7 +7377,7 @@ export namespace WebKit2 {
|
|
|
7370
7377
|
* Whether or not the top frame is allowed to navigate to data URLs. It is disabled by default
|
|
7371
7378
|
* due to the risk it poses when loading untrusted URLs, with data URLs being used in scamming
|
|
7372
7379
|
* and phishing attacks. In contrast, a scenario where it could be enabled could be an app that
|
|
7373
|
-
* embeds a WebView and you have control of the pages being
|
|
7380
|
+
* embeds a WebView and you have control of the pages being shown instead of a generic browser.
|
|
7374
7381
|
* @since 2.28
|
|
7375
7382
|
* @default false
|
|
7376
7383
|
*/
|
|
@@ -7382,7 +7389,7 @@ export namespace WebKit2 {
|
|
|
7382
7389
|
* should be allowed to access content from any origin. By default, when
|
|
7383
7390
|
* something is loaded in a {@link WebKit2.WebView} using a file scheme URL,
|
|
7384
7391
|
* access to the local file system and arbitrary local storage is not
|
|
7385
|
-
* allowed. This setting allows you to change that
|
|
7392
|
+
* allowed. This setting allows you to change that behavior, so that
|
|
7386
7393
|
* it would be possible to use local storage, for example.
|
|
7387
7394
|
* @since 2.14
|
|
7388
7395
|
* @default false
|
|
@@ -7395,7 +7402,7 @@ export namespace WebKit2 {
|
|
|
7395
7402
|
* should be allowed to access content from any origin. By default, when
|
|
7396
7403
|
* something is loaded in a {@link WebKit2.WebView} using a file scheme URL,
|
|
7397
7404
|
* access to the local file system and arbitrary local storage is not
|
|
7398
|
-
* allowed. This setting allows you to change that
|
|
7405
|
+
* allowed. This setting allows you to change that behavior, so that
|
|
7399
7406
|
* it would be possible to use local storage, for example.
|
|
7400
7407
|
* @since 2.14
|
|
7401
7408
|
* @default false
|
|
@@ -8000,7 +8007,7 @@ export namespace WebKit2 {
|
|
|
8000
8007
|
/**
|
|
8001
8008
|
* Determines whether or not private browsing is enabled. Private browsing
|
|
8002
8009
|
* will disable history, cache and form auto-fill for any pages visited.
|
|
8003
|
-
* @deprecated since 2.16
|
|
8010
|
+
* @deprecated since 2.16: Use {@link WebKit2.WebView.is_ephemeral} or {@link WebKit2.WebsiteDataManager.is_ephemeral} instead.
|
|
8004
8011
|
* @default false
|
|
8005
8012
|
*/
|
|
8006
8013
|
get enable_private_browsing(): boolean;
|
|
@@ -8009,7 +8016,7 @@ export namespace WebKit2 {
|
|
|
8009
8016
|
/**
|
|
8010
8017
|
* Determines whether or not private browsing is enabled. Private browsing
|
|
8011
8018
|
* will disable history, cache and form auto-fill for any pages visited.
|
|
8012
|
-
* @deprecated since 2.16
|
|
8019
|
+
* @deprecated since 2.16: Use {@link WebKit2.WebView.is_ephemeral} or {@link WebKit2.WebsiteDataManager.is_ephemeral} instead.
|
|
8013
8020
|
* @default false
|
|
8014
8021
|
*/
|
|
8015
8022
|
get enablePrivateBrowsing(): boolean;
|
|
@@ -8071,9 +8078,9 @@ export namespace WebKit2 {
|
|
|
8071
8078
|
* Whether to enable Spatial Navigation. This feature consists in the ability
|
|
8072
8079
|
* to navigate between focusable elements in a Web page, such as hyperlinks
|
|
8073
8080
|
* and form controls, by using Left, Right, Up and Down arrow keys.
|
|
8074
|
-
* For example, if
|
|
8081
|
+
* For example, if a user presses the Right key, heuristics determine whether
|
|
8075
8082
|
* there is an element they might be trying to reach towards the right, and if
|
|
8076
|
-
* there are multiple elements, which element they probably
|
|
8083
|
+
* there are multiple elements, which element they probably want.
|
|
8077
8084
|
* @since 2.4
|
|
8078
8085
|
* @default false
|
|
8079
8086
|
*/
|
|
@@ -8084,9 +8091,9 @@ export namespace WebKit2 {
|
|
|
8084
8091
|
* Whether to enable Spatial Navigation. This feature consists in the ability
|
|
8085
8092
|
* to navigate between focusable elements in a Web page, such as hyperlinks
|
|
8086
8093
|
* and form controls, by using Left, Right, Up and Down arrow keys.
|
|
8087
|
-
* For example, if
|
|
8094
|
+
* For example, if a user presses the Right key, heuristics determine whether
|
|
8088
8095
|
* there is an element they might be trying to reach towards the right, and if
|
|
8089
|
-
* there are multiple elements, which element they probably
|
|
8096
|
+
* there are multiple elements, which element they probably want.
|
|
8090
8097
|
* @since 2.4
|
|
8091
8098
|
* @default false
|
|
8092
8099
|
*/
|
|
@@ -8318,7 +8325,7 @@ export namespace WebKit2 {
|
|
|
8318
8325
|
set mathFontFamily(val: string | null);
|
|
8319
8326
|
|
|
8320
8327
|
/**
|
|
8321
|
-
* List of media content types requiring hardware support, split by
|
|
8328
|
+
* List of media content types requiring hardware support, split by colons (:).
|
|
8322
8329
|
* For example: 'video/webm; codecs="vp*":video/mp4; codecs="avc*":video/* codecs="av1*"'.
|
|
8323
8330
|
* @since 2.30
|
|
8324
8331
|
* @default null
|
|
@@ -8327,7 +8334,7 @@ export namespace WebKit2 {
|
|
|
8327
8334
|
set media_content_types_requiring_hardware_support(val: string);
|
|
8328
8335
|
|
|
8329
8336
|
/**
|
|
8330
|
-
* List of media content types requiring hardware support, split by
|
|
8337
|
+
* List of media content types requiring hardware support, split by colons (:).
|
|
8331
8338
|
* For example: 'video/webm; codecs="vp*":video/mp4; codecs="avc*":video/* codecs="av1*"'.
|
|
8332
8339
|
* @since 2.30
|
|
8333
8340
|
* @default null
|
|
@@ -8494,8 +8501,8 @@ export namespace WebKit2 {
|
|
|
8494
8501
|
/**
|
|
8495
8502
|
* Allow customization of the WebRTC UDP ports range.
|
|
8496
8503
|
*
|
|
8497
|
-
* In some constrained environments where a firewall blocks UDP network traffic
|
|
8498
|
-
* specific port range, this
|
|
8504
|
+
* In some constrained environments where a firewall blocks UDP network traffic except on a
|
|
8505
|
+
* specific port range, this setting can be used to give hints to the WebRTC backend regarding
|
|
8499
8506
|
* which ports to allocate. The format is min-port:max-port, so for instance 20000:30000. The
|
|
8500
8507
|
* default empty string value means the OS will use no hints from the WebRTC backend. Using 0
|
|
8501
8508
|
* for one of the values is allowed and means the value is unspecified.
|
|
@@ -8508,8 +8515,8 @@ export namespace WebKit2 {
|
|
|
8508
8515
|
/**
|
|
8509
8516
|
* Allow customization of the WebRTC UDP ports range.
|
|
8510
8517
|
*
|
|
8511
|
-
* In some constrained environments where a firewall blocks UDP network traffic
|
|
8512
|
-
* specific port range, this
|
|
8518
|
+
* In some constrained environments where a firewall blocks UDP network traffic except on a
|
|
8519
|
+
* specific port range, this setting can be used to give hints to the WebRTC backend regarding
|
|
8513
8520
|
* which ports to allocate. The format is min-port:max-port, so for instance 20000:30000. The
|
|
8514
8521
|
* default empty string value means the OS will use no hints from the WebRTC backend. Using 0
|
|
8515
8522
|
* for one of the values is allowed and means the value is unspecified.
|
|
@@ -8606,7 +8613,7 @@ export namespace WebKit2 {
|
|
|
8606
8613
|
* Gets the list of available development WebKit features.
|
|
8607
8614
|
*
|
|
8608
8615
|
* The returned features are a subset of those returned by
|
|
8609
|
-
* {@link Settings.get_all_features}, and
|
|
8616
|
+
* {@link Settings.get_all_features}, and include those which
|
|
8610
8617
|
* web and WebKit developers might find useful, but in general should
|
|
8611
8618
|
* *not* be exposed to end users; see {@link FeatureStatus} for
|
|
8612
8619
|
* more details.
|
|
@@ -8618,7 +8625,7 @@ export namespace WebKit2 {
|
|
|
8618
8625
|
* Gets the list of available experimental WebKit features.
|
|
8619
8626
|
*
|
|
8620
8627
|
* The returned features are a subset of those returned by
|
|
8621
|
-
* {@link Settings.get_all_features}, and
|
|
8628
|
+
* {@link Settings.get_all_features}, and include those which
|
|
8622
8629
|
* certain applications may want to expose to end users; see
|
|
8623
8630
|
* {@link FeatureStatus} for more details.
|
|
8624
8631
|
* @since 2.42
|
|
@@ -8627,7 +8634,7 @@ export namespace WebKit2 {
|
|
|
8627
8634
|
|
|
8628
8635
|
// Methods
|
|
8629
8636
|
/**
|
|
8630
|
-
* Reads the contents of the given `group_name` from the given `key_file` and
|
|
8637
|
+
* Reads the contents of the given `group_name` from the given `key_file` and applies the value of
|
|
8631
8638
|
* each key/value to the corresponding property on the `settings`.
|
|
8632
8639
|
*
|
|
8633
8640
|
* Value types have to match with the corresponding setting property type and the group keys have to
|
|
@@ -8658,7 +8665,7 @@ export namespace WebKit2 {
|
|
|
8658
8665
|
|
|
8659
8666
|
/**
|
|
8660
8667
|
* Get the {@link WebKit2.Settings.allow_top_navigation_to_data_urls} property.
|
|
8661
|
-
* @returns `true` If navigation to data URLs from the top frame is allowed or `false
|
|
8668
|
+
* @returns `true` If navigation to data URLs from the top frame is allowed or `false` otherwise.
|
|
8662
8669
|
* @since 2.28
|
|
8663
8670
|
*/
|
|
8664
8671
|
get_allow_top_navigation_to_data_urls(): boolean;
|
|
@@ -8736,7 +8743,7 @@ export namespace WebKit2 {
|
|
|
8736
8743
|
|
|
8737
8744
|
/**
|
|
8738
8745
|
* Get the {@link WebKit2.Settings.enable_back_forward_navigation_gestures} property.
|
|
8739
|
-
* @returns `true` if horizontal swipe gesture will trigger back-forward
|
|
8746
|
+
* @returns `true` if horizontal swipe gesture will trigger back-forward navigation or `false` otherwise.
|
|
8740
8747
|
* @since 2.24
|
|
8741
8748
|
*/
|
|
8742
8749
|
get_enable_back_forward_navigation_gestures(): boolean;
|
|
@@ -8802,7 +8809,7 @@ export namespace WebKit2 {
|
|
|
8802
8809
|
/**
|
|
8803
8810
|
* Get the {@link WebKit2.Settings.enable_java} property.
|
|
8804
8811
|
* @returns `false` always.
|
|
8805
|
-
* @deprecated since 2.38
|
|
8812
|
+
* @deprecated since 2.38: This function always returns `false`.
|
|
8806
8813
|
*/
|
|
8807
8814
|
get_enable_java(): boolean;
|
|
8808
8815
|
|
|
@@ -8863,7 +8870,7 @@ export namespace WebKit2 {
|
|
|
8863
8870
|
|
|
8864
8871
|
/**
|
|
8865
8872
|
* Get the {@link WebKit2.Settings.enable_page_cache} property.
|
|
8866
|
-
* @returns `true` if page cache enabled or `false` otherwise.
|
|
8873
|
+
* @returns `true` if page cache is enabled or `false` otherwise.
|
|
8867
8874
|
*/
|
|
8868
8875
|
get_enable_page_cache(): boolean;
|
|
8869
8876
|
|
|
@@ -8877,7 +8884,7 @@ export namespace WebKit2 {
|
|
|
8877
8884
|
/**
|
|
8878
8885
|
* Get the {@link WebKit2.Settings.enable_private_browsing} property.
|
|
8879
8886
|
* @returns `true` If private browsing is enabled or `false` otherwise.
|
|
8880
|
-
* @deprecated since 2.16
|
|
8887
|
+
* @deprecated since 2.16: Use {@link WebKit2.WebView.is_ephemeral} or {@link WebKit2.WebsiteDataManager.is_ephemeral} instead.
|
|
8881
8888
|
*/
|
|
8882
8889
|
get_enable_private_browsing(): boolean;
|
|
8883
8890
|
|
|
@@ -8941,7 +8948,7 @@ export namespace WebKit2 {
|
|
|
8941
8948
|
/**
|
|
8942
8949
|
* The XSS auditor has been removed. This function returns `false`.
|
|
8943
8950
|
* @returns `false`
|
|
8944
|
-
* @deprecated since 2.38
|
|
8951
|
+
* @deprecated since 2.38: This function does nothing.
|
|
8945
8952
|
*/
|
|
8946
8953
|
get_enable_xss_auditor(): boolean;
|
|
8947
8954
|
|
|
@@ -8953,7 +8960,7 @@ export namespace WebKit2 {
|
|
|
8953
8960
|
|
|
8954
8961
|
/**
|
|
8955
8962
|
* Gets whether a feature is enabled.
|
|
8956
|
-
* @param feature the feature to
|
|
8963
|
+
* @param feature the feature to query.
|
|
8957
8964
|
* @returns Whether the feature is enabled.
|
|
8958
8965
|
* @since 2.42
|
|
8959
8966
|
*/
|
|
@@ -8974,7 +8981,7 @@ export namespace WebKit2 {
|
|
|
8974
8981
|
|
|
8975
8982
|
/**
|
|
8976
8983
|
* Get the {@link WebKit2.Settings.javascript_can_open_windows_automatically} property.
|
|
8977
|
-
* @returns `true` If JavaScript can open
|
|
8984
|
+
* @returns `true` If JavaScript can open windows automatically or `false` otherwise.
|
|
8978
8985
|
*/
|
|
8979
8986
|
get_javascript_can_open_windows_automatically(): boolean;
|
|
8980
8987
|
|
|
@@ -8987,7 +8994,8 @@ export namespace WebKit2 {
|
|
|
8987
8994
|
|
|
8988
8995
|
/**
|
|
8989
8996
|
* Gets the {@link WebKit2.Settings.math_font_family} property.
|
|
8990
|
-
* @returns The default font family used to display content marked with math font.
|
|
8997
|
+
* @returns The default font family used to display content marked with math font.
|
|
8998
|
+
* @since 2.52
|
|
8991
8999
|
*/
|
|
8992
9000
|
get_math_font_family(): string | null;
|
|
8993
9001
|
|
|
@@ -9006,7 +9014,7 @@ export namespace WebKit2 {
|
|
|
9006
9014
|
|
|
9007
9015
|
/**
|
|
9008
9016
|
* Get the {@link WebKit2.Settings.media_playback_requires_user_gesture} property.
|
|
9009
|
-
* @returns `true` If
|
|
9017
|
+
* @returns `true` If a user gesture is needed to play or load media or `false` if no user gesture is needed.
|
|
9010
9018
|
*/
|
|
9011
9019
|
get_media_playback_requires_user_gesture(): boolean;
|
|
9012
9020
|
|
|
@@ -9226,7 +9234,7 @@ export namespace WebKit2 {
|
|
|
9226
9234
|
*
|
|
9227
9235
|
* Deprecated function that does nothing.
|
|
9228
9236
|
* @param enabled Value to be set
|
|
9229
|
-
* @deprecated since 2.38
|
|
9237
|
+
* @deprecated since 2.38: This function does nothing.
|
|
9230
9238
|
*/
|
|
9231
9239
|
set_enable_java(enabled: boolean): void;
|
|
9232
9240
|
|
|
@@ -9274,7 +9282,7 @@ export namespace WebKit2 {
|
|
|
9274
9282
|
/**
|
|
9275
9283
|
* Set the {@link WebKit2.Settings.enable_mock_capture_devices} property.
|
|
9276
9284
|
* @param enabled Value to be set
|
|
9277
|
-
* @since 2.
|
|
9285
|
+
* @since 2.24
|
|
9278
9286
|
*/
|
|
9279
9287
|
set_enable_mock_capture_devices(enabled: boolean): void;
|
|
9280
9288
|
|
|
@@ -9301,7 +9309,7 @@ export namespace WebKit2 {
|
|
|
9301
9309
|
/**
|
|
9302
9310
|
* Set the {@link WebKit2.Settings.enable_private_browsing} property.
|
|
9303
9311
|
* @param enabled Value to be set
|
|
9304
|
-
* @deprecated since 2.16
|
|
9312
|
+
* @deprecated since 2.16: Use {@link WebKit2.WebView.is_ephemeral} or {@link WebKit2.WebsiteDataManager.is_ephemeral} instead.
|
|
9305
9313
|
*/
|
|
9306
9314
|
set_enable_private_browsing(enabled: boolean): void;
|
|
9307
9315
|
|
|
@@ -9367,7 +9375,7 @@ export namespace WebKit2 {
|
|
|
9367
9375
|
/**
|
|
9368
9376
|
* The XSS auditor has been removed. This function does nothing.
|
|
9369
9377
|
* @param enabled Value to be set
|
|
9370
|
-
* @deprecated since 2.38
|
|
9378
|
+
* @deprecated since 2.38: This function does nothing.
|
|
9371
9379
|
*/
|
|
9372
9380
|
set_enable_xss_auditor(enabled: boolean): void;
|
|
9373
9381
|
|
|
@@ -9418,15 +9426,14 @@ export namespace WebKit2 {
|
|
|
9418
9426
|
|
|
9419
9427
|
/**
|
|
9420
9428
|
* Set the {@link WebKit2.Settings.math_font_family} property.
|
|
9421
|
-
*
|
|
9422
|
-
* Since 2.52
|
|
9423
9429
|
* @param math_font_family the new default math font family
|
|
9430
|
+
* @since 2.52
|
|
9424
9431
|
*/
|
|
9425
9432
|
set_math_font_family(math_font_family: string | null): void;
|
|
9426
9433
|
|
|
9427
9434
|
/**
|
|
9428
9435
|
* Set the {@link WebKit2.Settings.media_content_types_requiring_hardware_support} property.
|
|
9429
|
-
* @param content_types list of media content types requiring hardware support split by
|
|
9436
|
+
* @param content_types list of media content types requiring hardware support split by colons (:) or `null` to use the default value.
|
|
9430
9437
|
* @since 2.30
|
|
9431
9438
|
*/
|
|
9432
9439
|
set_media_content_types_requiring_hardware_support(content_types: string | null): void;
|
|
@@ -9489,10 +9496,10 @@ export namespace WebKit2 {
|
|
|
9489
9496
|
* Set the {@link WebKit2.Settings.user_agent} property by appending the application details.
|
|
9490
9497
|
*
|
|
9491
9498
|
* Set the {@link WebKit2.Settings.user_agent} property by appending the application details to the default user
|
|
9492
|
-
* agent. If no application name
|
|
9493
|
-
* the
|
|
9499
|
+
* agent. If no application name is given, the default user agent will be used and `application_version`
|
|
9500
|
+
* is ignored. If only the name is given, the default engine version is used with the given application name.
|
|
9494
9501
|
* @param application_name The application name used for the user agent or `null` to use the default user agent.
|
|
9495
|
-
* @param application_version The application version for the user agent or `null` to
|
|
9502
|
+
* @param application_version The application version for the user agent or `null` to use the default version.
|
|
9496
9503
|
*/
|
|
9497
9504
|
set_user_agent_with_application_details(application_name: string | null, application_version: string | null): void;
|
|
9498
9505
|
|
|
@@ -9860,10 +9867,10 @@ export namespace WebKit2 {
|
|
|
9860
9867
|
|
|
9861
9868
|
/**
|
|
9862
9869
|
* Get the request body.
|
|
9863
|
-
* @returns
|
|
9870
|
+
* @returns the body of the `request`.
|
|
9864
9871
|
* @since 2.40
|
|
9865
9872
|
*/
|
|
9866
|
-
get_http_body(): Gio.InputStream;
|
|
9873
|
+
get_http_body(): Gio.InputStream | null;
|
|
9867
9874
|
|
|
9868
9875
|
/**
|
|
9869
9876
|
* Get the {@link Soup.MessageHeaders} of the request.
|
|
@@ -9928,11 +9935,11 @@ export namespace WebKit2 {
|
|
|
9928
9935
|
* a {@link WebKit2.URISchemeRequestCallback}. After that, when a URI response
|
|
9929
9936
|
* is made with that particular scheme, your callback will be
|
|
9930
9937
|
* called. There you will be able to provide more response parameters
|
|
9931
|
-
* when the methods and properties of a {@link WebKit2.URISchemeRequest}
|
|
9938
|
+
* when the methods and properties of a {@link WebKit2.URISchemeRequest} are not
|
|
9932
9939
|
* enough.
|
|
9933
9940
|
*
|
|
9934
9941
|
* When you finished setting up your {@link WebKit2.URISchemeResponse}, call
|
|
9935
|
-
* `
|
|
9942
|
+
* `webkit_uri_scheme_request_finish_with_response()` with it to return the response.
|
|
9936
9943
|
* @gir-type Class
|
|
9937
9944
|
*/
|
|
9938
9945
|
class URISchemeResponse extends GObject.Object {
|
|
@@ -10106,7 +10113,7 @@ export namespace WebKit2 {
|
|
|
10106
10113
|
* `webkit_user_content_filter_store_fetch_identifiers_finish()` to obtain the list of
|
|
10107
10114
|
* filter identifiers.
|
|
10108
10115
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
10109
|
-
* @param callback a {@link Gio.AsyncReadyCallback} to call when the
|
|
10116
|
+
* @param callback a {@link Gio.AsyncReadyCallback} to call when the identifiers have been fetched
|
|
10110
10117
|
* @since 2.24
|
|
10111
10118
|
*/
|
|
10112
10119
|
fetch_identifiers(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
|
|
@@ -10118,7 +10125,7 @@ export namespace WebKit2 {
|
|
|
10118
10125
|
* `webkit_user_content_filter_store_fetch_identifiers_finish()` to obtain the list of
|
|
10119
10126
|
* filter identifiers.
|
|
10120
10127
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
10121
|
-
* @param callback a {@link Gio.AsyncReadyCallback} to call when the
|
|
10128
|
+
* @param callback a {@link Gio.AsyncReadyCallback} to call when the identifiers have been fetched
|
|
10122
10129
|
* @since 2.24
|
|
10123
10130
|
*/
|
|
10124
10131
|
fetch_identifiers(cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<string[]> | void;
|
|
@@ -10244,10 +10251,10 @@ export namespace WebKit2 {
|
|
|
10244
10251
|
remove_finish(result: Gio.AsyncResult): boolean;
|
|
10245
10252
|
|
|
10246
10253
|
/**
|
|
10247
|
-
* Asynchronously save a content filter from a
|
|
10254
|
+
* Asynchronously save a content filter from a source rule set.
|
|
10248
10255
|
*
|
|
10249
10256
|
* Asynchronously save a content filter from a source rule set in the
|
|
10250
|
-
* [WebKit content
|
|
10257
|
+
* [WebKit content extensions JSON format](https://webkit.org/blog/3476/content-blockers-first-look/).
|
|
10251
10258
|
*
|
|
10252
10259
|
* The `identifier` can be used afterwards to refer to the filter when using
|
|
10253
10260
|
* `webkit_user_content_filter_store_remove()` and `webkit_user_content_filter_store_load()`.
|
|
@@ -10264,10 +10271,10 @@ export namespace WebKit2 {
|
|
|
10264
10271
|
save(identifier: string, source: GLib.Bytes | Uint8Array, cancellable: Gio.Cancellable | null): globalThis.Promise<UserContentFilter>;
|
|
10265
10272
|
|
|
10266
10273
|
/**
|
|
10267
|
-
* Asynchronously save a content filter from a
|
|
10274
|
+
* Asynchronously save a content filter from a source rule set.
|
|
10268
10275
|
*
|
|
10269
10276
|
* Asynchronously save a content filter from a source rule set in the
|
|
10270
|
-
* [WebKit content
|
|
10277
|
+
* [WebKit content extensions JSON format](https://webkit.org/blog/3476/content-blockers-first-look/).
|
|
10271
10278
|
*
|
|
10272
10279
|
* The `identifier` can be used afterwards to refer to the filter when using
|
|
10273
10280
|
* `webkit_user_content_filter_store_remove()` and `webkit_user_content_filter_store_load()`.
|
|
@@ -10285,10 +10292,10 @@ export namespace WebKit2 {
|
|
|
10285
10292
|
save(identifier: string, source: GLib.Bytes | Uint8Array, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
|
|
10286
10293
|
|
|
10287
10294
|
/**
|
|
10288
|
-
* Asynchronously save a content filter from a
|
|
10295
|
+
* Asynchronously save a content filter from a source rule set.
|
|
10289
10296
|
*
|
|
10290
10297
|
* Asynchronously save a content filter from a source rule set in the
|
|
10291
|
-
* [WebKit content
|
|
10298
|
+
* [WebKit content extensions JSON format](https://webkit.org/blog/3476/content-blockers-first-look/).
|
|
10292
10299
|
*
|
|
10293
10300
|
* The `identifier` can be used afterwards to refer to the filter when using
|
|
10294
10301
|
* `webkit_user_content_filter_store_remove()` and `webkit_user_content_filter_store_load()`.
|
|
@@ -10366,7 +10373,7 @@ export namespace WebKit2 {
|
|
|
10366
10373
|
save_from_file(identifier: string, file: Gio.File, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<UserContentFilter> | void;
|
|
10367
10374
|
|
|
10368
10375
|
/**
|
|
10369
|
-
* Finishes
|
|
10376
|
+
* Finishes an asynchronous filter save previously started with
|
|
10370
10377
|
* `webkit_user_content_filter_store_save_from_file()`.
|
|
10371
10378
|
* @param result a {@link Gio.AsyncResult}
|
|
10372
10379
|
* @returns a {@link WebKit2.UserContentFilter}, or `null` if saving failed.
|
|
@@ -10382,8 +10389,8 @@ export namespace WebKit2 {
|
|
|
10382
10389
|
interface SignalSignatures extends GObject.Object.SignalSignatures {
|
|
10383
10390
|
/**
|
|
10384
10391
|
* This signal is emitted when JavaScript in a web view calls
|
|
10385
|
-
*
|
|
10386
|
-
*
|
|
10392
|
+
* `window.webkit.messageHandlers.<name>.postMessage()`, after registering
|
|
10393
|
+
* `<name>` using
|
|
10387
10394
|
* `webkit_user_content_manager_register_script_message_handler()`
|
|
10388
10395
|
* @signal
|
|
10389
10396
|
* @since 2.8
|
|
@@ -10393,8 +10400,8 @@ export namespace WebKit2 {
|
|
|
10393
10400
|
"script-message-received": (value: JavascriptResult) => void;
|
|
10394
10401
|
/**
|
|
10395
10402
|
* This signal is emitted when JavaScript in a web view calls
|
|
10396
|
-
*
|
|
10397
|
-
*
|
|
10403
|
+
* `window.webkit.messageHandlers.<name>.postMessage()`, after registering
|
|
10404
|
+
* `<name>` using
|
|
10398
10405
|
* `webkit_user_content_manager_register_script_message_handler_with_reply()`
|
|
10399
10406
|
*
|
|
10400
10407
|
* The given `reply` can be used to send a return value with
|
|
@@ -10511,7 +10518,7 @@ export namespace WebKit2 {
|
|
|
10511
10518
|
*
|
|
10512
10519
|
* ```c
|
|
10513
10520
|
* WebKitWebView *view = webkit_web_view_new ();
|
|
10514
|
-
* WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager ();
|
|
10521
|
+
* WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager (view);
|
|
10515
10522
|
* g_signal_connect (manager, "script-message-received::foobar",
|
|
10516
10523
|
* G_CALLBACK (handle_script_message), NULL);
|
|
10517
10524
|
* webkit_user_content_manager_register_script_message_handler (manager, "foobar");
|
|
@@ -10585,9 +10592,8 @@ export namespace WebKit2 {
|
|
|
10585
10592
|
|
|
10586
10593
|
/**
|
|
10587
10594
|
* Removes a filter from the given {@link WebKit2.UserContentManager}.
|
|
10588
|
-
*
|
|
10589
|
-
* Since 2.24
|
|
10590
10595
|
* @param filter A {@link WebKit2.UserContentFilter}
|
|
10596
|
+
* @since 2.24
|
|
10591
10597
|
*/
|
|
10592
10598
|
remove_filter(filter: UserContentFilter): void;
|
|
10593
10599
|
|
|
@@ -10960,8 +10966,8 @@ export namespace WebKit2 {
|
|
|
10960
10966
|
memoryPressureSettings: MemoryPressureSettings;
|
|
10961
10967
|
process_swap_on_cross_site_navigation_enabled: boolean;
|
|
10962
10968
|
processSwapOnCrossSiteNavigationEnabled: boolean;
|
|
10963
|
-
time_zone_override: string;
|
|
10964
|
-
timeZoneOverride: string;
|
|
10969
|
+
time_zone_override: string | null;
|
|
10970
|
+
timeZoneOverride: string | null;
|
|
10965
10971
|
use_system_appearance_for_scrollbars: boolean;
|
|
10966
10972
|
useSystemAppearanceForScrollbars: boolean;
|
|
10967
10973
|
website_data_manager: WebsiteDataManager;
|
|
@@ -10970,15 +10976,15 @@ export namespace WebKit2 {
|
|
|
10970
10976
|
}
|
|
10971
10977
|
|
|
10972
10978
|
/**
|
|
10973
|
-
* Manages aspects common to all {@link WebKit2.WebView}
|
|
10979
|
+
* Manages aspects common to all {@link WebKit2.WebView} objects
|
|
10974
10980
|
*
|
|
10975
10981
|
* The {@link WebKit2.WebContext} manages all aspects common to all
|
|
10976
|
-
* {@link WebKit2.WebView}
|
|
10982
|
+
* {@link WebKit2.WebView} objects.
|
|
10977
10983
|
*
|
|
10978
10984
|
* You can define the {@link WebKit2.CacheModel} with
|
|
10979
10985
|
* `webkit_web_context_set_cache_model()`, depending on the needs of
|
|
10980
10986
|
* your application. You can access the {@link WebKit2.SecurityManager} to specify
|
|
10981
|
-
* the
|
|
10987
|
+
* the behavior of your application regarding security using
|
|
10982
10988
|
* `webkit_web_context_get_security_manager()`.
|
|
10983
10989
|
*
|
|
10984
10990
|
* It is also possible to change your preferred language or enable
|
|
@@ -11004,7 +11010,7 @@ export namespace WebKit2 {
|
|
|
11004
11010
|
/**
|
|
11005
11011
|
* The directory where local storage data will be saved.
|
|
11006
11012
|
* @since 2.8
|
|
11007
|
-
* @deprecated since 2.10
|
|
11013
|
+
* @deprecated since 2.10: Use {@link WebKit2.WebsiteDataManager.local_storage_directory} instead.
|
|
11008
11014
|
* @construct-only
|
|
11009
11015
|
* @default null
|
|
11010
11016
|
*/
|
|
@@ -11013,7 +11019,7 @@ export namespace WebKit2 {
|
|
|
11013
11019
|
/**
|
|
11014
11020
|
* The directory where local storage data will be saved.
|
|
11015
11021
|
* @since 2.8
|
|
11016
|
-
* @deprecated since 2.10
|
|
11022
|
+
* @deprecated since 2.10: Use {@link WebKit2.WebsiteDataManager.local_storage_directory} instead.
|
|
11017
11023
|
* @construct-only
|
|
11018
11024
|
* @default null
|
|
11019
11025
|
*/
|
|
@@ -11034,7 +11040,7 @@ export namespace WebKit2 {
|
|
|
11034
11040
|
set memoryPressureSettings(val: MemoryPressureSettings);
|
|
11035
11041
|
|
|
11036
11042
|
/**
|
|
11037
|
-
* Whether
|
|
11043
|
+
* Whether swapping Web processes on cross-site navigations is enabled.
|
|
11038
11044
|
*
|
|
11039
11045
|
* When enabled, pages from each security origin will be handled by
|
|
11040
11046
|
* their own separate Web processes, which are started (and
|
|
@@ -11048,7 +11054,7 @@ export namespace WebKit2 {
|
|
|
11048
11054
|
get process_swap_on_cross_site_navigation_enabled(): boolean;
|
|
11049
11055
|
|
|
11050
11056
|
/**
|
|
11051
|
-
* Whether
|
|
11057
|
+
* Whether swapping Web processes on cross-site navigations is enabled.
|
|
11052
11058
|
*
|
|
11053
11059
|
* When enabled, pages from each security origin will be handled by
|
|
11054
11060
|
* their own separate Web processes, which are started (and
|
|
@@ -11074,7 +11080,7 @@ export namespace WebKit2 {
|
|
|
11074
11080
|
* @construct-only
|
|
11075
11081
|
* @default null
|
|
11076
11082
|
*/
|
|
11077
|
-
get time_zone_override(): string;
|
|
11083
|
+
get time_zone_override(): string | null;
|
|
11078
11084
|
|
|
11079
11085
|
/**
|
|
11080
11086
|
* The timezone override for this web context. Setting this property provides a better
|
|
@@ -11089,13 +11095,13 @@ export namespace WebKit2 {
|
|
|
11089
11095
|
* @construct-only
|
|
11090
11096
|
* @default null
|
|
11091
11097
|
*/
|
|
11092
|
-
get timeZoneOverride(): string;
|
|
11098
|
+
get timeZoneOverride(): string | null;
|
|
11093
11099
|
|
|
11094
11100
|
/**
|
|
11095
11101
|
* Whether to use system appearance for rendering scrollbars.
|
|
11096
11102
|
*
|
|
11097
11103
|
* This is enabled by default for backwards compatibility, but it's only
|
|
11098
|
-
*
|
|
11104
|
+
* recommended to use when the application includes other widgets to ensure
|
|
11099
11105
|
* consistency, or when consistency with other applications is required too.
|
|
11100
11106
|
* @since 2.30
|
|
11101
11107
|
* @deprecated since 2.46
|
|
@@ -11108,7 +11114,7 @@ export namespace WebKit2 {
|
|
|
11108
11114
|
* Whether to use system appearance for rendering scrollbars.
|
|
11109
11115
|
*
|
|
11110
11116
|
* This is enabled by default for backwards compatibility, but it's only
|
|
11111
|
-
*
|
|
11117
|
+
* recommended to use when the application includes other widgets to ensure
|
|
11112
11118
|
* consistency, or when consistency with other applications is required too.
|
|
11113
11119
|
* @since 2.30
|
|
11114
11120
|
* @deprecated since 2.46
|
|
@@ -11215,7 +11221,7 @@ export namespace WebKit2 {
|
|
|
11215
11221
|
add_path_to_sandbox(path: string, read_only: boolean): void;
|
|
11216
11222
|
|
|
11217
11223
|
/**
|
|
11218
|
-
* Ignore further TLS errors on the `host` for
|
|
11224
|
+
* Ignore further TLS errors on the `host` for `certificate`.
|
|
11219
11225
|
*
|
|
11220
11226
|
* If `host` is an IPv6 address, it should not be surrounded by brackets. This
|
|
11221
11227
|
* expectation matches `g_uri_get_host()`.
|
|
@@ -11235,7 +11241,7 @@ export namespace WebKit2 {
|
|
|
11235
11241
|
/**
|
|
11236
11242
|
* Requests downloading of the specified URI string.
|
|
11237
11243
|
*
|
|
11238
|
-
* The download operation will not be associated
|
|
11244
|
+
* The download operation will not be associated with any {@link WebKit2.WebView},
|
|
11239
11245
|
* if you are interested in starting a download from a particular {@link WebKit2.WebView} use
|
|
11240
11246
|
* `webkit_web_view_download_uri()` instead.
|
|
11241
11247
|
* @param uri the URI to download
|
|
@@ -11325,7 +11331,7 @@ export namespace WebKit2 {
|
|
|
11325
11331
|
/**
|
|
11326
11332
|
* Finish an asynchronous operation started with webkit_web_context_get_plugins.
|
|
11327
11333
|
* @param result a {@link Gio.AsyncResult}
|
|
11328
|
-
* @returns a {@link GLib.List} of {@link WebKit2.Plugin}. You must free the {@link GLib.List} with `g_list_free()` and unref the {@link WebKit2.Plugin}
|
|
11334
|
+
* @returns a {@link GLib.List} of {@link WebKit2.Plugin}. You must free the {@link GLib.List} with `g_list_free()` and unref the {@link WebKit2.Plugin} objects with `g_object_unref()` when you're done with them.
|
|
11329
11335
|
* @deprecated since 2.32
|
|
11330
11336
|
* @throws GLib.Error
|
|
11331
11337
|
*/
|
|
@@ -11362,9 +11368,9 @@ export namespace WebKit2 {
|
|
|
11362
11368
|
get_spell_checking_enabled(): boolean;
|
|
11363
11369
|
|
|
11364
11370
|
/**
|
|
11365
|
-
* Get the
|
|
11371
|
+
* Get the list of spell checking languages.
|
|
11366
11372
|
*
|
|
11367
|
-
* Get the
|
|
11373
|
+
* Get the list of spell checking languages associated with
|
|
11368
11374
|
* `context`, or `null` if no languages have been previously set.
|
|
11369
11375
|
*
|
|
11370
11376
|
* See `webkit_web_context_set_spell_checking_languages()` for more
|
|
@@ -11375,20 +11381,21 @@ export namespace WebKit2 {
|
|
|
11375
11381
|
|
|
11376
11382
|
/**
|
|
11377
11383
|
* Get the {@link WebKit2.WebContext.time_zone_override} property.
|
|
11384
|
+
* @returns the time zone override, or `null` if none was set.
|
|
11378
11385
|
* @since 2.38
|
|
11379
11386
|
*/
|
|
11380
|
-
get_time_zone_override(): string;
|
|
11387
|
+
get_time_zone_override(): string | null;
|
|
11381
11388
|
|
|
11382
11389
|
/**
|
|
11383
11390
|
* Get the TLS errors policy of `context`.
|
|
11384
11391
|
* @returns a {@link WebKit2.TLSErrorsPolicy}
|
|
11385
|
-
* @deprecated since 2.32
|
|
11392
|
+
* @deprecated since 2.32: Use `webkit_website_data_manager_get_tls_errors_policy()` instead.
|
|
11386
11393
|
*/
|
|
11387
11394
|
get_tls_errors_policy(): TLSErrorsPolicy;
|
|
11388
11395
|
|
|
11389
11396
|
/**
|
|
11390
11397
|
* Get the {@link WebKit2.WebContext.use_system_appearance_for_scrollbars} property.
|
|
11391
|
-
* @returns `true` if scrollbars are
|
|
11398
|
+
* @returns `true` if scrollbars are rendered using the system appearance, or `false` otherwise
|
|
11392
11399
|
* @since 2.30
|
|
11393
11400
|
* @deprecated since 2.46
|
|
11394
11401
|
*/
|
|
@@ -11462,7 +11469,7 @@ export namespace WebKit2 {
|
|
|
11462
11469
|
/**
|
|
11463
11470
|
* Register `scheme` in `context`.
|
|
11464
11471
|
*
|
|
11465
|
-
* Register `scheme` in `context`, so that when
|
|
11472
|
+
* Register `scheme` in `context`, so that when a URI request with `scheme` is made in the
|
|
11466
11473
|
* {@link WebKit2.WebContext}, the {@link WebKit2.URISchemeRequestCallback} registered will be called with a
|
|
11467
11474
|
* {@link WebKit2.URISchemeRequest}.
|
|
11468
11475
|
* It is possible to handle URI scheme requests asynchronously, by calling `g_object_ref()` on the
|
|
@@ -11503,7 +11510,7 @@ export namespace WebKit2 {
|
|
|
11503
11510
|
register_uri_scheme(scheme: string, callback: URISchemeRequestCallback): void;
|
|
11504
11511
|
|
|
11505
11512
|
/**
|
|
11506
|
-
* Send `message` to all web process extensions associated
|
|
11513
|
+
* Send `message` to all web process extensions associated with `context`.
|
|
11507
11514
|
*
|
|
11508
11515
|
* If `message` is floating, it's consumed.
|
|
11509
11516
|
* @param message a {@link WebKit2.UserMessage}
|
|
@@ -11540,7 +11547,7 @@ export namespace WebKit2 {
|
|
|
11540
11547
|
* Specifies a usage model for WebViews, which WebKit will use to
|
|
11541
11548
|
* determine its caching behavior. All web views follow the cache
|
|
11542
11549
|
* model. This cache model determines the RAM and disk space to use
|
|
11543
|
-
* for caching previously viewed content
|
|
11550
|
+
* for caching previously viewed content.
|
|
11544
11551
|
*
|
|
11545
11552
|
* Research indicates that users tend to browse within clusters of
|
|
11546
11553
|
* documents that hold resources in common, and to revisit previously
|
|
@@ -11569,7 +11576,7 @@ export namespace WebKit2 {
|
|
|
11569
11576
|
* but it doesn't change the value returned by `webkit_website_data_manager_get_disk_cache_directory()`
|
|
11570
11577
|
* since the {@link WebKit2.WebsiteDataManager} is immutable.
|
|
11571
11578
|
* @param directory the directory to set
|
|
11572
|
-
* @deprecated since 2.10
|
|
11579
|
+
* @deprecated since 2.10: Use `webkit_web_context_new_with_website_data_manager()` instead.
|
|
11573
11580
|
*/
|
|
11574
11581
|
set_disk_cache_directory(directory: string): void;
|
|
11575
11582
|
|
|
@@ -11601,7 +11608,7 @@ export namespace WebKit2 {
|
|
|
11601
11608
|
* @param proxy_mode a {@link WebKit2.NetworkProxyMode}
|
|
11602
11609
|
* @param proxy_settings a {@link WebKit2.NetworkProxySettings}, or `null`
|
|
11603
11610
|
* @since 2.16
|
|
11604
|
-
* @deprecated since 2.32
|
|
11611
|
+
* @deprecated since 2.32: Use `webkit_website_data_manager_set_network_proxy_settings()` instead.
|
|
11605
11612
|
*/
|
|
11606
11613
|
set_network_proxy_settings(proxy_mode: NetworkProxyMode, proxy_settings: NetworkProxySettings | null): void;
|
|
11607
11614
|
|
|
@@ -11669,7 +11676,7 @@ export namespace WebKit2 {
|
|
|
11669
11676
|
/**
|
|
11670
11677
|
* Set the TLS errors policy of `context` as `policy`.
|
|
11671
11678
|
* @param policy a {@link WebKit2.TLSErrorsPolicy}
|
|
11672
|
-
* @deprecated since 2.32
|
|
11679
|
+
* @deprecated since 2.32: Use `webkit_website_data_manager_set_tls_errors_policy()` instead.
|
|
11673
11680
|
*/
|
|
11674
11681
|
set_tls_errors_policy(policy: TLSErrorsPolicy): void;
|
|
11675
11682
|
|
|
@@ -11931,7 +11938,7 @@ export namespace WebKit2 {
|
|
|
11931
11938
|
detach(): void;
|
|
11932
11939
|
|
|
11933
11940
|
/**
|
|
11934
|
-
* Get the height that the inspector view when attached.
|
|
11941
|
+
* Get the height that the inspector view should have when attached.
|
|
11935
11942
|
*
|
|
11936
11943
|
* Get the height that the inspector view should have when
|
|
11937
11944
|
* it's attached. If the inspector view is not attached this
|
|
@@ -11953,7 +11960,7 @@ export namespace WebKit2 {
|
|
|
11953
11960
|
*
|
|
11954
11961
|
* This can be `null` if
|
|
11955
11962
|
* nothing has been loaded yet in the inspected view, if the inspector
|
|
11956
|
-
* has been closed or when inspected view was loaded from
|
|
11963
|
+
* has been closed or when the inspected view was loaded from an HTML string
|
|
11957
11964
|
* instead of a URI.
|
|
11958
11965
|
* @returns the URI that is currently being inspected or `null`
|
|
11959
11966
|
*/
|
|
@@ -12012,7 +12019,7 @@ export namespace WebKit2 {
|
|
|
12012
12019
|
* every time new data has been received. It's
|
|
12013
12020
|
* useful to know the progress of the resource load operation.
|
|
12014
12021
|
*
|
|
12015
|
-
* This
|
|
12022
|
+
* This signal is deprecated since version 2.40 and it's never emitted.
|
|
12016
12023
|
* @signal
|
|
12017
12024
|
* @deprecated since 2.40
|
|
12018
12025
|
* @run-last
|
|
@@ -12135,7 +12142,7 @@ export namespace WebKit2 {
|
|
|
12135
12142
|
/**
|
|
12136
12143
|
* Finish an asynchronous operation started with `webkit_web_resource_get_data()`.
|
|
12137
12144
|
* @param result a {@link Gio.AsyncResult}
|
|
12138
|
-
* @returns a string with the data of `resource`, or `null` in case of error.
|
|
12145
|
+
* @returns a string with the data of `resource`, or `null` in case of error. If `length` is not `null`, the size of the data will be assigned to it.
|
|
12139
12146
|
* @throws GLib.Error
|
|
12140
12147
|
*/
|
|
12141
12148
|
get_data_finish(result: Gio.AsyncResult): Uint8Array;
|
|
@@ -12156,25 +12163,15 @@ export namespace WebKit2 {
|
|
|
12156
12163
|
* The active URI might change during
|
|
12157
12164
|
* a load operation:
|
|
12158
12165
|
*
|
|
12159
|
-
*
|
|
12160
|
-
*
|
|
12161
|
-
*
|
|
12162
|
-
*
|
|
12163
|
-
*
|
|
12164
|
-
*
|
|
12165
|
-
*
|
|
12166
|
-
*
|
|
12167
|
-
*
|
|
12168
|
-
* <listitem><para>
|
|
12169
|
-
* In case of a server redirection, {@link WebKit2.WebResource.SignalSignatures.sent_request | WebKit2.WebResource::sent-request} signal
|
|
12170
|
-
* is emitted again with a redirected response, the active URI is the URI the request
|
|
12171
|
-
* was redirected to.
|
|
12172
|
-
* </para></listitem>
|
|
12173
|
-
* <listitem><para>
|
|
12174
|
-
* When the response is received from the server, the active URI is the final
|
|
12175
|
-
* one and it will not change again.
|
|
12176
|
-
* </para></listitem>
|
|
12177
|
-
* </orderedlist>
|
|
12166
|
+
* 1. When the resource load starts, the active URI is the requested URI
|
|
12167
|
+
* 2. When the initial request is sent to the server, {@link WebKit2.WebResource.SignalSignatures.sent_request | WebKit2.WebResource::sent-request}
|
|
12168
|
+
* signal is emitted without a redirected response, the active URI is the URI of
|
|
12169
|
+
* the request sent to the server.
|
|
12170
|
+
* 3. In case of a server redirection, {@link WebKit2.WebResource.SignalSignatures.sent_request | WebKit2.WebResource::sent-request} signal
|
|
12171
|
+
* is emitted again with a redirected response, the active URI is the URI the request
|
|
12172
|
+
* was redirected to.
|
|
12173
|
+
* 4. When the response is received from the server, the active URI is the final
|
|
12174
|
+
* one and it will not change again.
|
|
12178
12175
|
*
|
|
12179
12176
|
* You can monitor the active URI by connecting to the notify::uri
|
|
12180
12177
|
* signal of `resource`.
|
|
@@ -12207,7 +12204,7 @@ export namespace WebKit2 {
|
|
|
12207
12204
|
authenticate: (request: AuthenticationRequest) => boolean | void;
|
|
12208
12205
|
/**
|
|
12209
12206
|
* Emitted when closing a {@link WebKit2.WebView} is requested. This occurs when a
|
|
12210
|
-
* call is made from JavaScript's
|
|
12207
|
+
* call is made from JavaScript's `window.close` function or
|
|
12211
12208
|
* after trying to close the `web_view` with `webkit_web_view_try_close()`.
|
|
12212
12209
|
* It is the owner's responsibility to handle this signal to hide or
|
|
12213
12210
|
* destroy the {@link WebKit2.WebView}, if necessary.
|
|
@@ -12219,36 +12216,27 @@ export namespace WebKit2 {
|
|
|
12219
12216
|
* Emitted when a context menu is about to be displayed to give the application
|
|
12220
12217
|
* a chance to customize the proposed menu, prevent the menu from being displayed,
|
|
12221
12218
|
* or build its own context menu.
|
|
12222
|
-
*
|
|
12223
|
-
*
|
|
12224
|
-
* To customize the proposed menu you can use `webkit_context_menu_prepend()`,
|
|
12219
|
+
*
|
|
12220
|
+
* - To customize the proposed menu you can use `webkit_context_menu_prepend()`,
|
|
12225
12221
|
* `webkit_context_menu_append()` or `webkit_context_menu_insert()` to add new
|
|
12226
|
-
* {@link WebKit2.ContextMenuItem}
|
|
12222
|
+
* {@link WebKit2.ContextMenuItem} objects to `context_menu`, `webkit_context_menu_move_item()`
|
|
12227
12223
|
* to reorder existing items, or `webkit_context_menu_remove()` to remove an
|
|
12228
12224
|
* existing item. The signal handler should return `false`, and the menu represented
|
|
12229
12225
|
* by `context_menu` will be shown.
|
|
12230
|
-
*
|
|
12231
|
-
* <listitem><para>
|
|
12232
|
-
* To prevent the menu from being displayed you can just connect to this signal
|
|
12226
|
+
* - To prevent the menu from being displayed you can just connect to this signal
|
|
12233
12227
|
* and return `true` so that the proposed menu will not be shown.
|
|
12234
|
-
*
|
|
12235
|
-
* <listitem><para>
|
|
12236
|
-
* To build your own menu, you can remove all items from the proposed menu with
|
|
12228
|
+
* - To build your own menu, you can remove all items from the proposed menu with
|
|
12237
12229
|
* `webkit_context_menu_remove_all()`, add your own items and return `false` so
|
|
12238
12230
|
* that the menu will be shown. You can also ignore the proposed {@link WebKit2.ContextMenu},
|
|
12239
12231
|
* build your own {@link Gtk.Menu} and return `true` to prevent the proposed menu from being shown.
|
|
12240
|
-
*
|
|
12241
|
-
*
|
|
12242
|
-
* If you just want the default menu to be shown always, simply don't connect to this
|
|
12243
|
-
* signal because showing the proposed context menu is the default behaviour.
|
|
12244
|
-
* </para></listitem>
|
|
12245
|
-
* </itemizedlist>
|
|
12232
|
+
* - If you just want the default menu to be shown always, simply don't connect to this
|
|
12233
|
+
* signal because showing the proposed context menu is the default behavior.
|
|
12246
12234
|
*
|
|
12247
12235
|
* The `event` parameter is now deprecated. Use `webkit_context_menu_get_event()` to get the
|
|
12248
12236
|
* {@link Gdk.Event} that triggered the context menu.
|
|
12249
12237
|
*
|
|
12250
12238
|
* If the signal handler returns `false` the context menu represented by `context_menu`
|
|
12251
|
-
* will be shown, if it
|
|
12239
|
+
* will be shown, if it returns `true` the context menu will not be shown.
|
|
12252
12240
|
*
|
|
12253
12241
|
* The proposed {@link WebKit2.ContextMenu} passed in `context_menu` argument is only valid
|
|
12254
12242
|
* during the signal emission.
|
|
@@ -12286,8 +12274,8 @@ export namespace WebKit2 {
|
|
|
12286
12274
|
/**
|
|
12287
12275
|
* This signal is emitted when WebKit is requesting the client to decide a policy
|
|
12288
12276
|
* decision, such as whether to navigate to a page, open a new window or whether or
|
|
12289
|
-
* not to download a resource. The {@link WebKit2.
|
|
12290
|
-
* `decision` argument is a generic type, but should be
|
|
12277
|
+
* not to download a resource. The {@link WebKit2.PolicyDecision} passed in the
|
|
12278
|
+
* `decision` argument is a generic type, but should be cast to a more
|
|
12291
12279
|
* specific type when making the decision. For example:
|
|
12292
12280
|
*
|
|
12293
12281
|
* ```c
|
|
@@ -12324,17 +12312,17 @@ export namespace WebKit2 {
|
|
|
12324
12312
|
* If the last reference is removed on a {@link WebKit2.PolicyDecision} and no decision has been
|
|
12325
12313
|
* made explicitly, `webkit_policy_decision_use()` will be the default policy decision. The
|
|
12326
12314
|
* default signal handler will simply call `webkit_policy_decision_use()`. Only the first
|
|
12327
|
-
* policy decision chosen for a given {@link WebKit2.PolicyDecision} will have any
|
|
12315
|
+
* policy decision chosen for a given {@link WebKit2.PolicyDecision} will have any effect.
|
|
12328
12316
|
* @signal
|
|
12329
12317
|
* @run-last
|
|
12330
12318
|
*/
|
|
12331
12319
|
"decide-policy": (decision: PolicyDecision, decision_type: PolicyDecisionType) => boolean | void;
|
|
12332
12320
|
/**
|
|
12333
12321
|
* Emitted when JavaScript code calls
|
|
12334
|
-
*
|
|
12322
|
+
* `element.webkitRequestFullScreen`. If the
|
|
12335
12323
|
* signal is not handled the {@link WebKit2.WebView} will proceed to full screen
|
|
12336
12324
|
* its top level window. This signal can be used by client code to
|
|
12337
|
-
* request permission to the user prior doing the full screen
|
|
12325
|
+
* request permission to the user prior to doing the full screen
|
|
12338
12326
|
* transition and eventually prepare the top-level window
|
|
12339
12327
|
* (e.g. hide some widgets that would otherwise be part of the
|
|
12340
12328
|
* full screen window).
|
|
@@ -12459,7 +12447,7 @@ export namespace WebKit2 {
|
|
|
12459
12447
|
* operations.
|
|
12460
12448
|
*
|
|
12461
12449
|
* A possible way to use this signal could be through a dialog
|
|
12462
|
-
* allowing the user decide what to do with the request:
|
|
12450
|
+
* allowing the user to decide what to do with the request:
|
|
12463
12451
|
*
|
|
12464
12452
|
* ```c
|
|
12465
12453
|
* static gboolean permission_request_cb (WebKitWebView *web_view,
|
|
@@ -12524,7 +12512,7 @@ export namespace WebKit2 {
|
|
|
12524
12512
|
*
|
|
12525
12513
|
* You can handle the query asynchronously by calling `webkit_permission_state_query_ref()` on
|
|
12526
12514
|
* `query` and returning `true`. If the last reference of `query` is removed and the query has not
|
|
12527
|
-
* been handled, the query result will be set to
|
|
12515
|
+
* been handled, the query result will be set to {@link WebKit2.PermissionState.PROMPT}.
|
|
12528
12516
|
* @signal
|
|
12529
12517
|
* @since 2.40
|
|
12530
12518
|
* @run-last
|
|
@@ -12553,7 +12541,7 @@ export namespace WebKit2 {
|
|
|
12553
12541
|
/**
|
|
12554
12542
|
* Emitted after {@link WebKit2.WebView.SignalSignatures.ready_to_show | WebKit2.WebView::ready-to-show} on the newly
|
|
12555
12543
|
* created {@link WebKit2.WebView} when JavaScript code calls
|
|
12556
|
-
*
|
|
12544
|
+
* `window.showModalDialog`. The purpose of
|
|
12557
12545
|
* this signal is to allow the client application to prepare the
|
|
12558
12546
|
* new view to behave as modal. Once the signal is emitted a new
|
|
12559
12547
|
* main loop will be run to block user interaction in the parent
|
|
@@ -12598,30 +12586,21 @@ export namespace WebKit2 {
|
|
|
12598
12586
|
*/
|
|
12599
12587
|
"run-file-chooser": (request: FileChooserRequest) => boolean | void;
|
|
12600
12588
|
/**
|
|
12601
|
-
* Emitted when JavaScript code calls
|
|
12602
|
-
*
|
|
12603
|
-
* or when
|
|
12589
|
+
* Emitted when JavaScript code calls `window.alert`,
|
|
12590
|
+
* `window.confirm` or `window.prompt`,
|
|
12591
|
+
* or when `onbeforeunload` event is fired.
|
|
12604
12592
|
* The `dialog` parameter should be used to build the dialog.
|
|
12605
12593
|
* If the signal is not handled a different dialog will be built and shown depending
|
|
12606
12594
|
* on the dialog type:
|
|
12607
|
-
*
|
|
12608
|
-
*
|
|
12609
|
-
*
|
|
12610
|
-
*
|
|
12611
|
-
*
|
|
12612
|
-
*
|
|
12613
|
-
* </para></listitem>
|
|
12614
|
-
* <listitem><para>
|
|
12615
|
-
* {@link WebKit2.ScriptDialogType.PROMPT}: message dialog with OK and Cancel buttons and
|
|
12616
|
-
* a text entry with the default text.
|
|
12617
|
-
* </para></listitem>
|
|
12618
|
-
* <listitem><para>
|
|
12619
|
-
* {@link WebKit2.ScriptDialogType.BEFORE_UNLOAD_CONFIRM}: message dialog with Stay and Leave buttons.
|
|
12620
|
-
* </para></listitem>
|
|
12621
|
-
* </itemizedlist>
|
|
12595
|
+
*
|
|
12596
|
+
* - {@link WebKit2.ScriptDialogType.ALERT}: message dialog with a single Close button.
|
|
12597
|
+
* - {@link WebKit2.ScriptDialogType.CONFIRM}: message dialog with OK and Cancel buttons.
|
|
12598
|
+
* - {@link WebKit2.ScriptDialogType.PROMPT}: message dialog with OK and Cancel buttons and
|
|
12599
|
+
* a text entry with the default text.
|
|
12600
|
+
* - {@link WebKit2.ScriptDialogType.BEFORE_UNLOAD_CONFIRM}: message dialog with Stay and Leave buttons.
|
|
12622
12601
|
*
|
|
12623
12602
|
* It is possible to handle the script dialog request asynchronously, by simply
|
|
12624
|
-
*
|
|
12603
|
+
* calling `webkit_script_dialog_ref()` on the `dialog` argument and calling
|
|
12625
12604
|
* `webkit_script_dialog_close()` when done.
|
|
12626
12605
|
* If the last reference is removed on a {@link WebKit2.ScriptDialog} and the dialog has not been
|
|
12627
12606
|
* closed, `webkit_script_dialog_close()` will be called.
|
|
@@ -12718,6 +12697,7 @@ export namespace WebKit2 {
|
|
|
12718
12697
|
"notify::is-muted": (pspec: GObject.ParamSpec) => void;
|
|
12719
12698
|
"notify::is-playing-audio": (pspec: GObject.ParamSpec) => void;
|
|
12720
12699
|
"notify::is-web-process-responsive": (pspec: GObject.ParamSpec) => void;
|
|
12700
|
+
"notify::magnification": (pspec: GObject.ParamSpec) => void;
|
|
12721
12701
|
"notify::microphone-capture-state": (pspec: GObject.ParamSpec) => void;
|
|
12722
12702
|
"notify::page-id": (pspec: GObject.ParamSpec) => void;
|
|
12723
12703
|
"notify::related-view": (pspec: GObject.ParamSpec) => void;
|
|
@@ -12802,6 +12782,7 @@ export namespace WebKit2 {
|
|
|
12802
12782
|
isPlayingAudio: boolean;
|
|
12803
12783
|
is_web_process_responsive: boolean;
|
|
12804
12784
|
isWebProcessResponsive: boolean;
|
|
12785
|
+
magnification: number;
|
|
12805
12786
|
microphone_capture_state: MediaCaptureState;
|
|
12806
12787
|
microphoneCaptureState: MediaCaptureState;
|
|
12807
12788
|
page_id: bigint | number;
|
|
@@ -12875,7 +12856,7 @@ export namespace WebKit2 {
|
|
|
12875
12856
|
* {@link WebKit2.MediaCaptureState.NONE} or {@link WebKit2.MediaCaptureState.MUTED}.
|
|
12876
12857
|
*
|
|
12877
12858
|
* If the capture state of the device is set to {@link WebKit2.MediaCaptureState.NONE} the web-page
|
|
12878
|
-
* can still re-request the permission to the user. Permission
|
|
12859
|
+
* can still re-request the permission to the user. Permission decision caching is left to the
|
|
12879
12860
|
* application.
|
|
12880
12861
|
* @since 2.34
|
|
12881
12862
|
* @default WebKit2.MediaCaptureState.NONE
|
|
@@ -12893,7 +12874,7 @@ export namespace WebKit2 {
|
|
|
12893
12874
|
* {@link WebKit2.MediaCaptureState.NONE} or {@link WebKit2.MediaCaptureState.MUTED}.
|
|
12894
12875
|
*
|
|
12895
12876
|
* If the capture state of the device is set to {@link WebKit2.MediaCaptureState.NONE} the web-page
|
|
12896
|
-
* can still re-request the permission to the user. Permission
|
|
12877
|
+
* can still re-request the permission to the user. Permission decision caching is left to the
|
|
12897
12878
|
* application.
|
|
12898
12879
|
* @since 2.34
|
|
12899
12880
|
* @default WebKit2.MediaCaptureState.NONE
|
|
@@ -12937,7 +12918,7 @@ export namespace WebKit2 {
|
|
|
12937
12918
|
|
|
12938
12919
|
/**
|
|
12939
12920
|
* Capture state of the display device. Whenever the user grants a media-request sent by the web
|
|
12940
|
-
* page, requesting screencasting capabilities (`navigator.mediaDevices.getDisplayMedia() this
|
|
12921
|
+
* page, requesting screencasting capabilities (`navigator.mediaDevices.getDisplayMedia()`) this
|
|
12941
12922
|
* property will be set to {@link WebKit2.MediaCaptureState.ACTIVE}.
|
|
12942
12923
|
*
|
|
12943
12924
|
* The application can monitor this property and provide a visual indicator allowing to
|
|
@@ -12945,7 +12926,7 @@ export namespace WebKit2 {
|
|
|
12945
12926
|
* {@link WebKit2.MediaCaptureState.NONE} or {@link WebKit2.MediaCaptureState.MUTED}.
|
|
12946
12927
|
*
|
|
12947
12928
|
* If the capture state of the device is set to {@link WebKit2.MediaCaptureState.NONE} the web-page
|
|
12948
|
-
* can still re-request the permission to the user. Permission
|
|
12929
|
+
* can still re-request the permission to the user. Permission decision caching is left to the
|
|
12949
12930
|
* application.
|
|
12950
12931
|
* @since 2.34
|
|
12951
12932
|
* @default WebKit2.MediaCaptureState.NONE
|
|
@@ -12955,7 +12936,7 @@ export namespace WebKit2 {
|
|
|
12955
12936
|
|
|
12956
12937
|
/**
|
|
12957
12938
|
* Capture state of the display device. Whenever the user grants a media-request sent by the web
|
|
12958
|
-
* page, requesting screencasting capabilities (`navigator.mediaDevices.getDisplayMedia() this
|
|
12939
|
+
* page, requesting screencasting capabilities (`navigator.mediaDevices.getDisplayMedia()`) this
|
|
12959
12940
|
* property will be set to {@link WebKit2.MediaCaptureState.ACTIVE}.
|
|
12960
12941
|
*
|
|
12961
12942
|
* The application can monitor this property and provide a visual indicator allowing to
|
|
@@ -12963,7 +12944,7 @@ export namespace WebKit2 {
|
|
|
12963
12944
|
* {@link WebKit2.MediaCaptureState.NONE} or {@link WebKit2.MediaCaptureState.MUTED}.
|
|
12964
12945
|
*
|
|
12965
12946
|
* If the capture state of the device is set to {@link WebKit2.MediaCaptureState.NONE} the web-page
|
|
12966
|
-
* can still re-request the permission to the user. Permission
|
|
12947
|
+
* can still re-request the permission to the user. Permission decision caching is left to the
|
|
12967
12948
|
* application.
|
|
12968
12949
|
* @since 2.34
|
|
12969
12950
|
* @default WebKit2.MediaCaptureState.NONE
|
|
@@ -13007,7 +12988,7 @@ export namespace WebKit2 {
|
|
|
13007
12988
|
get estimatedLoadProgress(): number;
|
|
13008
12989
|
|
|
13009
12990
|
/**
|
|
13010
|
-
* The favicon currently associated
|
|
12991
|
+
* The favicon currently associated with the {@link WebKit2.WebView}.
|
|
13011
12992
|
* See `webkit_web_view_get_favicon()` for more details.
|
|
13012
12993
|
* @read-only
|
|
13013
12994
|
*/
|
|
@@ -13054,10 +13035,10 @@ export namespace WebKit2 {
|
|
|
13054
13035
|
* This is a {@link GObject.ParamFlags.CONSTRUCT_ONLY} property, so you have to create an ephemeral
|
|
13055
13036
|
* {@link WebKit2.WebView} and it can't be changed. The ephemeral {@link WebKit2.WebsiteDataManager}
|
|
13056
13037
|
* created for the {@link WebKit2.WebView} will inherit the network settings from the
|
|
13057
|
-
* {@link WebKit2.WebContext}
|
|
13038
|
+
* {@link WebKit2.WebContext}'s {@link WebKit2.WebsiteDataManager}. To use different settings
|
|
13058
13039
|
* you can get the {@link WebKit2.WebsiteDataManager} with `webkit_web_view_get_website_data_manager()`
|
|
13059
13040
|
* and set the new ones.
|
|
13060
|
-
* Note that all {@link WebKit2.WebView}
|
|
13041
|
+
* Note that all {@link WebKit2.WebView} objects created with an ephemeral {@link WebKit2.WebContext}
|
|
13061
13042
|
* will be ephemeral automatically.
|
|
13062
13043
|
* See also `webkit_web_context_new_ephemeral()`.
|
|
13063
13044
|
* @since 2.16
|
|
@@ -13073,10 +13054,10 @@ export namespace WebKit2 {
|
|
|
13073
13054
|
* This is a {@link GObject.ParamFlags.CONSTRUCT_ONLY} property, so you have to create an ephemeral
|
|
13074
13055
|
* {@link WebKit2.WebView} and it can't be changed. The ephemeral {@link WebKit2.WebsiteDataManager}
|
|
13075
13056
|
* created for the {@link WebKit2.WebView} will inherit the network settings from the
|
|
13076
|
-
* {@link WebKit2.WebContext}
|
|
13057
|
+
* {@link WebKit2.WebContext}'s {@link WebKit2.WebsiteDataManager}. To use different settings
|
|
13077
13058
|
* you can get the {@link WebKit2.WebsiteDataManager} with `webkit_web_view_get_website_data_manager()`
|
|
13078
13059
|
* and set the new ones.
|
|
13079
|
-
* Note that all {@link WebKit2.WebView}
|
|
13060
|
+
* Note that all {@link WebKit2.WebView} objects created with an ephemeral {@link WebKit2.WebContext}
|
|
13080
13061
|
* will be ephemeral automatically.
|
|
13081
13062
|
* See also `webkit_web_context_new_ephemeral()`.
|
|
13082
13063
|
* @since 2.16
|
|
@@ -13166,7 +13147,7 @@ export namespace WebKit2 {
|
|
|
13166
13147
|
get isPlayingAudio(): boolean;
|
|
13167
13148
|
|
|
13168
13149
|
/**
|
|
13169
|
-
* Whether the web process currently associated
|
|
13150
|
+
* Whether the web process currently associated with the {@link WebKit2.WebView} is responsive.
|
|
13170
13151
|
* @since 2.34
|
|
13171
13152
|
* @read-only
|
|
13172
13153
|
* @default true
|
|
@@ -13174,13 +13155,26 @@ export namespace WebKit2 {
|
|
|
13174
13155
|
get is_web_process_responsive(): boolean;
|
|
13175
13156
|
|
|
13176
13157
|
/**
|
|
13177
|
-
* Whether the web process currently associated
|
|
13158
|
+
* Whether the web process currently associated with the {@link WebKit2.WebView} is responsive.
|
|
13178
13159
|
* @since 2.34
|
|
13179
13160
|
* @read-only
|
|
13180
13161
|
* @default true
|
|
13181
13162
|
*/
|
|
13182
13163
|
get isWebProcessResponsive(): boolean;
|
|
13183
13164
|
|
|
13165
|
+
/**
|
|
13166
|
+
* The magnification factor of the {@link WebKit2.WebView} content.
|
|
13167
|
+
*
|
|
13168
|
+
* The magnification factor represents the visual scaling of the page (similar
|
|
13169
|
+
* to pinch-to-zoom). This is independent of the layout zoom level. Setting
|
|
13170
|
+
* the magnification factor scales the rendered page visually without affecting
|
|
13171
|
+
* page layout or text wrapping.
|
|
13172
|
+
* @since 2.54
|
|
13173
|
+
* @default 1
|
|
13174
|
+
*/
|
|
13175
|
+
get magnification(): number;
|
|
13176
|
+
set magnification(val: number);
|
|
13177
|
+
|
|
13184
13178
|
/**
|
|
13185
13179
|
* Capture state of the microphone device. Whenever the user grants a media-request sent by the web
|
|
13186
13180
|
* page, requesting audio capture capabilities (`navigator.mediaDevices.getUserMedia({audio:
|
|
@@ -13191,7 +13185,7 @@ export namespace WebKit2 {
|
|
|
13191
13185
|
* {@link WebKit2.MediaCaptureState.NONE} or {@link WebKit2.MediaCaptureState.MUTED}.
|
|
13192
13186
|
*
|
|
13193
13187
|
* If the capture state of the device is set to {@link WebKit2.MediaCaptureState.NONE} the web-page
|
|
13194
|
-
* can still re-request the permission to the user. Permission
|
|
13188
|
+
* can still re-request the permission to the user. Permission decision caching is left to the
|
|
13195
13189
|
* application.
|
|
13196
13190
|
* @since 2.34
|
|
13197
13191
|
* @default WebKit2.MediaCaptureState.NONE
|
|
@@ -13209,7 +13203,7 @@ export namespace WebKit2 {
|
|
|
13209
13203
|
* {@link WebKit2.MediaCaptureState.NONE} or {@link WebKit2.MediaCaptureState.MUTED}.
|
|
13210
13204
|
*
|
|
13211
13205
|
* If the capture state of the device is set to {@link WebKit2.MediaCaptureState.NONE} the web-page
|
|
13212
|
-
* can still re-request the permission to the user. Permission
|
|
13206
|
+
* can still re-request the permission to the user. Permission decision caching is left to the
|
|
13213
13207
|
* application.
|
|
13214
13208
|
* @since 2.34
|
|
13215
13209
|
* @default WebKit2.MediaCaptureState.NONE
|
|
@@ -13578,7 +13572,7 @@ export namespace WebKit2 {
|
|
|
13578
13572
|
* Asynchronously call `body` with `arguments` in the script world with name `world_name` of the main frame current context in `web_view`.
|
|
13579
13573
|
* The `arguments` values must be one of the following types, or contain only the following GVariant types: number, string and dictionary.
|
|
13580
13574
|
* The result of the operation can be a Promise that will be properly passed to the callback.
|
|
13581
|
-
* If `world_name` is `null`, the default world is used. Any value that is not `null` is a
|
|
13575
|
+
* If `world_name` is `null`, the default world is used. Any value that is not `null` is a distinct world.
|
|
13582
13576
|
* The `source_uri` will be shown in exceptions and doesn't affect the behavior of the script.
|
|
13583
13577
|
* When not provided, the document URL is used.
|
|
13584
13578
|
*
|
|
@@ -13609,13 +13603,12 @@ export namespace WebKit2 {
|
|
|
13609
13603
|
* }
|
|
13610
13604
|
*
|
|
13611
13605
|
* if (jsc_value_is_number (value)) {
|
|
13612
|
-
* gint32 int_value =
|
|
13606
|
+
* gint32 int_value = jsc_value_to_int32 (value);
|
|
13613
13607
|
* JSCException *exception = jsc_context_get_exception (jsc_value_get_context (value));
|
|
13614
13608
|
* if (exception)
|
|
13615
13609
|
* g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
|
|
13616
13610
|
* else
|
|
13617
13611
|
* g_print ("Script result: %d\n", int_value);
|
|
13618
|
-
* g_free (str_value);
|
|
13619
13612
|
* } else {
|
|
13620
13613
|
* g_warning ("Error running javascript: unexpected return value");
|
|
13621
13614
|
* }
|
|
@@ -13630,7 +13623,7 @@ export namespace WebKit2 {
|
|
|
13630
13623
|
* g_variant_dict_insert (&dict, "count", "u", 42);
|
|
13631
13624
|
* GVariant *args = g_variant_dict_end (&dict);
|
|
13632
13625
|
* const gchar *body = "return new Promise((resolve) => { resolve(count); });";
|
|
13633
|
-
* webkit_web_view_call_async_javascript_function (web_view, body, -1,
|
|
13626
|
+
* webkit_web_view_call_async_javascript_function (web_view, body, -1, args, NULL, NULL, NULL, web_view_javascript_finished, NULL);
|
|
13634
13627
|
* }
|
|
13635
13628
|
* ```
|
|
13636
13629
|
* @param body the function body
|
|
@@ -13647,7 +13640,7 @@ export namespace WebKit2 {
|
|
|
13647
13640
|
* Asynchronously call `body` with `arguments` in the script world with name `world_name` of the main frame current context in `web_view`.
|
|
13648
13641
|
* The `arguments` values must be one of the following types, or contain only the following GVariant types: number, string and dictionary.
|
|
13649
13642
|
* The result of the operation can be a Promise that will be properly passed to the callback.
|
|
13650
|
-
* If `world_name` is `null`, the default world is used. Any value that is not `null` is a
|
|
13643
|
+
* If `world_name` is `null`, the default world is used. Any value that is not `null` is a distinct world.
|
|
13651
13644
|
* The `source_uri` will be shown in exceptions and doesn't affect the behavior of the script.
|
|
13652
13645
|
* When not provided, the document URL is used.
|
|
13653
13646
|
*
|
|
@@ -13678,13 +13671,12 @@ export namespace WebKit2 {
|
|
|
13678
13671
|
* }
|
|
13679
13672
|
*
|
|
13680
13673
|
* if (jsc_value_is_number (value)) {
|
|
13681
|
-
* gint32 int_value =
|
|
13674
|
+
* gint32 int_value = jsc_value_to_int32 (value);
|
|
13682
13675
|
* JSCException *exception = jsc_context_get_exception (jsc_value_get_context (value));
|
|
13683
13676
|
* if (exception)
|
|
13684
13677
|
* g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
|
|
13685
13678
|
* else
|
|
13686
13679
|
* g_print ("Script result: %d\n", int_value);
|
|
13687
|
-
* g_free (str_value);
|
|
13688
13680
|
* } else {
|
|
13689
13681
|
* g_warning ("Error running javascript: unexpected return value");
|
|
13690
13682
|
* }
|
|
@@ -13699,7 +13691,7 @@ export namespace WebKit2 {
|
|
|
13699
13691
|
* g_variant_dict_insert (&dict, "count", "u", 42);
|
|
13700
13692
|
* GVariant *args = g_variant_dict_end (&dict);
|
|
13701
13693
|
* const gchar *body = "return new Promise((resolve) => { resolve(count); });";
|
|
13702
|
-
* webkit_web_view_call_async_javascript_function (web_view, body, -1,
|
|
13694
|
+
* webkit_web_view_call_async_javascript_function (web_view, body, -1, args, NULL, NULL, NULL, web_view_javascript_finished, NULL);
|
|
13703
13695
|
* }
|
|
13704
13696
|
* ```
|
|
13705
13697
|
* @param body the function body
|
|
@@ -13717,7 +13709,7 @@ export namespace WebKit2 {
|
|
|
13717
13709
|
* Asynchronously call `body` with `arguments` in the script world with name `world_name` of the main frame current context in `web_view`.
|
|
13718
13710
|
* The `arguments` values must be one of the following types, or contain only the following GVariant types: number, string and dictionary.
|
|
13719
13711
|
* The result of the operation can be a Promise that will be properly passed to the callback.
|
|
13720
|
-
* If `world_name` is `null`, the default world is used. Any value that is not `null` is a
|
|
13712
|
+
* If `world_name` is `null`, the default world is used. Any value that is not `null` is a distinct world.
|
|
13721
13713
|
* The `source_uri` will be shown in exceptions and doesn't affect the behavior of the script.
|
|
13722
13714
|
* When not provided, the document URL is used.
|
|
13723
13715
|
*
|
|
@@ -13748,13 +13740,12 @@ export namespace WebKit2 {
|
|
|
13748
13740
|
* }
|
|
13749
13741
|
*
|
|
13750
13742
|
* if (jsc_value_is_number (value)) {
|
|
13751
|
-
* gint32 int_value =
|
|
13743
|
+
* gint32 int_value = jsc_value_to_int32 (value);
|
|
13752
13744
|
* JSCException *exception = jsc_context_get_exception (jsc_value_get_context (value));
|
|
13753
13745
|
* if (exception)
|
|
13754
13746
|
* g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
|
|
13755
13747
|
* else
|
|
13756
13748
|
* g_print ("Script result: %d\n", int_value);
|
|
13757
|
-
* g_free (str_value);
|
|
13758
13749
|
* } else {
|
|
13759
13750
|
* g_warning ("Error running javascript: unexpected return value");
|
|
13760
13751
|
* }
|
|
@@ -13769,7 +13760,7 @@ export namespace WebKit2 {
|
|
|
13769
13760
|
* g_variant_dict_insert (&dict, "count", "u", 42);
|
|
13770
13761
|
* GVariant *args = g_variant_dict_end (&dict);
|
|
13771
13762
|
* const gchar *body = "return new Promise((resolve) => { resolve(count); });";
|
|
13772
|
-
* webkit_web_view_call_async_javascript_function (web_view, body, -1,
|
|
13763
|
+
* webkit_web_view_call_async_javascript_function (web_view, body, -1, args, NULL, NULL, NULL, web_view_javascript_finished, NULL);
|
|
13773
13764
|
* }
|
|
13774
13765
|
* ```
|
|
13775
13766
|
* @param body the function body
|
|
@@ -14109,7 +14100,7 @@ export namespace WebKit2 {
|
|
|
14109
14100
|
|
|
14110
14101
|
/**
|
|
14111
14102
|
* Get the camera capture state of a {@link WebKit2.WebView}.
|
|
14112
|
-
* @returns The {@link WebKit2.MediaCaptureState} of the camera device. If {@link WebKit2.Settings.
|
|
14103
|
+
* @returns The {@link WebKit2.MediaCaptureState} of the camera device. If {@link WebKit2.Settings.enable_media_stream} is `false`, this method will return {@link WebKit2.MediaCaptureState.NONE}.
|
|
14113
14104
|
* @since 2.34
|
|
14114
14105
|
*/
|
|
14115
14106
|
get_camera_capture_state(): MediaCaptureState;
|
|
@@ -14135,7 +14126,7 @@ export namespace WebKit2 {
|
|
|
14135
14126
|
|
|
14136
14127
|
/**
|
|
14137
14128
|
* Get the display capture state of a {@link WebKit2.WebView}.
|
|
14138
|
-
* @returns The {@link WebKit2.MediaCaptureState} of the display device. If {@link WebKit2.Settings.
|
|
14129
|
+
* @returns The {@link WebKit2.MediaCaptureState} of the display device. If {@link WebKit2.Settings.enable_media_stream} is `false`, this method will return {@link WebKit2.MediaCaptureState.NONE}.
|
|
14139
14130
|
* @since 2.34
|
|
14140
14131
|
*/
|
|
14141
14132
|
get_display_capture_state(): MediaCaptureState;
|
|
@@ -14152,14 +14143,14 @@ export namespace WebKit2 {
|
|
|
14152
14143
|
*
|
|
14153
14144
|
* You can monitor the estimated progress of a load operation by
|
|
14154
14145
|
* connecting to the notify::estimated-load-progress signal of `web_view`.
|
|
14155
|
-
* @returns an estimate of the
|
|
14146
|
+
* @returns an estimate of the percent complete for a document load as a range from 0.0 to 1.0.
|
|
14156
14147
|
*/
|
|
14157
14148
|
get_estimated_load_progress(): number;
|
|
14158
14149
|
|
|
14159
14150
|
/**
|
|
14160
|
-
* Returns favicon currently associated
|
|
14151
|
+
* Returns favicon currently associated with `web_view`.
|
|
14161
14152
|
*
|
|
14162
|
-
* Returns favicon currently associated
|
|
14153
|
+
* Returns favicon currently associated with `web_view`, if any. You can
|
|
14163
14154
|
* connect to notify::favicon signal of `web_view` to be notified when
|
|
14164
14155
|
* the favicon is available.
|
|
14165
14156
|
* @returns the favicon image or `null` if there's no icon associated with `web_view`.
|
|
@@ -14171,7 +14162,7 @@ export namespace WebKit2 {
|
|
|
14171
14162
|
*
|
|
14172
14163
|
* Gets the {@link WebKit2.FindController} that will allow the caller to query
|
|
14173
14164
|
* the {@link WebKit2.WebView} for the text to look for.
|
|
14174
|
-
* @returns the {@link WebKit2.FindController} associated
|
|
14165
|
+
* @returns the {@link WebKit2.FindController} associated with this particular {@link WebKit2.WebView}.
|
|
14175
14166
|
*/
|
|
14176
14167
|
get_find_controller(): FindController;
|
|
14177
14168
|
|
|
@@ -14185,14 +14176,14 @@ export namespace WebKit2 {
|
|
|
14185
14176
|
get_input_method_context(): InputMethodContext | null;
|
|
14186
14177
|
|
|
14187
14178
|
/**
|
|
14188
|
-
* Get the {@link WebKit2.WebInspector} associated
|
|
14179
|
+
* Get the {@link WebKit2.WebInspector} associated with `web_view`
|
|
14189
14180
|
* @returns the {@link WebKit2.WebInspector} of `web_view`
|
|
14190
14181
|
*/
|
|
14191
14182
|
get_inspector(): WebInspector;
|
|
14192
14183
|
|
|
14193
14184
|
/**
|
|
14194
14185
|
* Gets the mute state of `web_view`.
|
|
14195
|
-
* @returns `true` if `web_view` audio is muted or `false`
|
|
14186
|
+
* @returns `true` if `web_view` audio is muted or `false` if audio is not muted.
|
|
14196
14187
|
* @since 2.30
|
|
14197
14188
|
*/
|
|
14198
14189
|
get_is_muted(): boolean;
|
|
@@ -14204,6 +14195,17 @@ export namespace WebKit2 {
|
|
|
14204
14195
|
*/
|
|
14205
14196
|
get_is_web_process_responsive(): boolean;
|
|
14206
14197
|
|
|
14198
|
+
/**
|
|
14199
|
+
* Get the magnification factor of `web_view`.
|
|
14200
|
+
*
|
|
14201
|
+
* The magnification factor represents the visual scaling of the page (similar
|
|
14202
|
+
* to pinch-to-zoom). This is independent of the layout zoom level (which is
|
|
14203
|
+
* obtained with `webkit_web_view_get_zoom_level()`).
|
|
14204
|
+
* @returns the current magnification factor of `web_view`
|
|
14205
|
+
* @since 2.54
|
|
14206
|
+
*/
|
|
14207
|
+
get_magnification(): number;
|
|
14208
|
+
|
|
14207
14209
|
/**
|
|
14208
14210
|
* Return the main resource of `web_view`.
|
|
14209
14211
|
* @returns the main {@link WebKit2.WebResource} of the view or `null` if nothing has been loaded.
|
|
@@ -14212,7 +14214,7 @@ export namespace WebKit2 {
|
|
|
14212
14214
|
|
|
14213
14215
|
/**
|
|
14214
14216
|
* Get the microphone capture state of a {@link WebKit2.WebView}.
|
|
14215
|
-
* @returns The {@link WebKit2.MediaCaptureState} of the microphone device. If {@link WebKit2.Settings.
|
|
14217
|
+
* @returns The {@link WebKit2.MediaCaptureState} of the microphone device. If {@link WebKit2.Settings.enable_media_stream} is `false`, this method will return {@link WebKit2.MediaCaptureState.NONE}.
|
|
14216
14218
|
* @since 2.34
|
|
14217
14219
|
*/
|
|
14218
14220
|
get_microphone_capture_state(): MediaCaptureState;
|
|
@@ -14243,9 +14245,9 @@ export namespace WebKit2 {
|
|
|
14243
14245
|
* the desired preferences, and then replace the existing `web_view`
|
|
14244
14246
|
* settings with `webkit_web_view_set_settings()` or get the existing
|
|
14245
14247
|
* `web_view` settings and update it directly. {@link WebKit2.Settings} objects
|
|
14246
|
-
* can be shared by multiple {@link WebKit2.WebView}
|
|
14248
|
+
* can be shared by multiple {@link WebKit2.WebView} objects, so modifying
|
|
14247
14249
|
* the settings of a {@link WebKit2.WebView} would affect other
|
|
14248
|
-
* {@link WebKit2.WebView}
|
|
14250
|
+
* {@link WebKit2.WebView} objects using the same {@link WebKit2.Settings}.
|
|
14249
14251
|
* @returns the {@link WebKit2.Settings} attached to `web_view`
|
|
14250
14252
|
*/
|
|
14251
14253
|
get_settings(): Settings;
|
|
@@ -14354,50 +14356,30 @@ export namespace WebKit2 {
|
|
|
14354
14356
|
* The active URI might change during
|
|
14355
14357
|
* a load operation:
|
|
14356
14358
|
*
|
|
14357
|
-
*
|
|
14358
|
-
*
|
|
14359
|
-
*
|
|
14360
|
-
*
|
|
14361
|
-
*
|
|
14362
|
-
*
|
|
14363
|
-
*
|
|
14364
|
-
*
|
|
14365
|
-
*
|
|
14366
|
-
*
|
|
14367
|
-
*
|
|
14368
|
-
*
|
|
14369
|
-
*
|
|
14370
|
-
*
|
|
14371
|
-
*
|
|
14372
|
-
*
|
|
14373
|
-
*
|
|
14374
|
-
*
|
|
14375
|
-
*
|
|
14376
|
-
*
|
|
14377
|
-
*
|
|
14378
|
-
*
|
|
14379
|
-
*
|
|
14380
|
-
*
|
|
14381
|
-
* <listitem><para>
|
|
14382
|
-
* If the load operation was started by
|
|
14383
|
-
* `webkit_web_view_go_to_back_forward_list_item()`, the requested URI
|
|
14384
|
-
* is the opriginal URI of the given {@link WebKit2.BackForwardListItem}.
|
|
14385
|
-
* </para></listitem>
|
|
14386
|
-
* </itemizedlist>
|
|
14387
|
-
* </para></listitem>
|
|
14388
|
-
* <listitem><para>
|
|
14389
|
-
* If there is a server redirection during the load operation,
|
|
14390
|
-
* the active URI is the redirected URI. When the signal
|
|
14391
|
-
* {@link WebKit2.WebView.SignalSignatures.load_changed | WebKit2.WebView::load-changed} is emitted with {@link WebKit2.LoadEvent.REDIRECTED}
|
|
14392
|
-
* event, the active URI is already updated to the redirected URI.
|
|
14393
|
-
* </para></listitem>
|
|
14394
|
-
* <listitem><para>
|
|
14395
|
-
* When the signal {@link WebKit2.WebView.SignalSignatures.load_changed | WebKit2.WebView::load-changed} is emitted
|
|
14396
|
-
* with {@link WebKit2.LoadEvent.COMMITTED} event, the active URI is the final
|
|
14397
|
-
* one and it will not change unless a new load operation is started
|
|
14398
|
-
* or a navigation action within the same page is performed.
|
|
14399
|
-
* </para></listitem>
|
|
14400
|
-
* </orderedlist>
|
|
14359
|
+
* 1. When nothing has been loaded yet on `web_view` the active URI is `null`.
|
|
14360
|
+
* 2. When a new load operation starts the active URI is the requested URI:
|
|
14361
|
+
*
|
|
14362
|
+
* - If the load operation was started by `webkit_web_view_load_uri()`,
|
|
14363
|
+
* the requested URI is the given one.
|
|
14364
|
+
* - If the load operation was started by `webkit_web_view_load_html()`,
|
|
14365
|
+
* the requested URI is "about:blank".
|
|
14366
|
+
* - If the load operation was started by `webkit_web_view_load_alternate_html()`,
|
|
14367
|
+
* the requested URI is content URI provided.
|
|
14368
|
+
* - If the load operation was started by `webkit_web_view_go_back()` or
|
|
14369
|
+
* `webkit_web_view_go_forward()`, the requested URI is the original URI
|
|
14370
|
+
* of the previous/next item in the {@link WebKit2.BackForwardList} of `web_view`.
|
|
14371
|
+
* - If the load operation was started by
|
|
14372
|
+
* `webkit_web_view_go_to_back_forward_list_item()`, the requested URI
|
|
14373
|
+
* is the original URI of the given {@link WebKit2.BackForwardListItem}.
|
|
14374
|
+
*
|
|
14375
|
+
* 3. If there is a server redirection during the load operation,
|
|
14376
|
+
* the active URI is the redirected URI. When the signal
|
|
14377
|
+
* {@link WebKit2.WebView.SignalSignatures.load_changed | WebKit2.WebView::load-changed} is emitted with {@link WebKit2.LoadEvent.REDIRECTED}
|
|
14378
|
+
* event, the active URI is already updated to the redirected URI.
|
|
14379
|
+
* 4. When the signal {@link WebKit2.WebView.SignalSignatures.load_changed | WebKit2.WebView::load-changed} is emitted
|
|
14380
|
+
* with {@link WebKit2.LoadEvent.COMMITTED} event, the active URI is the final
|
|
14381
|
+
* one and it will not change unless a new load operation is started
|
|
14382
|
+
* or a navigation action within the same page is performed.
|
|
14401
14383
|
*
|
|
14402
14384
|
* You can monitor the active URI by connecting to the notify::uri
|
|
14403
14385
|
* signal of `web_view`.
|
|
@@ -14406,7 +14388,7 @@ export namespace WebKit2 {
|
|
|
14406
14388
|
get_uri(): string;
|
|
14407
14389
|
|
|
14408
14390
|
/**
|
|
14409
|
-
* Gets the user content manager associated
|
|
14391
|
+
* Gets the user content manager associated with `web_view`.
|
|
14410
14392
|
* @returns the {@link WebKit2.UserContentManager} associated with the view
|
|
14411
14393
|
* @since 2.6
|
|
14412
14394
|
*/
|
|
@@ -14420,7 +14402,7 @@ export namespace WebKit2 {
|
|
|
14420
14402
|
get_web_extension_mode(): WebExtensionMode;
|
|
14421
14403
|
|
|
14422
14404
|
/**
|
|
14423
|
-
* Get the {@link WebKit2.WebsiteDataManager} associated
|
|
14405
|
+
* Get the {@link WebKit2.WebsiteDataManager} associated with `web_view`.
|
|
14424
14406
|
*
|
|
14425
14407
|
* If `web_view` is not ephemeral,
|
|
14426
14408
|
* the returned {@link WebKit2.WebsiteDataManager} will be the same as the {@link WebKit2.WebsiteDataManager}
|
|
@@ -14453,7 +14435,7 @@ export namespace WebKit2 {
|
|
|
14453
14435
|
get_window_properties(): WindowProperties;
|
|
14454
14436
|
|
|
14455
14437
|
/**
|
|
14456
|
-
*
|
|
14438
|
+
* Get the zoom level of `web_view`.
|
|
14457
14439
|
*
|
|
14458
14440
|
* Get the zoom level of `web_view`, i.e. the factor by which the
|
|
14459
14441
|
* view contents are scaled with respect to their original size.
|
|
@@ -14577,7 +14559,7 @@ export namespace WebKit2 {
|
|
|
14577
14559
|
*
|
|
14578
14560
|
* You can monitor the load operation by connecting to
|
|
14579
14561
|
* {@link WebKit2.WebView.SignalSignatures.load_changed | WebKit2.WebView::load-changed} signal.
|
|
14580
|
-
* @param uri
|
|
14562
|
+
* @param uri a URI string
|
|
14581
14563
|
*/
|
|
14582
14564
|
load_uri(uri: string): void;
|
|
14583
14565
|
|
|
@@ -14623,7 +14605,7 @@ export namespace WebKit2 {
|
|
|
14623
14605
|
* JSCValue *value;
|
|
14624
14606
|
* GError *error = NULL;
|
|
14625
14607
|
*
|
|
14626
|
-
* js_result =
|
|
14608
|
+
* js_result = webkit_web_view_run_javascript_in_world_finish (WEBKIT_WEB_VIEW (object), result, &error);
|
|
14627
14609
|
* if (!js_result) {
|
|
14628
14610
|
* g_warning ("Error running javascript: %s", error->message);
|
|
14629
14611
|
* g_error_free (error);
|
|
@@ -14632,13 +14614,12 @@ export namespace WebKit2 {
|
|
|
14632
14614
|
*
|
|
14633
14615
|
* value = webkit_javascript_result_get_js_value (js_result);
|
|
14634
14616
|
* if (jsc_value_is_number (value)) {
|
|
14635
|
-
* gint32 int_value =
|
|
14617
|
+
* gint32 int_value = jsc_value_to_int32 (value);
|
|
14636
14618
|
* JSCException *exception = jsc_context_get_exception (jsc_value_get_context (value));
|
|
14637
14619
|
* if (exception)
|
|
14638
14620
|
* g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
|
|
14639
14621
|
* else
|
|
14640
14622
|
* g_print ("Script result: %d\n", int_value);
|
|
14641
|
-
* g_free (str_value);
|
|
14642
14623
|
* } else {
|
|
14643
14624
|
* g_warning ("Error running javascript: unexpected return value");
|
|
14644
14625
|
* }
|
|
@@ -14653,7 +14634,7 @@ export namespace WebKit2 {
|
|
|
14653
14634
|
* g_variant_dict_insert (&dict, "count", "u", 42);
|
|
14654
14635
|
* GVariant *args = g_variant_dict_end (&dict);
|
|
14655
14636
|
* const gchar *body = "return new Promise((resolve) => { resolve(count); });";
|
|
14656
|
-
* webkit_web_view_run_async_javascript_function_in_world (web_view, body,
|
|
14637
|
+
* webkit_web_view_run_async_javascript_function_in_world (web_view, body, args, NULL, NULL, web_view_javascript_finished, NULL);
|
|
14657
14638
|
* }
|
|
14658
14639
|
* ```
|
|
14659
14640
|
* @param body the JavaScript function body
|
|
@@ -14813,7 +14794,7 @@ export namespace WebKit2 {
|
|
|
14813
14794
|
*
|
|
14814
14795
|
* Check `webkit_web_view_run_javascript_finish()` for a usage example.
|
|
14815
14796
|
* @param result a {@link Gio.AsyncResult}
|
|
14816
|
-
* @returns a {@link WebKit2.JavascriptResult} with the result of the last executed statement in
|
|
14797
|
+
* @returns a {@link WebKit2.JavascriptResult} with the result of the last executed statement in the script or `null` in case of error
|
|
14817
14798
|
* @deprecated since 2.40: Use `webkit_web_view_evaluate_javascript_finish()` instead.
|
|
14818
14799
|
* @throws GLib.Error
|
|
14819
14800
|
*/
|
|
@@ -14874,7 +14855,7 @@ export namespace WebKit2 {
|
|
|
14874
14855
|
* @param result a {@link Gio.AsyncResult}
|
|
14875
14856
|
* @returns a {@link WebKit2.JavascriptResult} with the result of the last executed statement in `script` or `null` in case of error
|
|
14876
14857
|
* @since 2.22
|
|
14877
|
-
* @deprecated since 2.40: Use `
|
|
14858
|
+
* @deprecated since 2.40: Use `webkit_web_view_evaluate_javascript_finish()` instead.
|
|
14878
14859
|
* @throws GLib.Error
|
|
14879
14860
|
*/
|
|
14880
14861
|
run_javascript_in_world_finish(result: Gio.AsyncResult): JavascriptResult;
|
|
@@ -14882,7 +14863,7 @@ export namespace WebKit2 {
|
|
|
14882
14863
|
/**
|
|
14883
14864
|
* Asynchronously save the current web page.
|
|
14884
14865
|
*
|
|
14885
|
-
* Asynchronously save the current web page associated
|
|
14866
|
+
* Asynchronously save the current web page associated with the
|
|
14886
14867
|
* {@link WebKit2.WebView} into a self-contained format using the mode
|
|
14887
14868
|
* specified in `save_mode`.
|
|
14888
14869
|
*
|
|
@@ -14897,7 +14878,7 @@ export namespace WebKit2 {
|
|
|
14897
14878
|
/**
|
|
14898
14879
|
* Asynchronously save the current web page.
|
|
14899
14880
|
*
|
|
14900
|
-
* Asynchronously save the current web page associated
|
|
14881
|
+
* Asynchronously save the current web page associated with the
|
|
14901
14882
|
* {@link WebKit2.WebView} into a self-contained format using the mode
|
|
14902
14883
|
* specified in `save_mode`.
|
|
14903
14884
|
*
|
|
@@ -14913,7 +14894,7 @@ export namespace WebKit2 {
|
|
|
14913
14894
|
/**
|
|
14914
14895
|
* Asynchronously save the current web page.
|
|
14915
14896
|
*
|
|
14916
|
-
* Asynchronously save the current web page associated
|
|
14897
|
+
* Asynchronously save the current web page associated with the
|
|
14917
14898
|
* {@link WebKit2.WebView} into a self-contained format using the mode
|
|
14918
14899
|
* specified in `save_mode`.
|
|
14919
14900
|
*
|
|
@@ -14937,7 +14918,7 @@ export namespace WebKit2 {
|
|
|
14937
14918
|
/**
|
|
14938
14919
|
* Asynchronously save the current web page.
|
|
14939
14920
|
*
|
|
14940
|
-
* Asynchronously save the current web page associated
|
|
14921
|
+
* Asynchronously save the current web page associated with the
|
|
14941
14922
|
* {@link WebKit2.WebView} into a self-contained format using the mode
|
|
14942
14923
|
* specified in `save_mode` and writing it to `file`.
|
|
14943
14924
|
*
|
|
@@ -14953,7 +14934,7 @@ export namespace WebKit2 {
|
|
|
14953
14934
|
/**
|
|
14954
14935
|
* Asynchronously save the current web page.
|
|
14955
14936
|
*
|
|
14956
|
-
* Asynchronously save the current web page associated
|
|
14937
|
+
* Asynchronously save the current web page associated with the
|
|
14957
14938
|
* {@link WebKit2.WebView} into a self-contained format using the mode
|
|
14958
14939
|
* specified in `save_mode` and writing it to `file`.
|
|
14959
14940
|
*
|
|
@@ -14970,7 +14951,7 @@ export namespace WebKit2 {
|
|
|
14970
14951
|
/**
|
|
14971
14952
|
* Asynchronously save the current web page.
|
|
14972
14953
|
*
|
|
14973
|
-
* Asynchronously save the current web page associated
|
|
14954
|
+
* Asynchronously save the current web page associated with the
|
|
14974
14955
|
* {@link WebKit2.WebView} into a self-contained format using the mode
|
|
14975
14956
|
* specified in `save_mode` and writing it to `file`.
|
|
14976
14957
|
*
|
|
@@ -15014,7 +14995,7 @@ export namespace WebKit2 {
|
|
|
15014
14995
|
* `webkit_web_view_send_message_to_page_finish()` to get the message reply.
|
|
15015
14996
|
* @param message a {@link WebKit2.UserMessage}
|
|
15016
14997
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
15017
|
-
* @param callback
|
|
14998
|
+
* @param callback A {@link Gio.AsyncReadyCallback} to call when the request is satisfied or `null`
|
|
15018
14999
|
* @since 2.28
|
|
15019
15000
|
*/
|
|
15020
15001
|
send_message_to_page(message: UserMessage, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
|
|
@@ -15028,7 +15009,7 @@ export namespace WebKit2 {
|
|
|
15028
15009
|
* `webkit_web_view_send_message_to_page_finish()` to get the message reply.
|
|
15029
15010
|
* @param message a {@link WebKit2.UserMessage}
|
|
15030
15011
|
* @param cancellable a {@link Gio.Cancellable} or `null` to ignore
|
|
15031
|
-
* @param callback
|
|
15012
|
+
* @param callback A {@link Gio.AsyncReadyCallback} to call when the request is satisfied or `null`
|
|
15032
15013
|
* @since 2.28
|
|
15033
15014
|
*/
|
|
15034
15015
|
send_message_to_page(message: UserMessage, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<UserMessage> | void;
|
|
@@ -15049,8 +15030,8 @@ export namespace WebKit2 {
|
|
|
15049
15030
|
* the actual contents are rendered. Note that if the web page loaded in `web_view`
|
|
15050
15031
|
* specifies a background color, it will take precedence over the `rgba` color.
|
|
15051
15032
|
* By default the `web_view` background color is opaque white.
|
|
15052
|
-
* Note that the parent window must have
|
|
15053
|
-
* {@link Gtk.Widget.app_paintable} property set to `true` for
|
|
15033
|
+
* Note that the parent window must have an RGBA visual and
|
|
15034
|
+
* {@link Gtk.Widget.app_paintable} property set to `true` for background colors to work.
|
|
15054
15035
|
*
|
|
15055
15036
|
* ```c
|
|
15056
15037
|
* static void browser_window_set_background_color (BrowserWindow *window,
|
|
@@ -15078,7 +15059,7 @@ export namespace WebKit2 {
|
|
|
15078
15059
|
/**
|
|
15079
15060
|
* Set the camera capture state of a {@link WebKit2.WebView}.
|
|
15080
15061
|
*
|
|
15081
|
-
* If {@link WebKit2.Settings.
|
|
15062
|
+
* If {@link WebKit2.Settings.enable_media_stream} is `false`, this method will have no visible effect. Once the
|
|
15082
15063
|
* state of the device has been set to {@link WebKit2.MediaCaptureState.NONE} it cannot be changed
|
|
15083
15064
|
* anymore. The page can however request capture again using the mediaDevices API.
|
|
15084
15065
|
* @param state a {@link WebKit2.MediaCaptureState}
|
|
@@ -15122,7 +15103,7 @@ export namespace WebKit2 {
|
|
|
15122
15103
|
/**
|
|
15123
15104
|
* Set the display capture state of a {@link WebKit2.WebView}.
|
|
15124
15105
|
*
|
|
15125
|
-
* If {@link WebKit2.Settings.
|
|
15106
|
+
* If {@link WebKit2.Settings.enable_media_stream} is `false`, this method will have no visible effect. Once the
|
|
15126
15107
|
* state of the device has been set to {@link WebKit2.MediaCaptureState.NONE} it cannot be changed
|
|
15127
15108
|
* anymore. The page can however request capture again using the mediaDevices API.
|
|
15128
15109
|
* @param state a {@link WebKit2.MediaCaptureState}
|
|
@@ -15138,7 +15119,7 @@ export namespace WebKit2 {
|
|
|
15138
15119
|
* CONTENTEDITABLE attribute has been set on the element or one of its parent
|
|
15139
15120
|
* elements. By default a {@link WebKit2.WebView} is not editable.
|
|
15140
15121
|
*
|
|
15141
|
-
* Normally,
|
|
15122
|
+
* Normally, an HTML document is not editable unless the elements within the
|
|
15142
15123
|
* document are editable. This function provides a way to make the contents
|
|
15143
15124
|
* of a {@link WebKit2.WebView} editable without altering the document or DOM structure.
|
|
15144
15125
|
* @param editable a `gboolean` indicating the editable state
|
|
@@ -15163,10 +15144,23 @@ export namespace WebKit2 {
|
|
|
15163
15144
|
*/
|
|
15164
15145
|
set_is_muted(muted: boolean): void;
|
|
15165
15146
|
|
|
15147
|
+
/**
|
|
15148
|
+
* Set the magnification factor of `web_view`.
|
|
15149
|
+
*
|
|
15150
|
+
* The magnification factor represents the visual scaling of the page (similar
|
|
15151
|
+
* to pinch-to-zoom). This is independent of the layout zoom level (which is
|
|
15152
|
+
* set with `webkit_web_view_set_zoom_level()`). Setting the magnification factor
|
|
15153
|
+
* scales the rendered page visually around the center of the view without
|
|
15154
|
+
* affecting page layout or text wrapping.
|
|
15155
|
+
* @param magnification the magnification factor
|
|
15156
|
+
* @since 2.54
|
|
15157
|
+
*/
|
|
15158
|
+
set_magnification(magnification: number): void;
|
|
15159
|
+
|
|
15166
15160
|
/**
|
|
15167
15161
|
* Set the microphone capture state of a {@link WebKit2.WebView}.
|
|
15168
15162
|
*
|
|
15169
|
-
* If {@link WebKit2.Settings.
|
|
15163
|
+
* If {@link WebKit2.Settings.enable_media_stream} is `false`, this method will have no visible effect. Once the
|
|
15170
15164
|
* state of the device has been set to {@link WebKit2.MediaCaptureState.NONE} it cannot be changed
|
|
15171
15165
|
* anymore. The page can however request capture again using the mediaDevices API.
|
|
15172
15166
|
* @param state a {@link WebKit2.MediaCaptureState}
|
|
@@ -15181,7 +15175,7 @@ export namespace WebKit2 {
|
|
|
15181
15175
|
* existing {@link WebKit2.Settings} of `web_view` will be replaced by
|
|
15182
15176
|
* `settings`. New settings are applied immediately on `web_view`.
|
|
15183
15177
|
* The same {@link WebKit2.Settings} object can be shared
|
|
15184
|
-
* by multiple {@link WebKit2.WebView}
|
|
15178
|
+
* by multiple {@link WebKit2.WebView} objects.
|
|
15185
15179
|
* @param settings a {@link WebKit2.Settings}
|
|
15186
15180
|
*/
|
|
15187
15181
|
set_settings(settings: Settings): void;
|
|
@@ -15206,7 +15200,7 @@ export namespace WebKit2 {
|
|
|
15206
15200
|
stop_loading(): void;
|
|
15207
15201
|
|
|
15208
15202
|
/**
|
|
15209
|
-
* Terminates the web process associated
|
|
15203
|
+
* Terminates the web process associated with `web_view`.
|
|
15210
15204
|
*
|
|
15211
15205
|
* When the web process gets terminated
|
|
15212
15206
|
* using this method, the {@link WebKit2.WebView.SignalSignatures.web_process_terminated | WebKit2.WebView::web-process-terminated} signal is emitted with
|
|
@@ -15323,7 +15317,7 @@ export namespace WebKit2 {
|
|
|
15323
15317
|
* A permission request for accessing website data from third-party domains.
|
|
15324
15318
|
*
|
|
15325
15319
|
* WebKitWebsiteDataAccessPermissionRequest represents a request for
|
|
15326
|
-
* permission to allow a third-party domain access its cookies.
|
|
15320
|
+
* permission to allow a third-party domain to access its cookies.
|
|
15327
15321
|
*
|
|
15328
15322
|
* When a WebKitWebsiteDataAccessPermissionRequest is not handled by the user,
|
|
15329
15323
|
* it is denied by default.
|
|
@@ -15453,7 +15447,7 @@ export namespace WebKit2 {
|
|
|
15453
15447
|
*
|
|
15454
15448
|
* You can use WebKitWebsiteDataManager to configure the local directories
|
|
15455
15449
|
* where website data will be stored. Use {@link WebKit2.WebsiteDataManager.base_data_directory}
|
|
15456
|
-
* and {@link WebKit2.WebsiteDataManager.base_cache_directory} set a common base directory for all
|
|
15450
|
+
* and {@link WebKit2.WebsiteDataManager.base_cache_directory} to set a common base directory for all
|
|
15457
15451
|
* website data and caches.
|
|
15458
15452
|
*
|
|
15459
15453
|
* A WebKitWebsiteDataManager can be ephemeral, in which case all the directory configuration
|
|
@@ -15505,7 +15499,7 @@ export namespace WebKit2 {
|
|
|
15505
15499
|
/**
|
|
15506
15500
|
* The directory where HTTP disk cache will be stored.
|
|
15507
15501
|
* @since 2.10
|
|
15508
|
-
* @deprecated since 2.40
|
|
15502
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15509
15503
|
* @construct-only
|
|
15510
15504
|
* @default null
|
|
15511
15505
|
*/
|
|
@@ -15514,7 +15508,7 @@ export namespace WebKit2 {
|
|
|
15514
15508
|
/**
|
|
15515
15509
|
* The directory where HTTP disk cache will be stored.
|
|
15516
15510
|
* @since 2.10
|
|
15517
|
-
* @deprecated since 2.40
|
|
15511
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15518
15512
|
* @construct-only
|
|
15519
15513
|
* @default null
|
|
15520
15514
|
*/
|
|
@@ -15523,7 +15517,7 @@ export namespace WebKit2 {
|
|
|
15523
15517
|
/**
|
|
15524
15518
|
* The directory where DOM cache will be stored.
|
|
15525
15519
|
* @since 2.30
|
|
15526
|
-
* @deprecated since 2.40
|
|
15520
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15527
15521
|
* @construct-only
|
|
15528
15522
|
* @default null
|
|
15529
15523
|
*/
|
|
@@ -15532,7 +15526,7 @@ export namespace WebKit2 {
|
|
|
15532
15526
|
/**
|
|
15533
15527
|
* The directory where DOM cache will be stored.
|
|
15534
15528
|
* @since 2.30
|
|
15535
|
-
* @deprecated since 2.40
|
|
15529
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15536
15530
|
* @construct-only
|
|
15537
15531
|
* @default null
|
|
15538
15532
|
*/
|
|
@@ -15541,7 +15535,7 @@ export namespace WebKit2 {
|
|
|
15541
15535
|
/**
|
|
15542
15536
|
* The directory where the HTTP Strict-Transport-Security (HSTS) cache will be stored.
|
|
15543
15537
|
* @since 2.26
|
|
15544
|
-
* @deprecated since 2.40
|
|
15538
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15545
15539
|
* @construct-only
|
|
15546
15540
|
* @default null
|
|
15547
15541
|
*/
|
|
@@ -15550,7 +15544,7 @@ export namespace WebKit2 {
|
|
|
15550
15544
|
/**
|
|
15551
15545
|
* The directory where the HTTP Strict-Transport-Security (HSTS) cache will be stored.
|
|
15552
15546
|
* @since 2.26
|
|
15553
|
-
* @deprecated since 2.40
|
|
15547
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15554
15548
|
* @construct-only
|
|
15555
15549
|
* @default null
|
|
15556
15550
|
*/
|
|
@@ -15559,7 +15553,7 @@ export namespace WebKit2 {
|
|
|
15559
15553
|
/**
|
|
15560
15554
|
* The directory where IndexedDB databases will be stored.
|
|
15561
15555
|
* @since 2.10
|
|
15562
|
-
* @deprecated since 2.40
|
|
15556
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15563
15557
|
* @construct-only
|
|
15564
15558
|
* @default null
|
|
15565
15559
|
*/
|
|
@@ -15568,7 +15562,7 @@ export namespace WebKit2 {
|
|
|
15568
15562
|
/**
|
|
15569
15563
|
* The directory where IndexedDB databases will be stored.
|
|
15570
15564
|
* @since 2.10
|
|
15571
|
-
* @deprecated since 2.40
|
|
15565
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15572
15566
|
* @construct-only
|
|
15573
15567
|
* @default null
|
|
15574
15568
|
*/
|
|
@@ -15599,7 +15593,7 @@ export namespace WebKit2 {
|
|
|
15599
15593
|
/**
|
|
15600
15594
|
* The directory where Intelligent Tracking Prevention (ITP) data will be stored.
|
|
15601
15595
|
* @since 2.30
|
|
15602
|
-
* @deprecated since 2.40
|
|
15596
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15603
15597
|
* @construct-only
|
|
15604
15598
|
* @default null
|
|
15605
15599
|
*/
|
|
@@ -15608,7 +15602,7 @@ export namespace WebKit2 {
|
|
|
15608
15602
|
/**
|
|
15609
15603
|
* The directory where Intelligent Tracking Prevention (ITP) data will be stored.
|
|
15610
15604
|
* @since 2.30
|
|
15611
|
-
* @deprecated since 2.40
|
|
15605
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15612
15606
|
* @construct-only
|
|
15613
15607
|
* @default null
|
|
15614
15608
|
*/
|
|
@@ -15617,7 +15611,7 @@ export namespace WebKit2 {
|
|
|
15617
15611
|
/**
|
|
15618
15612
|
* The directory where local storage data will be stored.
|
|
15619
15613
|
* @since 2.10
|
|
15620
|
-
* @deprecated since 2.40
|
|
15614
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15621
15615
|
* @construct-only
|
|
15622
15616
|
* @default null
|
|
15623
15617
|
*/
|
|
@@ -15626,7 +15620,7 @@ export namespace WebKit2 {
|
|
|
15626
15620
|
/**
|
|
15627
15621
|
* The directory where local storage data will be stored.
|
|
15628
15622
|
* @since 2.10
|
|
15629
|
-
* @deprecated since 2.40
|
|
15623
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15630
15624
|
* @construct-only
|
|
15631
15625
|
* @default null
|
|
15632
15626
|
*/
|
|
@@ -15635,7 +15629,7 @@ export namespace WebKit2 {
|
|
|
15635
15629
|
/**
|
|
15636
15630
|
* The directory where offline web application cache will be stored.
|
|
15637
15631
|
* @since 2.10
|
|
15638
|
-
* @deprecated since 2.40
|
|
15632
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15639
15633
|
* @construct-only
|
|
15640
15634
|
* @default null
|
|
15641
15635
|
*/
|
|
@@ -15644,7 +15638,7 @@ export namespace WebKit2 {
|
|
|
15644
15638
|
/**
|
|
15645
15639
|
* The directory where offline web application cache will be stored.
|
|
15646
15640
|
* @since 2.10
|
|
15647
|
-
* @deprecated since 2.40
|
|
15641
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-cache-directory instead.
|
|
15648
15642
|
* @construct-only
|
|
15649
15643
|
* @default null
|
|
15650
15644
|
*/
|
|
@@ -15673,18 +15667,18 @@ export namespace WebKit2 {
|
|
|
15673
15667
|
set originStorageRatio(val: number);
|
|
15674
15668
|
|
|
15675
15669
|
/**
|
|
15676
|
-
* The directory where service
|
|
15670
|
+
* The directory where service worker registrations will be stored.
|
|
15677
15671
|
* @since 2.30
|
|
15678
|
-
* @deprecated since 2.40
|
|
15672
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15679
15673
|
* @construct-only
|
|
15680
15674
|
* @default null
|
|
15681
15675
|
*/
|
|
15682
15676
|
get service_worker_registrations_directory(): string | null;
|
|
15683
15677
|
|
|
15684
15678
|
/**
|
|
15685
|
-
* The directory where service
|
|
15679
|
+
* The directory where service worker registrations will be stored.
|
|
15686
15680
|
* @since 2.30
|
|
15687
|
-
* @deprecated since 2.40
|
|
15681
|
+
* @deprecated since 2.40: Use WebKitWebsiteDataManager:base-data-directory instead.
|
|
15688
15682
|
* @construct-only
|
|
15689
15683
|
* @default null
|
|
15690
15684
|
*/
|
|
@@ -15715,7 +15709,7 @@ export namespace WebKit2 {
|
|
|
15715
15709
|
/**
|
|
15716
15710
|
* The directory where WebSQL databases will be stored.
|
|
15717
15711
|
* @since 2.10
|
|
15718
|
-
* @deprecated since 2.24
|
|
15712
|
+
* @deprecated since 2.24: WebSQL is no longer supported. Use IndexedDB instead.
|
|
15719
15713
|
* @construct-only
|
|
15720
15714
|
* @default null
|
|
15721
15715
|
*/
|
|
@@ -15724,7 +15718,7 @@ export namespace WebKit2 {
|
|
|
15724
15718
|
/**
|
|
15725
15719
|
* The directory where WebSQL databases will be stored.
|
|
15726
15720
|
* @since 2.10
|
|
15727
|
-
* @deprecated since 2.24
|
|
15721
|
+
* @deprecated since 2.24: WebSQL is no longer supported. Use IndexedDB instead.
|
|
15728
15722
|
* @construct-only
|
|
15729
15723
|
* @default null
|
|
15730
15724
|
*/
|
|
@@ -15880,7 +15874,7 @@ export namespace WebKit2 {
|
|
|
15880
15874
|
/**
|
|
15881
15875
|
* Finish an asynchronous operation started with `webkit_website_data_manager_fetch()`.
|
|
15882
15876
|
* @param result a {@link Gio.AsyncResult}
|
|
15883
|
-
* @returns a {@link GLib.List} of {@link WebKit2.WebsiteData}. You must free the {@link GLib.List} with `g_list_free()` and unref the {@link WebKit2.WebsiteData}
|
|
15877
|
+
* @returns a {@link GLib.List} of {@link WebKit2.WebsiteData}. You must free the {@link GLib.List} with `g_list_free()` and unref the {@link WebKit2.WebsiteData} objects with `webkit_website_data_unref()` when you're done with them.
|
|
15884
15878
|
* @since 2.16
|
|
15885
15879
|
* @throws GLib.Error
|
|
15886
15880
|
*/
|
|
@@ -15911,7 +15905,7 @@ export namespace WebKit2 {
|
|
|
15911
15905
|
* Get the {@link WebKit2.WebsiteDataManager.disk_cache_directory} property.
|
|
15912
15906
|
* @returns the directory where HTTP disk cache is stored or `null` if `manager` is ephemeral.
|
|
15913
15907
|
* @since 2.10
|
|
15914
|
-
* @deprecated since 2.40:
|
|
15908
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_cache_directory()` instead.
|
|
15915
15909
|
*/
|
|
15916
15910
|
get_disk_cache_directory(): string | null;
|
|
15917
15911
|
|
|
@@ -15919,15 +15913,29 @@ export namespace WebKit2 {
|
|
|
15919
15913
|
* Get the {@link WebKit2.WebsiteDataManager.dom_cache_directory} property.
|
|
15920
15914
|
* @returns the directory where DOM cache is stored or `null` if `manager` is ephemeral.
|
|
15921
15915
|
* @since 2.30
|
|
15922
|
-
* @deprecated since 2.40:
|
|
15916
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_cache_directory()` instead.
|
|
15923
15917
|
*/
|
|
15924
15918
|
get_dom_cache_directory(): string | null;
|
|
15925
15919
|
|
|
15920
|
+
/**
|
|
15921
|
+
* Get the {@link WebKit2.FaviconDatabase} of `manager`.
|
|
15922
|
+
* @returns a {@link WebKit2.FaviconDatabase}, or `null` if website icons are disabled
|
|
15923
|
+
* @since 2.40
|
|
15924
|
+
*/
|
|
15925
|
+
get_favicon_database(): FaviconDatabase | null;
|
|
15926
|
+
|
|
15927
|
+
/**
|
|
15928
|
+
* Get whether website icons are enabled.
|
|
15929
|
+
* @returns `true` if website icons are enabled, or `false` otherwise.
|
|
15930
|
+
* @since 2.40
|
|
15931
|
+
*/
|
|
15932
|
+
get_favicons_enabled(): boolean;
|
|
15933
|
+
|
|
15926
15934
|
/**
|
|
15927
15935
|
* Get the {@link WebKit2.WebsiteDataManager.hsts_cache_directory} property.
|
|
15928
15936
|
* @returns the directory where the HSTS cache is stored or `null` if `manager` is ephemeral.
|
|
15929
15937
|
* @since 2.26
|
|
15930
|
-
* @deprecated since 2.40:
|
|
15938
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_cache_directory()` instead.
|
|
15931
15939
|
*/
|
|
15932
15940
|
get_hsts_cache_directory(): string | null;
|
|
15933
15941
|
|
|
@@ -15935,7 +15943,7 @@ export namespace WebKit2 {
|
|
|
15935
15943
|
* Get the {@link WebKit2.WebsiteDataManager.indexeddb_directory} property.
|
|
15936
15944
|
* @returns the directory where IndexedDB databases are stored or `null` if `manager` is ephemeral.
|
|
15937
15945
|
* @since 2.10
|
|
15938
|
-
* @deprecated since 2.40:
|
|
15946
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_data_directory()` instead.
|
|
15939
15947
|
*/
|
|
15940
15948
|
get_indexeddb_directory(): string | null;
|
|
15941
15949
|
|
|
@@ -15943,7 +15951,7 @@ export namespace WebKit2 {
|
|
|
15943
15951
|
* Get the {@link WebKit2.WebsiteDataManager.itp_directory} property.
|
|
15944
15952
|
* @returns the directory where Intelligent Tracking Prevention data is stored or `null` if `manager` is ephemeral.
|
|
15945
15953
|
* @since 2.30
|
|
15946
|
-
* @deprecated since 2.40:
|
|
15954
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_data_directory()` instead.
|
|
15947
15955
|
*/
|
|
15948
15956
|
get_itp_directory(): string | null;
|
|
15949
15957
|
|
|
@@ -15998,7 +16006,7 @@ export namespace WebKit2 {
|
|
|
15998
16006
|
/**
|
|
15999
16007
|
* Finish an asynchronous operation started with `webkit_website_data_manager_get_itp_summary()`.
|
|
16000
16008
|
* @param result a {@link Gio.AsyncResult}
|
|
16001
|
-
* @returns a {@link GLib.List} of {@link WebKit2.ITPThirdParty}. You must free the {@link GLib.List} with `g_list_free()` and unref the {@link WebKit2.ITPThirdParty}
|
|
16009
|
+
* @returns a {@link GLib.List} of {@link WebKit2.ITPThirdParty}. You must free the {@link GLib.List} with `g_list_free()` and unref the {@link WebKit2.ITPThirdParty} objects with `webkit_itp_third_party_unref()` when you're done with them.
|
|
16002
16010
|
* @since 2.30
|
|
16003
16011
|
* @throws GLib.Error
|
|
16004
16012
|
*/
|
|
@@ -16008,7 +16016,7 @@ export namespace WebKit2 {
|
|
|
16008
16016
|
* Get the {@link WebKit2.WebsiteDataManager.local_storage_directory} property.
|
|
16009
16017
|
* @returns the directory where local storage data is stored or `null` if `manager` is ephemeral.
|
|
16010
16018
|
* @since 2.10
|
|
16011
|
-
* @deprecated since 2.40:
|
|
16019
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_data_directory()` instead.
|
|
16012
16020
|
*/
|
|
16013
16021
|
get_local_storage_directory(): string | null;
|
|
16014
16022
|
|
|
@@ -16016,7 +16024,7 @@ export namespace WebKit2 {
|
|
|
16016
16024
|
* Get the {@link WebKit2.WebsiteDataManager.offline_application_cache_directory} property.
|
|
16017
16025
|
* @returns the directory where offline web application cache is stored or `null` if `manager` is ephemeral.
|
|
16018
16026
|
* @since 2.10
|
|
16019
|
-
* @deprecated since 2.40:
|
|
16027
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_cache_directory()` instead.
|
|
16020
16028
|
*/
|
|
16021
16029
|
get_offline_application_cache_directory(): string | null;
|
|
16022
16030
|
|
|
@@ -16033,7 +16041,7 @@ export namespace WebKit2 {
|
|
|
16033
16041
|
* Get the {@link WebKit2.WebsiteDataManager.service_worker_registrations_directory} property.
|
|
16034
16042
|
* @returns the directory where service worker registrations are stored or `null` if `manager` is ephemeral.
|
|
16035
16043
|
* @since 2.30
|
|
16036
|
-
* @deprecated since 2.40:
|
|
16044
|
+
* @deprecated since 2.40: Use `webkit_website_data_manager_get_base_data_directory()` instead.
|
|
16037
16045
|
*/
|
|
16038
16046
|
get_service_worker_registrations_directory(): string | null;
|
|
16039
16047
|
|
|
@@ -16048,7 +16056,7 @@ export namespace WebKit2 {
|
|
|
16048
16056
|
* Get the {@link WebKit2.WebsiteDataManager.websql_directory} property.
|
|
16049
16057
|
* @returns the directory where WebSQL databases are stored or `null` if `manager` is ephemeral.
|
|
16050
16058
|
* @since 2.10
|
|
16051
|
-
* @deprecated since 2.24
|
|
16059
|
+
* @deprecated since 2.24: WebSQL is no longer supported. Use IndexedDB instead.
|
|
16052
16060
|
*/
|
|
16053
16061
|
get_websql_directory(): string | null;
|
|
16054
16062
|
|
|
@@ -16108,6 +16116,17 @@ export namespace WebKit2 {
|
|
|
16108
16116
|
*/
|
|
16109
16117
|
remove_finish(result: Gio.AsyncResult): boolean;
|
|
16110
16118
|
|
|
16119
|
+
/**
|
|
16120
|
+
* Set whether website icons are enabled. Website icons are disabled by default.
|
|
16121
|
+
* When website icons are disabled, the {@link WebKit2.FaviconDatabase} of `manager` is closed and
|
|
16122
|
+
* its reference removed, so `webkit_website_data_manager_get_favicon_database()` will
|
|
16123
|
+
* return `null`. If website icons are enabled again, a new {@link WebKit2.FaviconDatabase} will
|
|
16124
|
+
* be created.
|
|
16125
|
+
* @param enabled value to set
|
|
16126
|
+
* @since 2.40
|
|
16127
|
+
*/
|
|
16128
|
+
set_favicons_enabled(enabled: boolean): void;
|
|
16129
|
+
|
|
16111
16130
|
/**
|
|
16112
16131
|
* Enable or disable Intelligent Tracking Prevention (ITP).
|
|
16113
16132
|
*
|
|
@@ -16140,7 +16159,7 @@ export namespace WebKit2 {
|
|
|
16140
16159
|
* Enable or disable persistent credential storage.
|
|
16141
16160
|
*
|
|
16142
16161
|
* When enabled, which is the default for
|
|
16143
|
-
* non-ephemeral sessions, the network process will try to read and write HTTP
|
|
16162
|
+
* non-ephemeral sessions, the network process will try to read and write HTTP authentication
|
|
16144
16163
|
* credentials from persistent storage.
|
|
16145
16164
|
* @param enabled value to set
|
|
16146
16165
|
* @since 2.30
|
|
@@ -16160,11 +16179,14 @@ export namespace WebKit2 {
|
|
|
16160
16179
|
// Signal signatures
|
|
16161
16180
|
interface SignalSignatures extends GObject.Object.SignalSignatures {
|
|
16162
16181
|
"notify::autoplay": (pspec: GObject.ParamSpec) => void;
|
|
16182
|
+
"notify::custom-user-agent": (pspec: GObject.ParamSpec) => void;
|
|
16163
16183
|
}
|
|
16164
16184
|
|
|
16165
16185
|
// Constructor properties interface
|
|
16166
16186
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
|
16167
16187
|
autoplay: AutoplayPolicy;
|
|
16188
|
+
custom_user_agent: string | null;
|
|
16189
|
+
customUserAgent: string | null;
|
|
16168
16190
|
}
|
|
16169
16191
|
}
|
|
16170
16192
|
|
|
@@ -16172,7 +16194,7 @@ export namespace WebKit2 {
|
|
|
16172
16194
|
* View specific website policies.
|
|
16173
16195
|
*
|
|
16174
16196
|
* WebKitWebsitePolicies allows you to configure per-page policies,
|
|
16175
|
-
* currently only autoplay policies are supported.
|
|
16197
|
+
* currently only autoplay and custom user agent policies are supported.
|
|
16176
16198
|
* @gir-type Class
|
|
16177
16199
|
* @since 2.30
|
|
16178
16200
|
*/
|
|
@@ -16188,6 +16210,24 @@ export namespace WebKit2 {
|
|
|
16188
16210
|
*/
|
|
16189
16211
|
get autoplay(): AutoplayPolicy;
|
|
16190
16212
|
|
|
16213
|
+
/**
|
|
16214
|
+
* The custom user agent string to send for navigations governed by these
|
|
16215
|
+
* {@link WebKit2.WebsitePolicies}, or `null` to use the default user agent.
|
|
16216
|
+
* @since 2.54
|
|
16217
|
+
* @construct-only
|
|
16218
|
+
* @default null
|
|
16219
|
+
*/
|
|
16220
|
+
get custom_user_agent(): string | null;
|
|
16221
|
+
|
|
16222
|
+
/**
|
|
16223
|
+
* The custom user agent string to send for navigations governed by these
|
|
16224
|
+
* {@link WebKit2.WebsitePolicies}, or `null` to use the default user agent.
|
|
16225
|
+
* @since 2.54
|
|
16226
|
+
* @construct-only
|
|
16227
|
+
* @default null
|
|
16228
|
+
*/
|
|
16229
|
+
get customUserAgent(): string | null;
|
|
16230
|
+
|
|
16191
16231
|
/**
|
|
16192
16232
|
* Compile-time signal type information.
|
|
16193
16233
|
*
|
|
@@ -16221,6 +16261,13 @@ export namespace WebKit2 {
|
|
|
16221
16261
|
* @since 2.30
|
|
16222
16262
|
*/
|
|
16223
16263
|
get_autoplay_policy(): AutoplayPolicy;
|
|
16264
|
+
|
|
16265
|
+
/**
|
|
16266
|
+
* Get the {@link WebKit2.WebsitePolicies.custom_user_agent} property.
|
|
16267
|
+
* @returns the custom user agent string, or `null` if the default user agent is used
|
|
16268
|
+
* @since 2.54
|
|
16269
|
+
*/
|
|
16270
|
+
get_custom_user_agent(): string | null;
|
|
16224
16271
|
}
|
|
16225
16272
|
|
|
16226
16273
|
|
|
@@ -16956,14 +17003,14 @@ export namespace WebKit2 {
|
|
|
16956
17003
|
* for details): {@link Feature.get_status}.
|
|
16957
17004
|
* - A category, which may be used to group features together:
|
|
16958
17005
|
* {@link Feature.get_category}.
|
|
16959
|
-
* - An optional short “name” which can be presented to
|
|
17006
|
+
* - An optional short “name” which can be presented to a user:
|
|
16960
17007
|
* {@link Feature.get_name}.
|
|
16961
17008
|
* - An optional longer “detailed” description:
|
|
16962
17009
|
* {@link Feature.get_details}.
|
|
16963
17010
|
*
|
|
16964
17011
|
* The lists of available features can be obtained with
|
|
16965
17012
|
* {@link Settings.get_all_features}, {@link Settings.get_experimental_features},
|
|
16966
|
-
* and {@link Settings.get_development_features}
|
|
17013
|
+
* and {@link Settings.get_development_features}. As a rule of thumb,
|
|
16967
17014
|
* applications which may want to allow users (i.e. web developers) to test
|
|
16968
17015
|
* WebKit features should use the list of experimental features. Additionally,
|
|
16969
17016
|
* applications might want to expose development features *when targeting
|
|
@@ -17013,7 +17060,7 @@ export namespace WebKit2 {
|
|
|
17013
17060
|
* The returned string is suitable to be displayed to end users, but it
|
|
17014
17061
|
* should not be relied upon being localized.
|
|
17015
17062
|
*
|
|
17016
|
-
* Note that some *features may not* have a detailed description, and `
|
|
17063
|
+
* Note that some *features may not* have a detailed description, and `null`
|
|
17017
17064
|
* is returned in this case.
|
|
17018
17065
|
* @returns Feature description.
|
|
17019
17066
|
* @since 2.42
|
|
@@ -17033,7 +17080,7 @@ export namespace WebKit2 {
|
|
|
17033
17080
|
* The returned string is suitable to be displayed to end users, but it
|
|
17034
17081
|
* should not be relied upon being localized.
|
|
17035
17082
|
*
|
|
17036
|
-
* Note that some *features may not* have a short name, and `
|
|
17083
|
+
* Note that some *features may not* have a short name, and `null`
|
|
17037
17084
|
* is returned in this case.
|
|
17038
17085
|
* @returns Short feature name.
|
|
17039
17086
|
* @since 2.42
|
|
@@ -17059,7 +17106,7 @@ export namespace WebKit2 {
|
|
|
17059
17106
|
/**
|
|
17060
17107
|
* Atomically releases a reference on the given `feature`.
|
|
17061
17108
|
*
|
|
17062
|
-
* If the reference was the last, the resources associated
|
|
17109
|
+
* If the reference was the last, the resources associated with the
|
|
17063
17110
|
* `feature` are freed. This function is MT-safe and may be called from
|
|
17064
17111
|
* any thread.
|
|
17065
17112
|
* @since 2.42
|
|
@@ -17076,7 +17123,7 @@ export namespace WebKit2 {
|
|
|
17076
17123
|
*
|
|
17077
17124
|
* ```c
|
|
17078
17125
|
* g_autoptr(WebKitFeatureList) list = `webkit_settings_get_experimental_features()`;
|
|
17079
|
-
* for (gsize i = 0; i < webkit_feature_list_get_length(list)
|
|
17126
|
+
* for (gsize i = 0; i < webkit_feature_list_get_length(list); i++) {
|
|
17080
17127
|
* WebKitFeature *feature = webkit_feature_list_get(list, i);
|
|
17081
17128
|
* // Do something with "feature".
|
|
17082
17129
|
* }
|
|
@@ -17093,6 +17140,14 @@ export namespace WebKit2 {
|
|
|
17093
17140
|
static $gtype: GObject.GType<FeatureList>;
|
|
17094
17141
|
|
|
17095
17142
|
// Methods
|
|
17143
|
+
/**
|
|
17144
|
+
* Finds a feature given its identifier.
|
|
17145
|
+
* @param identifier a {@link WebKit2.Feature} identifier
|
|
17146
|
+
* @returns The feature with the given `identifier`, or `null` if it cannot be found.
|
|
17147
|
+
* @since 2.54
|
|
17148
|
+
*/
|
|
17149
|
+
find(identifier: string): Feature | null;
|
|
17150
|
+
|
|
17096
17151
|
/**
|
|
17097
17152
|
* Gets a feature given its index.
|
|
17098
17153
|
* @param index index of the feature
|
|
@@ -17103,7 +17158,8 @@ export namespace WebKit2 {
|
|
|
17103
17158
|
|
|
17104
17159
|
/**
|
|
17105
17160
|
* Gets the number of elements in the feature list.
|
|
17106
|
-
* @returns number of elements.
|
|
17161
|
+
* @returns number of elements.
|
|
17162
|
+
* @since 2.42
|
|
17107
17163
|
*/
|
|
17108
17164
|
get_length(): number;
|
|
17109
17165
|
|
|
@@ -17119,7 +17175,7 @@ export namespace WebKit2 {
|
|
|
17119
17175
|
/**
|
|
17120
17176
|
* Atomically releases a reference on the given `feature_list`.
|
|
17121
17177
|
*
|
|
17122
|
-
* If the reference was the last, the resources associated
|
|
17178
|
+
* If the reference was the last, the resources associated with the
|
|
17123
17179
|
* `feature_list` are freed. This function is MT-safe and may be called
|
|
17124
17180
|
* from any thread.
|
|
17125
17181
|
* @since 2.42
|
|
@@ -17297,7 +17353,7 @@ export namespace WebKit2 {
|
|
|
17297
17353
|
/**
|
|
17298
17354
|
* Get the last time a {@link WebKit2.ITPThirdParty} has been seen under `itp_first_party`.
|
|
17299
17355
|
*
|
|
17300
|
-
* Each
|
|
17356
|
+
* Each {@link WebKit2.ITPFirstParty} is created by `webkit_itp_third_party_get_first_parties()` and
|
|
17301
17357
|
* therefore corresponds to exactly one {@link WebKit2.ITPThirdParty}.
|
|
17302
17358
|
* @returns the last update time as a {@link GLib.DateTime}
|
|
17303
17359
|
* @since 2.30
|
|
@@ -17307,7 +17363,7 @@ export namespace WebKit2 {
|
|
|
17307
17363
|
/**
|
|
17308
17364
|
* Get whether `itp_first_party` has granted website data access to its {@link WebKit2.ITPThirdParty}.
|
|
17309
17365
|
*
|
|
17310
|
-
* Each
|
|
17366
|
+
* Each {@link WebKit2.ITPFirstParty} is created by `webkit_itp_third_party_get_first_parties()` and
|
|
17311
17367
|
* therefore corresponds to exactly one {@link WebKit2.ITPThirdParty}.
|
|
17312
17368
|
* @returns `true` if website data access has been granted, or `false` otherwise
|
|
17313
17369
|
* @since 2.30
|
|
@@ -17393,7 +17449,7 @@ export namespace WebKit2 {
|
|
|
17393
17449
|
|
|
17394
17450
|
|
|
17395
17451
|
/**
|
|
17396
|
-
* Range of text in
|
|
17452
|
+
* Range of text in a preedit string to be shown underlined.
|
|
17397
17453
|
* @gir-type Struct
|
|
17398
17454
|
* @since 2.28
|
|
17399
17455
|
*/
|
|
@@ -17498,10 +17554,10 @@ export namespace WebKit2 {
|
|
|
17498
17554
|
* {@link WebKit2.MemoryPressureSettings} is a boxed type that can be used to provide some custom settings
|
|
17499
17555
|
* to control how the memory pressure situations are handled by the different processes.
|
|
17500
17556
|
*
|
|
17501
|
-
* The memory pressure system implemented inside the different
|
|
17557
|
+
* The memory pressure system implemented inside the different processes will try to keep the memory usage
|
|
17502
17558
|
* under the defined memory limit. In order to do that, it will check the used memory with a user defined
|
|
17503
17559
|
* frequency and decide whether it should try to release memory. The thresholds passed will define how urgent
|
|
17504
|
-
* is to release that memory.
|
|
17560
|
+
* it is to release that memory.
|
|
17505
17561
|
*
|
|
17506
17562
|
* Take into account that badly defined parameters can greatly reduce the performance of the engine. For
|
|
17507
17563
|
* example, setting memory limit too low with a fast poll interval can cause the process to constantly
|
|
@@ -17527,7 +17583,7 @@ export namespace WebKit2 {
|
|
|
17527
17583
|
// Methods
|
|
17528
17584
|
/**
|
|
17529
17585
|
* Make a copy of `settings`.
|
|
17530
|
-
* @returns A copy of
|
|
17586
|
+
* @returns A copy of the passed {@link WebKit2.MemoryPressureSettings}.
|
|
17531
17587
|
* @since 2.34
|
|
17532
17588
|
*/
|
|
17533
17589
|
copy(): MemoryPressureSettings;
|
|
@@ -17591,7 +17647,7 @@ export namespace WebKit2 {
|
|
|
17591
17647
|
* Sets `value` as the fraction of the defined memory limit where the process will be
|
|
17592
17648
|
* killed.
|
|
17593
17649
|
*
|
|
17594
|
-
* The threshold must be a value bigger or equal to 0. A value of 0 means that the process
|
|
17650
|
+
* The threshold must be a value bigger than or equal to 0. A value of 0 means that the process
|
|
17595
17651
|
* is never killed. If the threshold is not 0, then it must be bigger than the strict threshold
|
|
17596
17652
|
* defined in `settings`. The threshold can also have values bigger than 1. The default value is 0.
|
|
17597
17653
|
* @param value fraction of the memory limit where the process will be killed because of excessive memory usage.
|
|
@@ -17600,7 +17656,7 @@ export namespace WebKit2 {
|
|
|
17600
17656
|
set_kill_threshold(value: number): void;
|
|
17601
17657
|
|
|
17602
17658
|
/**
|
|
17603
|
-
* Sets `memory_limit` the memory limit value
|
|
17659
|
+
* Sets `memory_limit` as the memory limit value of `settings`.
|
|
17604
17660
|
*
|
|
17605
17661
|
* The default value is the system's RAM size with a maximum of 3GB.
|
|
17606
17662
|
* @param memory_limit amount of memory (in MB) that the process is allowed to use.
|
|
@@ -17650,7 +17706,7 @@ export namespace WebKit2 {
|
|
|
17650
17706
|
get_description(): string | null;
|
|
17651
17707
|
|
|
17652
17708
|
/**
|
|
17653
|
-
* Get the list of file extensions associated
|
|
17709
|
+
* Get the list of file extensions associated with the MIME type.
|
|
17654
17710
|
* @returns a `null`-terminated array of strings
|
|
17655
17711
|
* @deprecated since 2.32
|
|
17656
17712
|
*/
|
|
@@ -17744,8 +17800,8 @@ export namespace WebKit2 {
|
|
|
17744
17800
|
/**
|
|
17745
17801
|
* Return the {@link WebKit2.URIRequest} associated with the navigation action.
|
|
17746
17802
|
*
|
|
17747
|
-
* Modifications to the returned object are
|
|
17748
|
-
* into account when the request is sent over the network, and is intended
|
|
17803
|
+
* Modifications to the returned object are *not* taken
|
|
17804
|
+
* into account when the request is sent over the network, and the object is intended
|
|
17749
17805
|
* only to aid in evaluating whether a navigation action should be taken or
|
|
17750
17806
|
* not. To modify requests before they are sent over the network the
|
|
17751
17807
|
* `WebKitPage::send-request` signal can be used instead.
|
|
@@ -17804,11 +17860,11 @@ export namespace WebKit2 {
|
|
|
17804
17860
|
/**
|
|
17805
17861
|
* Adds a URI-scheme-specific proxy.
|
|
17806
17862
|
*
|
|
17807
|
-
* URIs whose scheme matches `
|
|
17863
|
+
* URIs whose scheme matches `scheme` will be proxied via `proxy_uri`.
|
|
17808
17864
|
* As with the default proxy URI, if `proxy_uri` starts with "socks://", it will be treated as referring to
|
|
17809
17865
|
* all three of the socks5, socks4a, and socks4 proxy types.
|
|
17810
17866
|
* @param scheme the URI scheme to add a proxy for
|
|
17811
|
-
* @param proxy_uri the proxy URI to use for `
|
|
17867
|
+
* @param proxy_uri the proxy URI to use for `scheme`
|
|
17812
17868
|
* @since 2.16
|
|
17813
17869
|
*/
|
|
17814
17870
|
add_proxy_for_scheme(scheme: string, proxy_uri: string): void;
|
|
@@ -17862,7 +17918,7 @@ export namespace WebKit2 {
|
|
|
17862
17918
|
/**
|
|
17863
17919
|
* One item of a {@link WebKit2.OptionMenu}.
|
|
17864
17920
|
*
|
|
17865
|
-
* The {@link WebKit2.OptionMenu} is composed of WebKitOptionMenuItem
|
|
17921
|
+
* The {@link WebKit2.OptionMenu} is composed of WebKitOptionMenuItem objects.
|
|
17866
17922
|
* A WebKitOptionMenuItem always has a label and can contain a tooltip text.
|
|
17867
17923
|
* You can use the WebKitOptionMenuItem of a {@link WebKit2.OptionMenu} to build your
|
|
17868
17924
|
* own menus.
|
|
@@ -18160,7 +18216,7 @@ export namespace WebKit2 {
|
|
|
18160
18216
|
* Atomically decrements the reference count of `dialog` by one.
|
|
18161
18217
|
*
|
|
18162
18218
|
* If the
|
|
18163
|
-
* reference count drops to 0, all memory allocated by the
|
|
18219
|
+
* reference count drops to 0, all memory allocated by the {@link WebKit2.ScriptDialog} is
|
|
18164
18220
|
* released. This function is MT-safe and may be called from any
|
|
18165
18221
|
* thread.
|
|
18166
18222
|
* @since 2.24
|
|
@@ -18172,7 +18228,7 @@ export namespace WebKit2 {
|
|
|
18172
18228
|
/**
|
|
18173
18229
|
* A reply for a script message received.
|
|
18174
18230
|
* If no reply has been sent by the user, an automatically generated reply with
|
|
18175
|
-
* undefined value
|
|
18231
|
+
* undefined value will be sent.
|
|
18176
18232
|
* @gir-type Struct
|
|
18177
18233
|
* @since 2.40
|
|
18178
18234
|
*/
|
|
@@ -18197,7 +18253,8 @@ export namespace WebKit2 {
|
|
|
18197
18253
|
/**
|
|
18198
18254
|
* Reply to a script message with a value.
|
|
18199
18255
|
*
|
|
18200
|
-
* This function can be called
|
|
18256
|
+
* This function can only be called once. Further calls to it or to
|
|
18257
|
+
* `webkit_script_message_reply_return_error_message()` emit a critical warning and are ignored.
|
|
18201
18258
|
* @param reply_value Reply value of the provided script message
|
|
18202
18259
|
* @since 2.40
|
|
18203
18260
|
*/
|
|
@@ -18393,7 +18450,7 @@ export namespace WebKit2 {
|
|
|
18393
18450
|
|
|
18394
18451
|
|
|
18395
18452
|
/**
|
|
18396
|
-
* A compiled set of rules which applied to resource loads.
|
|
18453
|
+
* A compiled set of rules which are applied to resource loads.
|
|
18397
18454
|
* @gir-type Struct
|
|
18398
18455
|
* @since 2.24
|
|
18399
18456
|
*/
|
|
@@ -18703,8 +18760,9 @@ export namespace WebKit2 {
|
|
|
18703
18760
|
/**
|
|
18704
18761
|
* Gets the size of the data of types `types` in a {@link WebKit2.WebsiteData}.
|
|
18705
18762
|
*
|
|
18706
|
-
* Note that currently the data size is only known for {@link WebKit2.WebsiteDataTypes.DISK_CACHE}
|
|
18707
|
-
*
|
|
18763
|
+
* Note that currently the data size is only known for the {@link WebKit2.WebsiteDataTypes.DISK_CACHE},
|
|
18764
|
+
* {@link WebKit2.WebsiteDataTypes.LOCAL_STORAGE}, {@link WebKit2.WebsiteDataTypes.INDEXEDDB_DATABASES} and
|
|
18765
|
+
* {@link WebKit2.WebsiteDataTypes.DOM_CACHE} data types, so for all other types 0 will be returned.
|
|
18708
18766
|
* @param types a bitmask of {@link WebKit2.WebsiteDataTypes}
|
|
18709
18767
|
* @returns the size of `website_data` for the given `types`.
|
|
18710
18768
|
* @since 2.16
|