PySide6.QtWebEngineCore.QWebEngineScriptCollection¶
- class QWebEngineScriptCollection¶
- The - QWebEngineScriptCollectionclass represents a collection of user scripts.- Details- QWebEngineScriptCollectionmanages 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 - 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 - clear()¶
 - Removes all scripts from this collection. - contains(value)¶
- Parameters:
- value – - QWebEngineScript
- Return type:
- bool 
 
 - Returns - trueif 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 - 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 returns- false.- 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 returns- false.- toList()¶
- Return type:
- .list of QWebEngineScript 
 
 - Returns a list with the values of the scripts used in this collection.