24#include <QWebEngineScript>
35 Q_PROPERTY(
bool null READ null CONSTANT)
39 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
43 Q_PROPERTY(
bool runsOnSubFrames READ runsOnSubFrames WRITE setRunsOnSubFrames NOTIFY runsOnSubFramesChanged)
47 Q_PROPERTY(
int worldId READ worldId WRITE setWorldId NOTIFY worldIdChanged)
51 Q_PROPERTY(QString sourceCode READ sourceCode WRITE setSourceCode NOTIFY sourceCodeChanged)
55 Q_PROPERTY(
InjectionPoint injectionPoint READ injectionPoint WRITE setInjectionPoint NOTIFY injectionPointChanged)
61 DocumentCreation = QWebEngineScript::DocumentCreation,
62 DocumentReady = QWebEngineScript::DocumentReady,
63 Deferred = QWebEngineScript::Deferred
69 MainWorld = QWebEngineScript::MainWorld,
70 ApplicationWorld = QWebEngineScript::ApplicationWorld,
71 UserWorld = QWebEngineScript::UserWorld
73 Q_ENUM(InjectionPoint)
78 QWebEngineScript webEngineScript()
const;
79 void setWebEngineScript(
const QWebEngineScript &script);
102 QWebEngineScript m_webEngineScript;
103 QBasicTimer m_basicTimer;
107 QString name()
const;
108 void setName(
const QString &name);
109 bool runsOnSubFrames()
const;
110 void setRunsOnSubFrames(
bool runsOnSubFrames);
112 void setWorldId(
int worldId);
113 QString sourceCode()
const;
114 void setSourceCode(
const QString &sourceCode);
118 void timerEvent(QTimerEvent *e)
override;
119 void aboutToUpdateUnderlyingScript();
The class exposing QWebEngineScript to QML.
void nameChanged(const QString &name)
The signal emitted when the script name is changed.
void sourceCodeChanged(const QString &sourceCode)
The signal emitted when source code of the script is changed.
ScriptWorldId
The enum wrapping QWebEngineScript::ScriptWorldId.
void runsOnSubFramesChanged(bool runsOnSubFrames)
The signal emitted when runsOnSubFrame property of the script is changed.
void injectionPointChanged(int injectionPoint)
The signal emitted when injectionPoint property of the script is changed.
void worldIdChanged(int worldId)
The signal emitted when worldId property of the script is changed.
InjectionPoint
The enum exposing QWebEngineScript::InjectionPoint.