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
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did175066