Skip to content

Commit db57a03

Browse files
Fix UI element selection in CameraView instance by removing shadowRoot references
1 parent 287ec9f commit db57a03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • programming/javascript/user-guide

programming/javascript/user-guide/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,9 @@ let cameraView3 = await Dynamsoft.DCE.CameraView.createInstance('url/to/my/ui.xm
666666
// Get the UI element associated with the cameraView instance
667667
let uiElement = cameraView.getUIElement();
668668
// Remove the camera selection dropdown from the CameraView's UI element
669-
uiElement.shadowRoot.querySelector('.dce-sel-camera').remove();
669+
uiElement.querySelector('.dce-sel-camera').remove();
670670
// Remove the resolution selection dropdown from the CameraView's UI element
671-
uiElement.shadowRoot.querySelector('.dce-sel-resolution').remove();
671+
uiElement.querySelector('.dce-sel-resolution').remove();
672672
```
673673
674674
The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on how to [customize the UI](https://www.dynamsoft.com/barcode-reader/docs/core/programming/features/ui-customization-js.html?lang=js).

0 commit comments

Comments
 (0)