What file extensions does the JS Resource support and what are the JS object limitations?

What file extensions does the JS Resource support and what are the JS object limitations?
none 0.0 0
  • HMI Model: cMT2158X
  • EasyBuilder Pro Version:6.07.02.480

What kind of files can be imported as a JS Resource? I have an opensource DXF/JT viewer that I would like to embed in my project, but it is fairly complex with many .jar and .class files that would need to be imported. Do you think something like this is too far outside of Easybuilder Pro’s capabilities?

-Daniel Nall

Hi @HFCRacer,

This question is difficult to answer because it depends on a variety of factors, but I can certainly help you come to a conclusion. To begin, I would recommend reading through chapter 43 of the EasyBuilder Pro user manual. It describes some of the basic features of our JS object. However, in general the JS Object is limited to:

  • Size limit of a JS object’s source code: 100 KB.
  • Size limit of a JS Resource file: 10MB
  • Size limit of the memory usage of a JS context(*): 20 MB.

(*) A JS context is a sandboxed execution context with its own set of built-in objects and
functions. And, all the JS objects in the same window share one JS context, that is, share the
same memory heap and global object.

With that said, I have used certain libraries like Math.JS and canvas-log.JS without issue. However, certain files may have system requirements that our HMIs do not support.

1 Like

My apologies for not addressing your initial inquiry, the JS Resource supports JS modules such as script files with the extension .js.