Is there any ways to create custom element with pure html/js

Hi Guys,
I’m trying to import bpmnjs into my html site.
I’m using “” as started and as the title: Is there any ways to create custom element with pure html/js.

My project did not using npm.

Thanks guys,

What do you mean by pure HTML/JS? What else would you need? Can you give more context about what you’re trying to achieve and what you’ve already done to achieve this?

There is no obligation to use a module system of any kind. Simply use the modeler starter and hack the stuff seen in the custom elements example inside the HTML file.

Bundling / modularization will benefit you in the longer run once your application growth, though.

Thanks Guys,

In my context, We just use html code + js code.

Not NodeJS, not NPM. Just “

So, is not suitable for me in this case.

As mentioned in my previous comment it should be straight forward for you to inline the file contents exposed in the custom elements example into a single file (i.e. the starter template). Using our libraries does not force you to use a specific module system of some sort.

I suggest you to learn a little bit more about JavaScript and ways to modularize / split or not to split up your code. This will help you better understand how to embed our libraries, too.

1 Like