ExamGecko
Question list
Search
Search

List of questions

Search

Question 249 - Certified B2B Commerce Administrator discussion

Report
Export

Which two methods from the platformResourceLoader module are relevant for including third party JavaScript and CSS in a Lightning web component?

A.
loadClientScript
Answers
A.
loadClientScript
B.
loadScript
Answers
B.
loadScript
C.
loadCss
Answers
C.
loadCss
D.
loadStyle
Answers
D.
loadStyle
Suggested answer: B, D

Explanation:

To include third party JavaScript and CSS in a Lightning web component, a developer can use two methods from the platformResourceLoader module: loadScript and loadStyle. These methods allow the developer to access JavaScript and CSS files that are uploaded as static resources in Salesforce. The loadScript method returns a promise that resolves when the JavaScript file is loaded, and the loadStyle method returns a promise that resolves when the CSS file is loaded.The developer can use these methods to import and apply third party libraries in their Lightning web components1.Reference:1: Use Third-Party JavaScript Libraries - Trailhead2

asked 23/09/2024
Darren Bilmen
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first