class QWebEngineScriptCollection

The QWebEngineScriptCollection class represents a collection of user scripts. More

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

QWebEngineScriptCollection manages a set of user scripts.

Use scripts() and scripts() to access the collection of scripts associated with a single page or a number of pages sharing the same profile.

See also

Script Injection

clear()

Removes all scripts from this collection.

contains(value)
Parameters:

valueQWebEngineScript

Return type:

bool

Returns true if the collection contains an occurrence of value; otherwise returns false.

count()
Return type:

int

Returns the number of elements in the collection.

find(name)
Parameters:

name – str

Return type:

.list of QWebEngineScript

Returns the list of scripts in the collection with the name name, or an empty list if none was found.

insert(list)
Parameters:

list – .list of QWebEngineScript

Inserts scripts from the list list into the collection.

insert(arg__1)
Parameters:

arg__1QWebEngineScript

Inserts the script s into the collection.

isEmpty()
Return type:

bool

Returns true if the collection is empty; otherwise returns false.

remove(arg__1)
Parameters:

arg__1QWebEngineScript

Return type:

bool

Removes script from the collection.

Returns true if the script was found and successfully removed from the collection; otherwise returns false.

toList()
Return type:

.list of QWebEngineScript

Returns a list with the values of the scripts used in this collection.