Valid B2B-Commerce-Developer Dumps shared by ExamDiscuss.com for Helping Passing B2B-Commerce-Developer Exam! ExamDiscuss.com now offer the newest B2B-Commerce-Developer exam dumps, the ExamDiscuss.com B2B-Commerce-Developer exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com B2B-Commerce-Developer dumps with Test Engine here:
What are two purposes of the Shadow DOM in a Lightning web component?
Correct Answer: A,B
Explanation According to the Lightning Web Components Developer Guide, Shadow DOM is a standard that encapsulates the internal document object model (DOM) structure of a web component. Encapsulating the DOM gives developers the ability to share a component and protect the component from being manipulated by arbitrary HTML, CSS, and JavaScript. Shadow DOM also provides style and behavior isolation for a web component, which means that the styles and scripts defined inside a component do not affect the rest of the page, and vice versa. Therefore, the purposes of the Shadow DOM in a Lightning web component are to encapsulate the internal DOM structure of a web component (A) and to allow components to be shared while protecting them from being manipulated by arbitrary code (B). The other options are incorrect because Shadow DOM does not allow direct access to the document object model of the component, nor does it allow older JavaScript libraries to manipulate the tagging structure (D). References: Lightning Web Components Developer Guide, Understand the Shadow DOM Unit