use es5 instead of es6 (proxy not supported by qjsengine)
This commit is contained in:
parent
fb4df95d0a
commit
5711352d33
@ -13,7 +13,7 @@ void DemoBridge::navigate(QVariant route)
|
||||
{
|
||||
switch (route.toInt()) {
|
||||
case 0:
|
||||
QString name = "Snake.js";
|
||||
QString name = "Snake.es5.js";
|
||||
QString script = Utils::readAssetFile("/doric/bundles", name);
|
||||
|
||||
Panel panel;
|
||||
|
@ -10,7 +10,7 @@ class BridgeExtension : public QObject
|
||||
public:
|
||||
explicit BridgeExtension(QObject *parent = nullptr);
|
||||
|
||||
void callNative(QString contextId, QString module, QString methodName, QString callbackId, QJSValue jsValue);
|
||||
Q_INVOKABLE void callNative(QString contextId, QString module, QString methodName, QString callbackId, QJSValue jsValue);
|
||||
};
|
||||
|
||||
#endif // BRIDGEEXTENSION_H
|
||||
|
@ -6,9 +6,12 @@
|
||||
</qresource>
|
||||
<qresource prefix="/doric">
|
||||
<file alias="doric-sandbox.js">../../doric-js/bundle/doric-sandbox.js</file>
|
||||
<file alias="doric-sandbox.es5.js">../../doric-js/bundle/doric-sandbox.es5.js</file>
|
||||
<file alias="doric-lib.js">../../doric-js/bundle/doric-lib.js</file>
|
||||
<file alias="doric-lib.es5.js">../../doric-js/bundle/doric-lib.es5.js</file>
|
||||
</qresource>
|
||||
<qresource prefix="/doric/bundles">
|
||||
<file alias="Snake.js">../../doric-demo/bundle/src/Snake.js</file>
|
||||
<file alias="Snake.es5.js">../../doric-demo/bundle/src/Snake.es5.js</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "constant.h"
|
||||
|
||||
const QString Constant::DORIC_BUNDLE_SANDBOX = "doric-sandbox.js";
|
||||
const QString Constant::DORIC_BUNDLE_LIB = "doric-lib.js";
|
||||
const QString Constant::DORIC_BUNDLE_SANDBOX = "doric-sandbox.es5.js";
|
||||
const QString Constant::DORIC_BUNDLE_LIB = "doric-lib.es5.js";
|
||||
const QString Constant::DORIC_MODULE_LIB = "doric";
|
||||
|
||||
const QString Constant::INJECT_ENVIRONMENT = "Environment";
|
||||
|
Reference in New Issue
Block a user