## WebKitUserContentManager WebKitUserContentManager — Manages user-defined content which affects web pages. |

## Functions

WebKitUserContentManager * | webkit_user_content_manager_new ()
void | webkit_user_content_manager_add_style_sheet ()
void | webkit_user_content_manager_remove_all_style_sheets ()
void | webkit_user_content_manager_add_script ()
void | webkit_user_content_manager_remove_all_scripts ()

## Types and Values

struct | WebKitUserContentManager

## Object Hierarchy

        GObject
        ╰── WebKitUserContentManager

## Description

Using a WebKitUserContentManager user CSS style sheets can be set to be injected in the web pages loaded by a WebKitWebView, by `webkit_user_content_manager_add_style_sheet()`.

To use a WebKitUserContentManager, it must be created using `webkit_user_content_manager_new()`, and then passed to `webkit_web_view_new_with_user_content_manager()`. User style sheets can be created with `webkit_user_style_sheet_new()`.

User style sheets can be added and removed at any time, but they will affect the web pages loaded afterwards.

## Functions

### webkit_user_content_manager_new ()

    WebKitUserContentManager *
    webkit_user_content_manager_new (void);

Creates a new user content manager.

#### Returns

A WebKitUserContentManager

Since 2.6

### webkit_user_content_manager_add_style_sheet ()

    void
    webkit_user_content_manager_add_style_sheet
                                   (WebKitUserContentManager *manager,
                                    WebKitUserStyleSheet *stylesheet);

Adds a WebKitUserStyleSheet to the given WebKitUserContentManager. The same WebKitUserStyleSheet can be reused with multiple WebKitUserContentManager instances.

#### Parameters

manager | A WebKitUserContentManager |
stylesheet | A WebKitUserStyleSheet |

Since 2.6

### webkit_user_content_manager_remove_all_style_sheets ()

    void
    webkit_user_content_manager_remove_all_style_sheets
                                   (WebKitUserContentManager *manager);

Removes all user style sheets from the given WebKitUserContentManager.

#### Parameters

manager | A WebKitUserContentManager |

Since 2.6

### webkit_user_content_manager_add_script ()

    void
    webkit_user_content_manager_add_script
                                   (WebKitUserContentManager *manager,
                                    WebKitUserScript *script);

Adds a WebKitUserScript to the given WebKitUserContentManager. The same WebKitUserScript can be reused with multiple WebKitUserContentManager instances.

#### Parameters

manager | A WebKitUserContentManager |
script | A WebKitUserScript |

Since 2.6

### webkit_user_content_manager_remove_all_scripts ()

    void
    webkit_user_content_manager_remove_all_scripts
                                   (WebKitUserContentManager *manager);

Removes all user scripts from the given WebKitUserContentManager

#### Parameters

manager | A WebKitUserContentManager |

Since 2.6

## Types and Values

### struct WebKitUserContentManager

    struct WebKitUserContentManager;