Search code examples
javascriptdojo

an element in appearing in view could not find it under "Elements in Dev tools"


in Dojo widgets, if you add Title to html elements and when you hover over it, you get "Tooltip" like function without adding any code(I got to know that _WidgetBase.js is doing it). what is confusing for me is I cannot see it(Tooltip) in DOM. Anything displayed in Page should be visible under Elements tab in developer tools right. Please see the attached image.

In the attached image, <span title="i am a new text">a dummy implement</span> , when we hover over this element, we get a popup like function, but I could not find this popup under Elemnts in Dev tools. Please help me what I am missing.

enter image description here


Solution

  • In HTML, the text in title attribute renders automatically as a tooltip. So the page you posted may not be using any other element for this.

    <span title="i am a new text">a dummy implement</span>

    See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title