Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 3.71 KB

File metadata and controls

75 lines (51 loc) · 3.71 KB
layout default-layout
title Upgrade guide for version 10 to 11 - Dynamsoft Barcode Reader JavaScript Edition
description This page shows how to upgrade Dynamsoft Barcode Reader JavaScript SDK from version 10 to 11.
keywords user guide, upgrade, javascript, js
needAutoGenerateSidebar true
permalink /programming/javascript/upgrade-guide/10to11.html

How to Upgrade DBR-JS from v10.x to v11.x

Reference the latest version of the dynamsoft-barcode-reader-bundle

To use version 11, include the following script in your HTML:

<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.2.4000/dist/dbr.bundle.js"></script>

APIs changes introduced in v11

BarcodeScanner API Changes

Several properties have been renamed or had their default values changed. Please review the table below and update your implementation accordingly if you rely on the previous defaults.

Property Old Default New Default Notes
removePoweredByMessage (deprecated) false Replaced by showPoweredByDynamsoft
showPoweredByDynamsoft false true Controls whether the "Powered by Dynamsoft" label is displayed
showCloseButton false true Controls whether the close button is shown in the scannerView
showResultView false true Controls whether the result view is shown

Note

If your project depends on the previous default behavior, you must explicitly set these properties to maintain compatibility.

Foundational API Changes

loadWasm() Simplified

The loadWasm() function no longer requires any parameters. Simply call loadWasm() without arguments.

Dynamsoft.Core.CoreModule.loadWasm();

engineResourcePaths Simplified

There is no longer a need to define engineResourcePaths for different modules. Resource management has been centralized and streamlined.

// To specify the path for rootDirectory
Dynamsoft.Core.CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";

Note

Remove unnecessary parameters from loadWasm() calls.

Eliminate any redundant configuration of engineResourcePaths.

Upgrade your template

The template system is upgraded. The template you used for the previous version can’t be directly recognized by the new version. Please use the template upgrade tool to upgrade your template.

From version 9.x or earlier

The Dynamsoft Barcode Reader JavaScript edition has been refactored to integrate with DynamsoftCaptureVision (DCV) architecture since version 10. To understand the advantages of this new architecture, please refer to these resources:

Important

Dynamsoft’s ongoing feature development is based on the new DCV architecture. By upgrading to v11, you’ll gain access to improved performance and new capabilities.

Due to the architectural changes, a significant rewrite of your existing code is required. we recommend you to follow the User Guide and re-write your codes.