@achmadk/void-elements 中文文档教程
void-elements
:memo: Object of "void elements" defined by the HTML Standard
导出由 HTML 规范定义的“空元素”节点名称的 Object
。
该列表是根据最新的 WHATWG HTML 标准以编程方式生成的。
:wrench: Usage
1. node.js
const voidElements = require('@achmadk/void-elements');
assert(!voidElements['span'], '<span> is not a void element');
assert(voidElements['img'], '<img> is a void element');
2. vite js (if have error importing void-elements
)
import { defineConfig } from 'vite'
export default defineConfig({
// rest of your vite configuration
resolve: {
alias: [
// another aliases
{
find: 'void-elements',
replacement: '@achmadk/void-elements'
}
]
}
})
License
麻省理工学院
void-elements
:memo: Object of "void elements" defined by the HTML Standard
Exports an Object
of "void element" node names as defined by the HTML spec.
The list is programatically generated from the latest WHATWG HTML Standard.
:wrench: Usage
1. node.js
const voidElements = require('@achmadk/void-elements');
assert(!voidElements['span'], '<span> is not a void element');
assert(voidElements['img'], '<img> is a void element');
2. vite js (if have error importing void-elements
)
import { defineConfig } from 'vite'
export default defineConfig({
// rest of your vite configuration
resolve: {
alias: [
// another aliases
{
find: 'void-elements',
replacement: '@achmadk/void-elements'
}
]
}
})
License
MIT
更多
你可能也喜欢
- 3d-webaudio-raub 中文文档教程
- @0x4447/cucumber 中文文档教程
- @0x706b/coc-diagnostic 中文文档教程
- @100tal-seg/seg-react 中文文档教程
- @128technology/darsain-tooltip 中文文档教程
- @42.nl/react-flash-messages 中文文档教程
- @42.nl/spring-connect 中文文档教程
- @4geit/rct-social-buttons-component 中文文档教程
- @4geit/swg-check-availability-helper 中文文档教程
- @555platform/555-js-sdk 中文文档教程