1.1.0 • Published 5 years ago

@latel88/hotate v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Hotate

UI library.

install

npm install @latel88/hotate
  • CJS
const Hotate = requrire( "@latel88/hotate" ).default;
  • ESM
import Hotate from "@latel88/hotate";

exsample

const $ = new Hotate( { window } );
const elem = document.getElementById( "render" );

$.BOOT( elem ).
	OPEN( "div",
	{
		style: {
			"color": "#f00"
			
		}
		
	} ).
		TEXT( "HelloWorld!" ).

	CLOSE( "div" ).
EXIT();

rendering list

const list = [ "apple", "orange", "nuts" ];
const render = ( name ) ->
{
	$.OPEN( "li" ).
		TEXT( name ).

	CLOSE( "li" );

}

$.BOOT( elem );
	$.OPEN( "ul",
	{
		style: {
			"listStyleType": "number"
			
		}
		
	} );

	list.forEach( render );

	$.CLOSE( "ul" );
$.EXIT();

append touch element

const canvas = document.createElement( "canvas" );
const css = elem.style;

canvas.id = "game";
css.width = elem.width * 2 + "px";
css.height = elem.height * 2 + "px";

$.BOOT( elem ).
	ELEMENT( canvas ).
	
EXIT();

$.BOOT( elem ).
	VOID( "canvas" ).
	
EXIT();

console.log( canvas.parentNode ); //null
1.1.0

5 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago