Commit ca05cf30 by Иван Кубота

Add support for function-based document onload shorthand

Introduced a shorthand to handle `DOMContentLoaded` or `load` events when a function is passed as the selector in `DOM.js`
parent d777739f
...@@ -142,7 +142,7 @@ NS.apply = function(a,b) { ...@@ -142,7 +142,7 @@ NS.apply = function(a,b) {
if( style ){ if( style ){
if(typeof style === 'string'){ if(typeof style === 'string'){
el.style = style; el.style.cssText = style;
}else{ }else{
for( i in style ){ for( i in style ){
var s = el.style; var s = el.style;
......
...@@ -5,9 +5,9 @@ const {minify} = require("terser"), ...@@ -5,9 +5,9 @@ const {minify} = require("terser"),
DOM = ['DOM.js'], DOM = ['DOM.js'],
rDOM = DOM.concat('Observer.js', 'Store.js', 'Transform.js', 'Ajax.js', 'Cmp.js'), rDOM = DOM.concat('Observer.js', 'Store.js', 'Transform.js', 'Ajax.js', 'Cmp.js'),
dir = 'build', dir = 'build',
header = `/* Vanilla.js Reactivity by Ivan Kubota. header = `/* Vanilla.js reactive library by Ivan Kubota.
* ©Form.dev 2012—${(new Date()).getFullYear()} * Form.dev 2012—${(new Date()).getFullYear()}
* License: MPL-2.0 for not commercial use and all projects that involves me * License: MPL-2.0
*/ */
`; `;
build = { build = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment