UNPKG

basic-ui-js

Version:

A lightweight JavaScript library for building web-based applications with simple code. No need to write HTML or CSS — just use basic JavaScript.

51 lines (36 loc) 1.3 kB
<!DOCTYPE html> <html> <head> <title>Icon Example</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <!-- LIBRARY FILES --> <link rel="stylesheet" type="text/css" href="basic/basic.min.css"> <script src="basic/basic.min.js" type="text/javascript" charset="utf-8"></script> <script> let icoLogo; // First running function. window.onload = function() { // IMAGE: Bottom Info. icoLogo = Icon({ right: 20, top: 20, width: 128, height: 128, padding: 15, color: "rgba(0, 0, 0, 0.05)", }); //that.autoSize = 1; that.load("assets/strawberry.png"); that.onLoad(printIconSizes); }; const printIconSizes = function(loadedIcon) { println("Width: " + loadedIcon.naturalWidth); println("Height: " + loadedIcon.naturalHeight); }; </script> </head> <body> <!-- HTML content --> </body> </html>