This function can do the following based on the first argument:
div
abbr
custom-tag
'(body)'
'(#id)'
'(.class)'
Then it can receive a list of children to be added. Receives a third argument for mounting this tag to the currently mounted tag (context.mp).
tag('div');tag('(body)');tag('(.someclass)');tag(document.querySelector('#something')); Copy
tag('div');tag('(body)');tag('(.someclass)');tag(document.querySelector('#something'));
This function can do the following based on the first argument:
div,abbr,custom-tag, ...),'(body)','(#id)','(.class)'), any selector is allowed.Then it can receive a list of children to be added. Receives a third argument for mounting this tag to the currently mounted tag (context.mp).