domify:html->元素

时间:2021-05-13 09:42:47
【文件属性】:
文件名称:domify:html->元素
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-13 09:42:47
JavaScript domify 将HTML转换为DOM元素x浏览器。 用法 可以在浏览器中直接使用: var domify = require ( 'domify' ) ; document . addEventListener ( 'DOMContentLoaded' , function ( ) { var el = domify ( '

Hello there

' ) ; document . body . appendChild ( el ) ; } ) ; 您也可以在node和iojs中运行它。 只需传递document的自定义实现: var jsdom = require ( 'jsdom' ) . jsdom ( ) ; domify ( '

Hello there

' , jsdom . defaultView . do
【文件预览】:
domify-master
----.github()
--------workflows()
----Readme.md(551B)
----.gitmodules(90B)
----LICENSE - MIT(1KB)
----test()
--------domify.js(3KB)
----History.md(2KB)
----Makefile(191B)
----component.json(289B)
----.gitignore(29B)
----index.js(3KB)
----package.json(675B)

网友评论