mirror of
				https://github.com/jaandrle/deka-dom-el
				synced 2025-11-04 07:09:15 +01:00 
			
		
		
		
	* 🐛 fixes #41 * ⚡ adjust package size limits * 🔤 * 📺 requestIdleCallback doesn need to be global * 🔤 corrects irland page headers * 📺 version * ⚡ Signal ← SignalReadonly * 🐛 ensures only one disconncetd listener …for cleanup * ⚡ 🔤 Better build and improve texting * 🐛 logo alignemt (due to gh) * 🔤 md enhancements * 🔤 ⚡ products
		
			
				
	
	
		
			15 lines
		
	
	
		
			274 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			274 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { el } from "deka-dom-el";
 | 
						|
 | 
						|
// Create element with properties
 | 
						|
const button = el("button", {
 | 
						|
	textContent: "Click me",
 | 
						|
	className: "primary",
 | 
						|
	disabled: true,
 | 
						|
});
 | 
						|
 | 
						|
// Shorter and more expressive
 | 
						|
// than the native approach
 | 
						|
 | 
						|
// Add to DOM
 | 
						|
document.body.append(button);
 |