当前可能需要改成arkts才行作者: bananaCaptain 时间: 2024-6-12 11:16
请问JavaScript代码库 移植为 har包有相关教程不?请问哪里可以学习相关内容。谢谢作者: 马迪 时间: 2024-6-12 13:37
回复 bananaCaptain: https://ohpm.openharmony.cn/#/cn/help/publishrequirefile 这个?作者: bananaCaptain 时间: 2024-6-13 10:12
回复 马迪: 我在使用js-e2e 扫描想移植的库时出现了'window' is not defined 知道怎么调整不?麻烦了
D:\NodeProjects\js-e2e\js-compatibiitiy\temp\node_modules\leaflet\dist\leaflet-src.esm.js
210:9 error 'window' is not defined no-undef
210:36 error 'window' is not defined no-undef
210:60 error 'window' is not defined no-undef
221:9 error 'window' is not defined no-undef
224:17 error 'window' is not defined no-undef
225:16 error 'window' is not defined no-undef
226:65 error 'window' is not defined no-undef
238:25 error 'window' is not defined no-undef
246:17 error 'window' is not defined no-undef
1888:9 error 'document' is not defined no-undef
1929:13 error 'document' is not defined no-undef
1932:29 error 'window' is not defined no-undef
1935:20 error 'document' is not defined no-undef
1938:29 error 'navigator' is not defined no-undef
1938:62 error 'document' is not defined no-undef
1952:52 error 'navigator' is not defined no-undef
1954:98 error 'window' is not defined no-undef
1957:15 error 'window' is not defined no-undef
1975:11 error 'navigator' is not defined no-undef
1981:38 error 'window' is not defined no-undef作者: 马迪 时间: 2024-6-13 11:24
回复 bananaCaptain: 要看代码逻辑了,鸿蒙里没有全局window对象,需要人工解决掉作者: bananaCaptain 时间: 2024-6-14 13:46
回复 马迪: 有没有解决过window,navigator,document的har库案例推荐参考一下如何修改好。感谢