diff --git a/runtime/main/extend/systemplugin/napi/ohos_display.js b/runtime/main/extend/systemplugin/napi/ohos_display.js index cd7c5f84..a4673244 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_display.js +++ b/runtime/main/extend/systemplugin/napi/ohos_display.js @@ -78,6 +78,11 @@ export function mockDisplay() { }) } }, + hasPrivateWindow: function (...args) { + console.warn("Display.hasPrivateWindow interface mocked in the Previewer. How this interface works on the Previewer" + + " may be different from that on a real device.") + return paramMock.paramBooleanMock + }, on: function (...args) { console.warn("Display.on interface mocked in the Previewer. How this interface works on the Previewer may be" + " different from that on a real device.") diff --git a/runtime/main/extend/systemplugin/napi/ohos_window.js b/runtime/main/extend/systemplugin/napi/ohos_window.js index 58327ee4..260658c3 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_window.js +++ b/runtime/main/extend/systemplugin/napi/ohos_window.js @@ -346,6 +346,10 @@ export const Window = { }) } }, + setSnapshotSkip: function(...args) { + console.warn("Window.setSnapshotSkip interface mocked in the Previewer. How this interface works on the" + + " Previewer may be different from that on a real device.") + }, setSystemBarEnable: function(...args) { console.warn("Window.setSystemBarEnable interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device.")