WebEngineScript QML Type
|Import Statement:||import QtWebEngine|
- injectionPoint : enumeration
- name : string
- runOnSubframes : int
- sourceCode : string
- worldId : enumeration
The following Greasemonkey attributes are supported:
Use WebEngineScriptCollection to access a list of scripts attached to the web view.
injectionPoint : enumeration
The point in the loading process at which the script will be executed. The default value is
|The script will be executed as soon as the document is created. This is not suitable for any DOM operation.|
|The script will run as soon as the DOM is ready. This is equivalent to the |
|The script will run when the page load finishes, or 500 ms after the document is ready, whichever comes first.|
name : string
The name of the script. Can be useful to retrieve a particular script from WebEngineScriptCollection.find method.
runOnSubframes : int
Set this property to
true if the script is executed on every frame in the page, or
false if it is only ran for the main frame. The default value is
sourceCode : string
See also sourceUrl.
worldId : enumeration
The world ID defining which isolated world the script is executed in.
|The world used by the page's web contents. It can be useful in order to expose custom functionality to web contents in certain scenarios.|
|The first isolated world to be used by scripts set by users if the application is not making use of more worlds. As a rule of thumb, if that functionality is exposed to the application users, each individual script should probably get its own isolated world.|
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.