WebKit.UserMessage

g GObject.InitiallyUnowned GObject.InitiallyUnowned WebKit.UserMessage WebKit.UserMessage GObject.InitiallyUnowned->WebKit.UserMessage GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name, parameters)

class

new_with_fd_list (name, parameters, fd_list)

get_fd_list ()

get_name ()

get_parameters ()

send_reply (reply)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

fd-list

Gio.UnixFDList

r/w/co

name

str

r/w/co

parameters

GLib.Variant

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class WebKit.UserMessage(**kwargs)
Bases:

GObject.InitiallyUnowned

Abstract:

No

Structure:

WebKit.UserMessageClass

Message that can be sent between the UI process and web process extensions.

A WebKit.UserMessage is a message that can be used for the communication between the UI process and web process extensions. A WebKit.UserMessage always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from a WebKit.WebContext to all web process extensions, from a web process extension to its corresponding WebKit.WebContext, and from a WebKit.WebView to its corresponding #WebKitWebPage (and vice versa). One to one messages can be replied to directly with WebKit.UserMessage.send_reply().

New in version 2.28.

classmethod new(name, parameters)
Parameters:
Returns:

the newly created WebKit.UserMessage object.

Return type:

WebKit.UserMessage

Create a new WebKit.UserMessage with name.

New in version 2.28.

classmethod new_with_fd_list(name, parameters, fd_list)
Parameters:
Returns:

the newly created WebKit.UserMessage object.

Return type:

WebKit.UserMessage

Create a new WebKit.UserMessage including also a list of UNIX file descriptors to be sent.

New in version 2.28.

get_fd_list()
Returns:

the message list of file descriptors

Return type:

Gio.UnixFDList or None

Get the self list of file descritpor.

New in version 2.28.

get_name()
Returns:

the message name

Return type:

str

Get the self name.

New in version 2.28.

get_parameters()
Returns:

the message parameters

Return type:

GLib.Variant or None

Get the self parameters.

New in version 2.28.

send_reply(reply)
Parameters:

reply (WebKit.UserMessage) – a WebKit.UserMessage to send as reply

Send a reply to an user message.

If reply is floating, it’s consumed. You can only send a reply to a WebKit.UserMessage that has been received.

New in version 2.28.

Property Details

WebKit.UserMessage.props.fd_list
Name:

fd-list

Type:

Gio.UnixFDList

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The UNIX file descriptors of the user message.

New in version 2.28.

WebKit.UserMessage.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of the user message.

New in version 2.28.

WebKit.UserMessage.props.parameters
Name:

parameters

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The parameters of the user message as a GLib.Variant, or None if the message doesn’t include parameters. Note that only complete types are allowed.

New in version 2.28.