WebKit2.UserContentManager.register_script_message_handler_with_reply

### Method

# WebKit2 UserContentManagerregister_script_message_handler_with_reply

since: 2.40

#### Declaration [src]

    gboolean
    webkit_user_content_manager_register_script_message_handler_with_reply (
      WebKitUserContentManager* manager,
      const char* name,
      const char* world_name
    )

#### Description [src]

Registers a new user script message handler in script world with name `world_name`.

Different from webkit_user_content_manager_register_script_message_handler(), when using this function to register the handler, the connected signal is script-message-with-reply-received, and a reply provided by the user is expected. Otherwise, the user will receive a default undefined value.

If `NULL` is passed as the `world_name`, the default world will be used. See `webkit_user_content_manager_register_script_message_handler()` for full description.

Registering a script message handler will fail if the requested name has been already registered before.

The registered handler can be unregistered by using webkit_user_content_manager_unregister_script_message_handler().

Available since: 2.40

#### Parameters

`name`

  Type: `const char*`

  Name of the script message channel `world_name` (nullable): the name of a `WebKitScriptWorld`.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`world_name`

  Type: `const char*`

  No description available.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gboolean`

`TRUE` if message handler was registered successfully, or `FALSE` otherwise.