Deprecated on Cloud Service
Replacing the HTL JavaScript Use API with Sling Models
Adobe lists the JavaScript Use API as deprecated, with the Java Use API as its replacement. Server-side JavaScript use objects are also slower and harder to test.
What to use instead
Sling Models (Java Use API) adapted from the request or resource.
How to fix it
- Find data-sly-use attributes that load .js files.
- Rewrite each use object as a Sling Model with unit tests.
- Update the HTL to use the model class.
AEM 6.5
<div data-sly-use.teaser="teaser.js">${teaser.title}</div>Cloud Service
<div data-sly-use.teaser="com.acme.core.models.Teaser">${teaser.title}</div>How we detect it
- Readiness scan rule
js-use-api: HTL JavaScript Use API.
Can agents fix it?
High.
Source: Adobe Experience League. Checked 19 October 2026.