Skip to content

Commit e15fbd8

Browse files
authored
Update WebTwain_Viewer.md
Fixed improper example for bind
1 parent 708dd17 commit e15fbd8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

info/api/WebTwain_Viewer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,20 @@ bind(element: HTMLDivElement | HTMLElement) : boolean;
6262
**Example**
6363

6464
```javascript
65-
var DWObject, template;
65+
var DWObject;
6666
Dynamsoft.DWT.CreateDWTObjectEx(
6767
{
68-
WebTwainId: "a",
68+
WebTwainId: "dwtControl"
6969
},
7070
function (obj) {
7171
DWObject = obj;
72-
template = DWObject.Viewer.getElementById("dwtcontrolContainer_temp3");
73-
DWObject.Viewer.width=500;
74-
DWObject.Viewer.height=600;
72+
DWObject.Viewer.bind("dwtcontrolContainer");
73+
DWObject.Viewer.width=600;
74+
DWObject.Viewer.height=800;
7575
DWObject.Viewer.show();
7676
},
77-
function (errorCode, errorString) {
78-
console.log(errorString);
77+
function (err) {
78+
console.log(err);
7979
});
8080
```
8181

0 commit comments

Comments
 (0)