PySide6.QtWebEngineCore.QWebEngineScriptCollection¶
- class QWebEngineScriptCollection¶
The
QWebEngineScriptCollectionclass 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¶
QWebEngineScriptCollectionmanages a set of user scripts.Use
scripts()andscripts()to access the collection of scripts associated with a single page or a number of pages sharing the same profile.See also
- clear()¶
Removes all scripts from this collection.
- contains(value)¶
- Parameters:
value –
QWebEngineScript- Return type:
bool
Returns
trueif the collection contains an occurrence ofvalue; otherwise returnsfalse.- 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
listinto the collection.- insert(s)
- Parameters:
s –
QWebEngineScript
Inserts the script
sinto the collection.- isEmpty()¶
- Return type:
bool
Returns
trueif the collection is empty; otherwise returnsfalse.- remove(script)¶
- Parameters:
script –
QWebEngineScript- Return type:
bool
Removes
scriptfrom the collection.Returns
trueif the script was found and successfully removed from the collection; otherwise returnsfalse.- toList()¶
- Return type:
.list of QWebEngineScript
Returns a list with the values of the scripts used in this collection.