HTML5 and JavaScript - 2.2

Extension ID


What’s new?

See HTML5 and JavaScript - 2.2 - Release Notes .


The HTML5/JavaScript Analyzer can be used if your application is a Web Application, has HTML/JavaScript/CSS files and/or contains HTML/JavaScript fragments embedded into JEE and .NET files (for example). The analyzer provides the following features:

  • Checksum, number of code lines, number of comment lines, comments are present.
  • Local and global resolution is done when function is called directly through its name (inference engine resolution is not available).
  • For global resolution, caller is searched in all .js files. If only one callee is found, a link is created. If several callees are found, the analyzer watches inclusions in html files to see if it can filter the callee. If nothing is found in html files to filter, links are created to all possible callees.
  • Automated Function Point counting.

Technology support

See HTML5 and JavaScript - Technical Notes for information about:

  • Web Services support
  • Marionette with Backbone framework support
  • Apache Tiles framework support
  • Handlebars support
  • JSP/Classic ASP/JavaScript notes

Files analyzed

Icon(s) File Extension Notes
HTML *.html, *.htm, *.xhtml, *.ftl; *.ftlh; *.vm, *.ngt, *.vt, *.vtl

*.tml, *.mustache, *.njk, *.nunjucks, *.liquid, *.ejs, *.jst

*.shtml, *.sshtml, *.ssi, *.shtm, *.stm

Supports HTML/XHTML versions 1 - 5.

Creates one "HTML5 Source Code" object that is the caller of html to js links and a transaction entry point

Broadcasts tags and attributes/values to other CAST extensions such as com.castsoftware.angularjs. Other extensions will not need to analyze the files themselves.

*.ftl files are supported in releases ≥ 2.1.24-funcrel.

*.ftlh, *.vm files are supported in releases ≥2.1.25-funcrel.

*.ngt, *.vt, *.vtl files are supported in releases ≥ 2.1.28-funcrel and CAIP ≥ 8.3.54.

*.tml, *.mustache, *.njk, *.nunjucks, *.liquid, *.ejs, *.jst, *.shtml, *.sshtml, *.ssi, *.shtm, *.stm files are supported in releases ≥ 2.2.1-funcrel and CAIP ≥ 8.3.54.
JavaScript *.js, *.jsx, *.mjs, *.jsm, *.cjs
Supports JavaScript 1 to 1.8.1.

Supports JavaScript ECMA 6

*.jsm files are supported in releases ≥ 2.1.23-funcrel.

*.cjs files are supported in releases ≥2.1.27-funcrel.

See also HTML5 and JavaScript - Technical Notes.
Cascading Style Sheet *.css, *.scss

*.less','*.sass', '*.styl', '*.stylus', '*.cssm', '*.pcss', '*.postcss

Supports CSS 1 - 3.

*.less','*.sass', '*.styl', '*.stylus', '*.cssm', '*.pcss', '*.postcss files are supported in releases ≥ 2.1.29-funcrel and CAIP ≥ 8.3.54.
Java Server Page *.jsp, *.jspx, *.jsf, *.jsff, *.jspf, *.tag, *.tags, *.tagf, *.tagx
Supports JSP 1.1 - 2.3.
Active Server Page *.asp, *.aspx See also HTML5 and JavaScript - Technical Notes.
HTML Components *.htc HTC files contain html, JavaScript fragments that will be parsed. Created objects will be linked to the HTC file.
ASP.NET MVC Razor *.cshtml See also HTML5 and JavaScript - Technical Notes
IBM EAD4J Jade *.jade Files related to the IBM EAD4J Jade framework.
Pug *.pug Pug files.
Haml *.haml Haml files are supported in releases ≥ 2.2.1-funcrel and CAIP ≥ 8.3.54.
- YAML (YAML Ain't Markup Language) *.yml, *.yaml, Files related to the YAML language, handled by the com.castsoftware.nodejs extension.
- Vue.JS *.vue Files related to the Vue.js JavaScript language, handled by the com.castsoftware.nodejs and com.castsoftware.vuejs extensions.
- Properties *.properties -
- Template *.template Files related to serverless.template, handled by the com.castsoftware.nodejs extension.
Handlebars *.hbs, *.handlebars Files related to Handlebars.js. See Specific case of handlebars file below.

You may find that the number of files delivered is more than then number of files reported after analysis. This is due to the following:

  • by default some files are automatically excluded from the analysis, typically third-party frameworks which are not required. Please see the filters.json  file located at the root of the extension folder for a complete list of default exclusions.
  • some bundled javascript files are automatically excluded from the analysis, typically minified files (extension.min.js) or disguised minified files (extension.js), but for files containing one or a few very long lines, a specific calculation is actioned by the analyzer. 
  • some files that have been included in the analysis may not be saved in the CAST Analysis Service schema because they do not contain any useful information, i.e. they do not contain any technical sections such as functions which would lead to the creation of a specific object.

Since version 2.1.14-funcrel, files which are excluded from analysis are considered as external libraries when they are included in analyzed code. For each file, a “HTML5 JavaScript Source Code” is created with the external property set to “True”. This means that these files are not included in rule checks or other computations.

Function Point, Quality and Sizing support

Function Points
(tick) A green tick indicates that OMG Function Point counting and Transaction Risk Index are supported.
Quality and Sizing (tick) A green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist.

CAST Imaging Core compatibility

Release Operating System Supported
≥ 8.3.0 Microsoft Windows (tick)

Download and installation instructions

For HTML5 web applications, the extension will be automatically installed by CAST Imaging Console:

What results can you expect?

Example application

Javascript ECMA6 Classes and Constructors example:


Icon Description
Applet Class Reference
ASP Content
ASPX Content
Backbone View
Bean Method Reference
CSHTML Content / Razor Content
CSS Source Code
CSS Source Code Fragment
HTML5 External Libraries
Haml Source Code
Handlebars Source Code
HTC Content
HTML Source Code / HTML Source Code Fragment (HTML fragment inside template files like .hbs files)
HTML Fragment (HTML fragment present inside JavaScript code)
Jade Source Code
JavaScript Class
JavaScript Constructor
JavaScript Function
JavaScript Initialisation
JavaScript Method
JavaScript Source Code
JavaScript Source Code Fragment
Java Server Pages Content
JSX Source Code
Knockout View
Marionette Application
Marionette View
Pug Source Code
Tiles Definition
JEE Applet
JavaScript WebSocket Service
XMLHttpRequest Get Service, JavaScript HttpRequest Get Service, EventSource Get Service, Razor Get Service
XMLHttpRequest Update Service, JavaScript HttpRequest Update Service
XMLHttpRequest Post Service, JavaScript HttpRequest Post/Put Service, Razor Method Call, Razor Post Service
XMLHttpRequest Delete Service, JavaScript HttpRequest Delete Service

Structural Rules

Release Link

A global list is also available here:|| .

Known Limitations

  • Creation and detection of object using “prototype” is not supported.
  • When HTML5/JavaScript source code is used as the “source” or “destination” in a Reference Pattern it will be ignored when the analysis is run - this is due to a limitation in the way the analyzer functions.