sentinel.js 介绍
Introduction
Sentineljs is a tiny JavaScript library that makes it easy to set up a watch function that will notify you anytime a new node is added to the DOM that matches a given css rule. Among other things,you can take advantage of this to implement custom-elements and make other in-place modifications to new DOM elements:
<script>
sentinel.on('custom-element',function(el) {
// A new <custom-element> has been detected
el.innerhtml = 'The sentinel is always watching.';
});
</script>
<custom-element></custom-element>
网站地址:https://github.com/muicss/sentineljs
GitHub:https://github.com/muicss/sentineljs
网站描述:使用 CSS 选择器检测新的 DOM 节点的js库
sentinel.js
官方网站:https://github.com/muicss/sentineljs
小编说
以上是编程之家为你收集整理的sentinel.js全部内容。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。