Feature

class Feature(pointer: <Error class: unknown class><<Error class: unknown class>>)

Describes a web engine feature that may be toggled at runtime.

The WebKit web engine includes a set of features which may be toggled programmatically, each one represented by a #WebKitFeature that provides information about it:

  • A unique “identifier”: method@Feature.get_identifier.

  • A “default value”, which indicates whether the option is enabled automatically: method@Feature.get_default_value.

  • Its “status”, which determines whether it should be considered user-settable and its development stage (see enum@FeatureStatus for details): method@Feature.get_status.

  • A category, which may be used to group features together: method@Feature.get_category.

  • An optional short “name” which can be presented to an user: method@Feature.get_name.

  • An optional longer “detailed” description: method@Feature.get_details.

The lists of available features can be obtained with func@Settings.get_all_features, func@Settings.get_experimental_features, and func@Settings.get_development_features). As a rule of thumb, applications which may want to allow users (i.e. web developers) to test WebKit features should use the list of experimental features. Additionally, applications might want to expose development features when targeting technically inclined users for early testing of in-development features (i.e. in “technology preview” or “canary” builds).

Applications must not expose the list of all features to end users because they often lack descriptions and control parts of the web engine which are either intended to be used during development of WebKit itself, or in specific scenarios to tweak how WebKit integrates with the application.

Since

2.42

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val webkitFeaturePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Gets the category of the feature.

Link copied to clipboard

Gets whether the feature is enabled by default.

Link copied to clipboard

Gets a description for the @feature.

Link copied to clipboard

Gets a string that uniquely identifies the @feature.

Link copied to clipboard
fun getName(): String?

Gets a short name for the @feature.

Link copied to clipboard

Gets the status of the feature.

Link copied to clipboard
fun ref(): Feature

Atomically acquires a reference on the given @feature.

Link copied to clipboard
fun unref()

Atomically releases a reference on the given @feature.