一个bug和一些功能请求 #172
Unanswered
chenxingmoonset
asked this question in
Q&A
Replies: 1 comment 4 replies
-
ps在原本的亦搜就有的。也支持http链接载入js。 https://github.com/mabDc/eso/blob/xiaohu/lib/api/api_js_engine.dart#L113 https://github.com/mabDc/eso/blob/xiaohu/lib/api/api_js_engine.dart#L133 await setToGlobalObject.invoke([
"require",
IsolateFunction((dynamic url) async {
if (url == null) return null;
final module = url.toString();
if (module.startsWith("http")) {
final res = await http.get(Uri.parse(module));
return await _engine.evaluate(res.body + ";0;");
} else {
try {
final js = await rootBundle.loadString("lib/assets/" +
module.replaceFirst(new RegExp(r".js$"), "") +
".js");
return await _engine.evaluate(js + ";0;");
} catch (e) {
return null;
}
}
}),
]);
await setToGlobalObject.invoke([
"xpath",
IsolateFunction((String html, String xpath) async {
return AnalyzerXPath().parse(html).getString(xpath);
}),
]); |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
bug:安卓端v1.1.26 开启文本朗读后熄屏/进入后台运行,读完当前段落会自动停止,需要点亮屏幕/打开app后继续阅读。但是再次熄屏/后台运行仍会停止朗读。系统:HarmonyOS 2.0.0
功能请求:
1、startBrowser可否添加response body的返回值
2、可不可以添加漫画的缓存和导出😍
3、js中可否添加jsonpath解析支持(不知道loadJS是否支持远程js链接引入,貌似可以直接添加到loadJS里?如果没必要就算了)
ps:话说现在益达支持外部tts吗
最后,炮佬牛逼,益达加油!!
Beta Was this translation helpful? Give feedback.
All reactions