Event listener for when element becomes visible?

后端 未结 9 2133
感情败类
感情败类 2020-11-28 05:36

I am building a toolbar that is going to be included into a page. the div it is going to be included in will default to display:none. Is there a way i can p

9条回答
  •  醉酒成梦
    2020-11-28 06:18

    Just to comment on the DOMAttrModified event listener browser support:

    Cross-browser support

    These events are not implemented consistently across different browsers, for example:

    • IE prior to version 9 didn't support the mutation events at all and does not implement some of them correctly in version 9 (for example, DOMNodeInserted)

    • WebKit doesn't support DOMAttrModified (see webkit bug 8191 and the workaround)

    • "mutation name events", i.e. DOMElementNameChanged and DOMAttributeNameChanged are not supported in Firefox (as of version 11), and probably in other browsers as well.

    Source: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Mutation_events

提交回复
热议问题