lindell / lindell/JsBarcode

codabar cannot be initiated via options in the HTML element

Open
#399 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I tried to init using options in the HTML element:
```

And then initialize it with:
JsBarcode(".barcode").init();

But I get the following error:
Uncaught TypeError: e is not a constructor

Could you assist please?
P.S.
It work's fine with
and JsBarcode("#barcode3", "1234", {
format: "codabar"
});

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the shown SVG data attributes and JsBarcode(".barcode").init(), then compare it with the working direct-options example. The work is done when the codabar format initializes from the HTML element without the constructor error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.