// Packages targeting DOM
{
- files: ['packages/{vue,vue-compat,runtime-dom}/**'],
+ files: ['packages/{vue,vue-compat,runtime-dom,runtime-vapor}/**'],
rules: {
'no-restricted-globals': ['error', ...NodeGlobals],
},
this.anchor =
__DEV__ && anchorLabel
? createComment(anchorLabel)
- : // eslint-disable-next-line no-restricted-globals
- document.createTextNode('')
+ : document.createTextNode('')
}
update(render?: BlockFn, key: any = render): void {
return createComponent(comp, rawProps, rawSlots, isSingleRoot)
}
- // eslint-disable-next-line no-restricted-globals
const el = document.createElement(comp)
// mark single root
;(el as any).$root = isSingleRoot
for (const name of names) {
if (!delegatedEvents[name]) {
delegatedEvents[name] = true
- // eslint-disable-next-line no-restricted-globals
document.addEventListener(name, delegatedEventHandler)
}
}
Object.defineProperty(e, 'currentTarget', {
configurable: true,
get() {
- // eslint-disable-next-line no-restricted-globals
return node || document
},
})
import { setText } from './prop'
export function createTextNode(values?: any[] | (() => any[])): Text {
- // eslint-disable-next-line no-restricted-globals
const node = document.createTextNode('')
if (values) {
if (isArray(values)) {
/*! #__NO_SIDE_EFFECTS__ */
export function createComment(data: string): Comment {
- // eslint-disable-next-line no-restricted-globals
return document.createComment(data)
}
/*! #__NO_SIDE_EFFECTS__ */
export function querySelector(selectors: string): Element | null {
- // eslint-disable-next-line no-restricted-globals
return document.querySelector(selectors)
}
export function template(html: string, root?: boolean) {
let node: ChildNode
const create = () => {
- // eslint-disable-next-line no-restricted-globals
const t = document.createElement('template')
t.innerHTML = html
return t.content.firstChild!