31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
import './css/ui.min.css'
|
|
import './style.css'
|
|
// import javascriptLogo from './javascript.svg'
|
|
import { resolveCheckbox, resolveIcon, resolveTooltip } from './lib/ui'
|
|
import { get, post } from './lib/utility'
|
|
|
|
// document.querySelector('#js-logo').src = javascriptLogo
|
|
|
|
window.consts = {
|
|
path: '/',
|
|
resver: 20230329
|
|
}
|
|
|
|
// document.querySelector('#create-icon').appendChild(createIcon('fa-solid', 'user-edit'))
|
|
resolveIcon(document.querySelector('#create-icon'))
|
|
|
|
// document.querySelector('#create-checkbox').appendChild(createCheckbox({
|
|
// label: 'Switch 1'
|
|
// }))
|
|
resolveCheckbox(document.querySelector('#create-checkbox'))
|
|
|
|
resolveTooltip(document.querySelector('#buttons'))
|
|
|
|
document.querySelector('#button-fetch').addEventListener('click', () => {
|
|
// get('./javascript.svg')
|
|
// .then(r => r.blob())
|
|
// .then(blob => document.querySelector('#js-logo').src = URL.createObjectURL(blob));
|
|
post('./', JSON.stringify({ a: 1, b: 'test' }))
|
|
.then(r => console.log(r))
|
|
.catch(e => console.warn(e));
|
|
}); |