-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.8 Support openharmony4.0 #15708
v3.8 Support openharmony4.0 #15708
Conversation
1. Fix xmlhttprequest request problems. 2. Repair the problem of not being able to display full screen.
Interface Check ReportThis pull request does not change any public interfaces ! |
}, | ||
"targets": [ | ||
{ | ||
"name": "default" | ||
"name": "default", | ||
"runtimeOS": "HarmonyOS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must use the harmonyos runtime environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems wired.
platforms/native/builtin/index.js
Outdated
@@ -211,6 +211,12 @@ for (const key in jsbWindow) { | |||
} | |||
} | |||
|
|||
// In the openharmony platform, XMLHttpRequest is not undefined, but there are problems to using it. | |||
// So the native implementation is forced to be used. | |||
if (window.oh && globalThis.XMLHttpRequest != undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (window.oh && globalThis.XMLHttpRequest != undefined) { | |
if (window.oh && typeof globalThis.XMLHttpRequest !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it mean XMLHttpRequest is supported on openharmony
but there are some bugs on their XMLHttpRequest implementation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Openharmony team says it doesn't provide an XMLHttpRequest interface, but XMLHttpRequest isn't undefined. there are problems with using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that means we keep two different implementation of XMLHttpRequest
, it's strange
where the globalThis.XMLHttpRequest comes from ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can create an issue for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please setup an issue to figure out where the globalThis.XMLHttpRequest is defined
}, | ||
"targets": [ | ||
{ | ||
"name": "default" | ||
"name": "default", | ||
"runtimeOS": "HarmonyOS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the OS is OpenHarmony?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a bug that is not available to environments using Openharmony. We can only use harmonyos.
Restore default values
// So the native implementation is forced to be used. | ||
if (window.oh && typeof globalThis.XMLHttpRequest !== 'undefined') { | ||
globalThis.XMLHttpRequest = jsbWindow.XMLHttpRequest; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How other native platforms set globalThis.XMLHttpRequest
?
Re: #
Changelog
Deveco3.1.0.501 supports openharmony 3.x, supports openharmony4.x with harmonyos.
Continuous Integration
This pull request:
Compatibility Check
This pull request: