This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/engine/DoricNativeJSE.h

30 lines
684 B
C
Raw Normal View History

2021-02-04 16:59:58 +08:00
#ifndef NATIVE_JSE_H
#define NATIVE_JSE_H
#include "DoricInterfaceJSE.h"
#include <QJSEngine>
2021-03-22 20:35:45 +08:00
#include <excpt.h>
#include "libplatform/libplatform.h"
#include "v8.h"
2021-02-04 16:59:58 +08:00
class DoricNativeJSE : public DoricInterfaceJSE {
private:
QJSEngine mJSEngine;
public:
DoricNativeJSE();
QString loadJS(QString script, QString source) override;
void injectGlobalJSObject(QString name, QObject *object) override;
void injectGlobalJSFunction(QString name, QObject *function,
QString property) override;
QJSValue invokeObject(QString objectName, QString functionName,
QVariantList arguments) override;
};
#endif // NATIVE_JSE_H