QWebEngineScriptCollection

The QWebEngineScriptCollection class represents a collection of user scripts. More

Inheritance diagram of PySide6.QtWebEngineCore.QWebEngineScriptCollection

Synopsis

Functions

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

class PySide6.QtWebEngineCore.QWebEngineScriptCollection
PySide6.QtWebEngineCore.QWebEngineScriptCollection.clear()

Removes all scripts from this collection.

PySide6.QtWebEngineCore.QWebEngineScriptCollection.contains(value)
Parameters

valuePySide6.QtWebEngineCore.QWebEngineScript

Return type

bool

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

PySide6.QtWebEngineCore.QWebEngineScriptCollection.count()
Return type

int

Returns the number of elements in the collection.

PySide6.QtWebEngineCore.QWebEngineScriptCollection.find(name)
Parameters

name – str

Return type

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

PySide6.QtWebEngineCore.QWebEngineScriptCollection.insert(list)
Parameters

list

PySide6.QtWebEngineCore.QWebEngineScriptCollection.insert(arg__1)
Parameters

arg__1PySide6.QtWebEngineCore.QWebEngineScript

PySide6.QtWebEngineCore.QWebEngineScriptCollection.isEmpty()
Return type

bool

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

PySide6.QtWebEngineCore.QWebEngineScriptCollection.remove(arg__1)
Parameters

arg__1PySide6.QtWebEngineCore.QWebEngineScript

Return type

bool

Removes script from the collection.

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

PySide6.QtWebEngineCore.QWebEngineScriptCollection.toList()
Return type

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