Fix web lint issues

This commit is contained in:
Jaime Baez 2022-09-08 17:30:49 +02:00
parent 6725954b70
commit 4f7a3afbfc
40 changed files with 122 additions and 121 deletions

View file

@ -3,13 +3,10 @@
/**
* Usage: <div use:portal={'css selector'}> or <div use:portal={document.body}>
*
* @param {HTMLElement} el
* @param {HTMLElement|string} target DOM Element or CSS Selector
*/
export function portal(el: any, target: any = 'body') {
export function portal(el: HTMLElement, target: HTMLElement | string = 'body') {
let targetEl;
async function update(newTarget: any) {
async function update(newTarget: HTMLElement | string) {
target = newTarget;
if (typeof target === 'string') {
targetEl = document.querySelector(target);