1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2026-01-11 16:26:28 +01:00

💥 📝

This commit is contained in:
2023-11-10 17:15:59 +01:00
parent 4d3a513713
commit 2569b9cd45
30 changed files with 420 additions and 361 deletions

View File

@@ -1,8 +1,9 @@
//TODO: https://www.npmjs.com/package/html-element
import { prop_process } from './src/dom-common.js';
const { setDeleteAttr }= prop_process;
import { enviroment } from './src/dom-common.js';
enviroment.ssr= true;
const { setDeleteAttr }= enviroment;
/** @param {HTMLElement} obj */
prop_process.setDeleteAttr= function(obj, prop, value){
enviroment.setDeleteAttr= function(obj, prop, value){
if("value"===prop) return obj.setAttribute(prop, value);
if("checked"!==prop) return setDeleteAttr(obj, prop, value);
if(value) return obj.setAttribute(prop, "");