ExamGecko
Question list
Search
Search

Question 116 - Certified B2B Commerce Developer 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:

Two methods from the platformResourceLoader module that are relevant for including third party JavaScript and CSS in a Lightning web component are loadScript and loadStyle. The platformResourceLoader module is a module that provides methods for loading JavaScript or CSS files from static resources or external URLs into a Lightning web component. The loadScript method is used to load a JavaScript file and execute it in the component. The loadStyle method is used to load a CSS file and apply it to the component. The loadClientScript method does not exist or is not relevant for including third party JavaScript in a Lightning web component. The loadCss method does not exist or is not relevant for including third party CSS in a Lightning web component. Salesforce

Reference:Lightning Web Components Developer Guide: Load Scripts and Style Sheets, [Lightning Web Components Developer Guide: platformResourceLoader Module]

asked 23/09/2024
Valerio Lorenzani
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first