WebKit2.WebContext.initialize_notification_permissions

### Method

# WebKit2 WebContextinitialize_notification_permissions

#### Declaration [src]

    void
    webkit_web_context_initialize_notification_permissions (
      WebKitWebContext* context,
      GList* allowed_origins,
      GList* disallowed_origins
    )

#### Description [src]

Sets initial desktop notification permissions for the `context`.

`allowed_origins` and `disallowed_origins` must each be `GList` of `WebKitSecurityOrigin` objects representing origins that will, respectively, either always or never have permission to show desktop notifications. No `WebKitNotificationPermissionRequest` will ever be generated for any of the security origins represented in `allowed_origins` or `disallowed_origins`. This function is necessary because some webpages proactively check whether they have permission to display notifications without ever creating a permission request.

This function only affects web processes that have not already been created. The best time to call it is when handling `WebKitWebContext::initialize-notification-permissions` so as to ensure that new web processes receive the most recent set of permissions.

Available since: | 2.16

#### Parameters

`allowed_origins` | A list of `WebKitSecurityOrigin*`
| A `GList` of security origins.
| The data is owned by the caller of the function.
`disallowed_origins` | A list of `WebKitSecurityOrigin*`
| A `GList` of security origins.
| The data is owned by the caller of the function.