She needs her own channel! That whole prez was absolutely perfect. Showed step by step from broad to specific and the differences with the vendor implementation.
@SalesforceDevs2 жыл бұрын
She does! kzbin.info
@yatin13706 ай бұрын
As a beginner, I was able to understand this completely and honestly I can't fathom how brilliantly this was taught. I'm so glad having invested considerable time for JS fundamentals.
@jasonli10604 жыл бұрын
Why does this sound so epic? "The events that you fire from the inner elements from the shadow tree are not going to escape the shadow boundary"
@hiddenwasabiКүн бұрын
Very clear and easy to understand. Thank you!
@RenoirB Жыл бұрын
Amazing talk, I've been using all of this for a while now and that's my favourite explanation!
@lmkcolassi.93893 жыл бұрын
Thank you Alba, really appreciate your generosity that was simple concise and easy to understand. Hope your are well. peace and bounty to you
@RajendraSinghRSN4 жыл бұрын
Quick takes are good as they are easily consumable as compared to long sessions where 10-15 mins are wasted on arrangement & not so useful slides. Nice & well organized content 👍
@SalesforceDevs4 жыл бұрын
Thank you for the feedback!
@softwareengineeringandsale40053 жыл бұрын
Nice video, not sure why this has so many down votes. People are weird.
@aritramukherjee4 жыл бұрын
This is nice comparison. Short and crisp. Thanks.
@theidk956711 ай бұрын
You know what is funny? I just tried so hard to access your s via injected script (in salesforce app) to modify it, because the text doesnt have features our team needs. I tried for hours and thought to myself "what the hell, why is it not in DOM when I see it?". And then I found out this video, from Salesforce explaining how it works :D. Well, atleast Im a little smarter, but its a shame that I cannot do anything with that editor. Thank you for the explanation, indeed its an extremely nice feature, only for me right now a little limiting. (If you are curious, the problem I had was with the Salesforce text editor, where highlighting text and pressing ctrl+v doesnt make the text a hyperlink but instead rewrites it)
@AlbaRivasSalesforce11 ай бұрын
Hello, glad you find it useful! You have a longer explanation here: kzbin.info/www/bejne/imiyeHeDh9OdipY. Know that you can enable individual components to use Light DOM instead, however that won't open base components. developer.salesforce.com/blogs/2023/10/demystifying-light-dom-and-its-use-cases
@DmitriGoncharov4 жыл бұрын
Please make more videos like that! Thank you for a short yet great video!
@aishmeenkaur93764 жыл бұрын
, B.
@vaishalidewangan16722 жыл бұрын
very nice explanation.
@SalesforceDevs2 жыл бұрын
Thanks for liking
@TechleadConsulting2 жыл бұрын
Hola Elba, Great Explanation
@SalesforceDevs2 жыл бұрын
Thank you! 😃
@tophersymps4 жыл бұрын
Very well explained, thank you!
@ramparkashkhara78754 жыл бұрын
Very nice efforts we are happy.
@liamhunt85423 жыл бұрын
Why does this have so many dislikes? Just curious if there's something inaccurate in the video. Seems pretty helpful to me
@SalesforceUSA3 жыл бұрын
good video
@siripurapukavya21204 жыл бұрын
Short and Crisp content for a quick grasp. Thanks a lottt...!!!
@jflowers454 жыл бұрын
I really enjoyed how you started off with vanilla JavaScript and then brought it into the context of LWC. Very polished. Well done!
@philippreich73027 ай бұрын
can i use multiple Off-Plattform LWC on the same page?
@julianancizarhurtadotorres36194 жыл бұрын
Edge chromium supports native DOM. This version was deployed in all windows 10 in the last update.
@AlbaRivasSalesforce4 жыл бұрын
My bad - still older browsers don't support it and we need the polyfill - developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.get_started_supported_browsers
@gurbantasingh68724 жыл бұрын
.
@theartist88354 жыл бұрын
you can use document.body to query the body element.
@AlbaRivasSalesforce4 жыл бұрын
What I showcase in the video is how to query elements that belong to a shadow DOM tree (you have to query them using the shadowRoot property) vs elements that belong to the light DOM. "body" belongs to the light DOM, so you can query it normally. The shadow DOM tree in this example is attached to the div element I create (which is a child of body).
@viggie0072 жыл бұрын
Very helpful to simple to understand! Thanks. We're having an issue with a 3rd party JS that's trying to translate the page content dynamically - we use Lightning Out to render a Lightning component within a VisualForce page - the shadow-root fragment surrounding the Lightning component is random in this case. Whenever the the component is encapsulated within the shadow-root fragment the 3rd party JS results in a rendering issue. Is there a way to consistently always produce or exclude the shadow-root fragment?
@AlbaRivasSalesforce2 жыл бұрын
I think in your case Light DOM should help developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_light_dom
@yveromeev4 жыл бұрын
Only one silly tiny moment: Salesforce LWC DOESN'T USE SHADOW DOM like it's supposed to be. Instead, they add unique attributes in order to split CSS
@AlbaRivasSalesforce4 жыл бұрын
That's because we do need to support older browsers (for now), developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.get_started_supported_browsers but if you use LWC outside of the platform, you can use the native one
@yveromeev4 жыл бұрын
@@AlbaRivasSalesforce Does it mean that LWC is going to use the native shadow dom in Salesforce in future? If yes, does Salesforce understands that it will break tons of legacy code that hacks the current shadow dom implementation via static resources and manual dom css injections? There are lots of cases where it's required to extend/shorten the standard components like input-field or datatable which are very difficult to re-implement for a little style change. For instance: there is a need to make the textarea higher than it is by default... or hide the clip/wrap arrows in the datatable Another question is: in that case how are the standard components going to follow SLDS stylesheet which is supposed to be acceptable for the light dom only?
@AlbaRivasSalesforce4 жыл бұрын
@@yveromeev yes, we know, and we are working on a plan for this. We are evaluating how we want to approach it. Regarding styling of base components, we've recently published www.lightningdesignsystem.com/platforms/lightning/styling-hooks/ (beta), that may help.
@selvaraj81124 жыл бұрын
Ity to úo9976746867
@Khriztopher62202 жыл бұрын
what is the use case scenario of Shadow DOM?
@AlbaRivasSalesforce2 жыл бұрын
It's implemented in LWC, the web components framework that we use at Salesforce, to prevent other vendor components to access yours. See a more detailed explanation here --> kzbin.info/www/bejne/imiyeHeDh9OdipY
@gabrielmayta22974 жыл бұрын
Nice short video, LWC seems a very good library to work with WebComponets. Just one question is it possible to disable the shadowDOM?
@AlbaRivasSalesforce4 жыл бұрын
No, it's not possible, as it's one of the standards in which web components are based and we enforce it, as it provides the encapsulation capabilities that will make your code robust, trustful and reusable.
@aBhIsHeKsInGh-tl4gs4 жыл бұрын
@@AlbaRivasSalesforce यरयय
@aakashsathe93094 жыл бұрын
@@AlbaRivasSalesforce 1+.🤪🤪🤪🤪🤪🤪🤪🤣
@doncasanada34134 жыл бұрын
7
@amnairfan79264 жыл бұрын
M
@lmkcolassi.93893 жыл бұрын
Should you have referred LIGHT DOM as ROOT DOM instead ?
@AlbaRivasSalesforce Жыл бұрын
AFAIK it's known as Light DOM javascript.works-hub.com/learn/web-components-api-shadow-dom-and-light-dom-e18b6
@rahuljawale44612 жыл бұрын
will the css from the outer(main) DOM effect the styling of shadow dom??
@AlbaRivasSalesforce2 жыл бұрын
Cascaded values are not, only inherited ones. This is what the shadow boundary prevents. See a more advanced session here: kzbin.info/www/bejne/imiyeHeDh9OdipY
@marcc1179 Жыл бұрын
thanks!
@naveenkothuri3804 жыл бұрын
Mam can u plz explain the working underhood where events are used
@AlbaRivasSalesforce4 жыл бұрын
I'll create another video about shadow DOM and events soon. Meanwhile, you can take a look at developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.events_propagation, where it's very well explained how to configure events to bubble & escape the shadow DOM if needed.
@krushnachandranayak88334 жыл бұрын
\l22w2
@kultttemo3 жыл бұрын
Why did you delete the comments? I see a lot of dislikes and I want to know why people complain. It is obvious there is wrong information in this video. I am not gonna watch it now.
@AlbaRivasSalesforce3 жыл бұрын
not sure what you mean, I think we haven't deleted any comments :) if you have any concrete questions about shadow DOM of the video feel free to ask them, I'll be happy to answer
@kultttemo3 жыл бұрын
@@AlbaRivasSalesforce Nevermind, I had a bad day. Thanks for your videos.
@baddu884 жыл бұрын
So any mark up inside div tags in lightning web component is by default encapsulated or can be considered as a shadow tree?
@AlbaRivasSalesforce4 жыл бұрын
Yes, any markup inside a component template (its html file) will belong to the component shadow DOM and will be encapsulated - which all the benefits that this implies
@عادلالشعلانالغامدي4 жыл бұрын
شاهي بالانجليزي تي قال الله تعالى ((فَهَلْ يَنظُرُونَ إِلَّا السَّاعَةَ أَن تَأْتِيَهُم بَغْتَةً ۖ فَقَدْ جَاءَ أَشْرَاطُهَا ۚ فَأَنَّىٰ لَهُمْ إِذَا جَاءَتْهُمْ ذِكْرَاهُمْ (18)
@rizwanashekhrizwana35074 жыл бұрын
Mai aapka fan hu I am altashar sheikh I love this your video's please aap doody man ki aur video's Nikal sakte hai please
@Overthought72 жыл бұрын
This video is sorely lacking an explanation of the purpose and/or use cases of a shadow DOM!
@SalesforceUSA4 жыл бұрын
I have 11 Salesforce Certifications. Is it enough?
@AlbaRivasSalesforce3 жыл бұрын
It's not a matter of the number of certifications that you have, but your abilities to apply your knowledge and soft skills! certifications are going to help you learn though :)
@meenamehta3654 жыл бұрын
Very good.god bless you.
@ironajijiul4 жыл бұрын
I love you ma'am thanks for this question
@baddu884 жыл бұрын
Any real world use case for this in lwc context
@AlbaRivasSalesforce4 жыл бұрын
You're using shadow DOM implicitly in every LWC you create. Example: when you build LWCs, you sometimes will have to query the DOM - for example, you may want to look for a button and click on it calling its click() method. To do that, you'll have to query the component shadow DOM, (element.template.querySelector(...)), and not the component DOM (element.querySelector()), which is what you normally do in non-web components HTML. This provides the encapsulation benefits mentioned above. For instance, let's say that you download a component from the app exchange, and you include the component into another component you have built. You write some CSS styles for your component's background-color. Without having shadow DOM, those styles could leak into the 3rd party component, because of CSS cascading - which is something we probably want to avoid. But with shadow DOM, the 3rd party component will remain unchanged and protected from external modifications. Also, you have the control to decide which events escape the shadow boundary of the components that you create - having a higher degree of control of what you expose to the outside world. I'll do another video about how events behave with shadow DOM soon :)
@baddu884 жыл бұрын
@@AlbaRivasSalesforce thank you very much for detailed explanation