Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.4.0-beta.3
- Add avoidArea event
- Add onBackPress event

---
# 0.4.0-beta.2
- Support requestPermission method

Expand Down
2 changes: 1 addition & 1 deletion package/oh-package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "@ohos-rs/ability",
"description": "Adaptor for OpenHarmony/HarmonyNext Application with Rust",
"main": "index.ets",
"version": "0.4.0-beta.2",
"version": "0.4.0-beta.3",
"repository": "https://github.com/harmony-contrib/openharmony-ability.git",
"dependencies": {},
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ export class RustWebviewNodeController extends NodeController {
return getCookies(url) as string;
};
const loadUrl = (url: string, header?: Record<string, string>) => {
const headers = Object.keys((header || {}) as Record<string, string>).reduce((t, i) => {
if (!!header![i]) {
t.push({ headerKey: i, headerValue: header![i] });
}
return t;
}, [] as Array<WebHeader>);
const headers = Object.keys((header || {}) as Record<string, string>).reduce(
(t, i) => {
if (!!header![i]) {
t.push({ headerKey: i, headerValue: header![i] });
}
return t;
},
[] as Array<WebHeader>,
);
controller.loadUrl(url, headers);
};

Expand Down