Resource Base
Table of contents

Initialization

  • engineResourcePath
  • loadWasm()

engineResourcePath

Specifies the path to find the engine(s). The property needs to be set before loadWasm. If not specified, the library will try to find the engine in the same location as the main JavaScript file (dcp.js).

static engineResourcePath: string

Code Snippet

Dynamsoft.DCP.CodeParser.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-code-parser@1.1.0/dist/";
await Dynamsoft.DCP.CodeParser.loadWasm();

loadWasm

Downloads and compiles the engine to get it loaded/ready for a CodeParser instance to be created. You can call this API to silently set the operating environment of the library as soon as the page is loaded, avoiding unnecessary waiting time when using the library later.

If this API is not called beforehand, it will be called automatically when creating an instance of CodeParser.

static loadWasm(): Promise<void>

Code Snippet

window.addEventListener('DOMContentLoaded', (event) => {
   Dynamsoft.DCP.CodeParser.loadWasm();
});

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.2.10)
    • Version 2.x
      • Version 2.0.20
    • Version 1.x
      • Version 1.1.0
      • Version 1.0.2
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support