@webbspark/quick-create
v1.8.5
Published
Short hand replacement for document.createElement DOM method
Downloads
25
Readme
@webbspark/quick-create
Description
Short hand replacement for document.createElement DOM method
Notes
- Package uses JSDOC commenting to assist via Intellisense - optimized for VSCode
Importing Package
- Note: Sever must be able to serve the
node_modules/@webbspark
folder or it should be copied into a folder the server can serve this folder. - Electron apps can access the
node_modules
folder directly, copying is not necessary
import { create } from 'node_modules/@webbspark/quick-create/index.js';
Properties
a
- Tag Type: <a>abbr
- Tag Type: <abbr>acronym
- Tag Type: <acronym>address
- Tag Type: <address>applet
- Tag Type: <applet>area
- Tag Type: <area>article
- Tag Type: <article>aside
- Tag Type: <aside>audio
- Tag Type: <audio>b
- Tag Type: <b>base
- Tag Type: <base>basefont
- Tag Type: <basefont>bdo
- Tag Type: <bdo>big
- Tag Type: <big>blockquote
- Tag Type: <blockquote>body
- Tag Type: <body>br
- Tag Type: <br>button
- Tag Type: <button>canvas
- Tag Type: <canvas>caption
- Tag Type: <caption>center
- Tag Type: <center>cite
- Tag Type: <cite>code
- Tag Type: <code>col
- Tag Type: <col>colgroup
- Tag Type: <colgroup>datalist
- Tag Type: <datalist>dd
- Tag Type: <dd>del
- Tag Type: <del>dfn
- Tag Type: <dfn>div
- Tag Type: <div>dl
- Tag Type: <dl>dt
- Tag Type: <dt>em
- Tag Type: <em>embed
- Tag Type: <embed>fieldset
- Tag Type: <fieldset>figcaption
- Tag Type: <figcaption>figure
- Tag Type: <figure>font
- Tag Type: <font>footer
- Tag Type: <footer>form
- Tag Type: <form>frame
- Tag Type: <frame>frameset
- Tag Type: <frameset>head
- Tag Type: <head>header
- Tag Type: <header>h1
- Tag Type: <h1>h2
- Tag Type: <h2>h3
- Tag Type: <h3>h4
- Tag Type: <h4>h5
- Tag Type: <h5>h6
- Tag Type: <h6>hr
- Tag Type: <hr>html
- Tag Type: <html>i
- Tag Type: <i>iframe
- Tag Type: <iframe>img
- Tag Type: <img>input
- Tag Type: <input>ins
- Tag Type: <ins>kbd
- Tag Type: <kbd>label
- Tag Type: <label>legend
- Tag Type: <legend>li
- Tag Type: <li>link
- Tag Type: <link>main
- Tag Type: <main>map
- Tag Type: <map>mark
- Tag Type: <mark>meta
- Tag Type: <meta>meter
- Tag Type: <meter>nav
- Tag Type: <nav>noscript
- Tag Type: <noscript>object
- Tag Type: <object>ol
- Tag Type: <ol>optgroup
- Tag Type: <optgroup>option
- Tag Type: <option>p
- Tag Type: <p>param
- Tag Type: <param>pre
- Tag Type: <pre>progress
- Tag Type: <progress>q
- Tag Type: <q>s
- Tag Type: <s>samp
- Tag Type: <samp>script
- Tag Type: <script>section
- Tag Type: <section>select
- Tag Type: <select>small
- Tag Type: <small>source
- Tag Type: <source>span
- Tag Type: <span>strike
- Tag Type: <strike>strong
- Tag Type: <strong>style
- Tag Type: <style>sub
- Tag Type: <sub>sup
- Tag Type: <sup>table
- Tag Type: <table>tbody
- Tag Type: <tbody>td
- Tag Type: <td>textarea
- Tag Type: <textarea>tfoot
- Tag Type: <tfoot>th
- Tag Type: <th>thead
- Tag Type: <thead>time
- Tag Type: <time>title
- Tag Type: <title>tr
- Tag Type: <tr>u
- Tag Type: <u>ul
- Tag Type: <ul>var
- Tag Type: <var>video
- Tag Type: <video>wbr
- Tag Type: <wbr>textnode
- Node Type: #text
Use Example
import { create } from './node_modules/@webbspark/index.js';
const elm = create.div;
elm.className = 'dark';
const email = create.input;
inp.type = 'text';
inp.placeholder = 'Email Address';
inp.style.color = 'blue';
const password = create.input;
inp.type = 'password';
inp.placeholder = 'Password';
inp.style.color = 'blue';
const btn = create.button;
btn.innerText = 'Login';
elm.append(email, password, btn);
document.body.append(elm);
Feature Requests and Bug Reporting - NOT IMPLEMENTED
License
Copyright (C) 2021 Christopher J. Webb - WebbSpark.com
Permission to use, and/or distribute this software for any legal purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
BY USING THIS SOFTWARE YOU AGREE TO ALL THE TERMS AND CONDITIONS HEREIN.
THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER/AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
COPYRIGHT HOLDER/AUTHOR RESERVES THE RIGHT TO CHANGE THESE TERMS AND CONDITIONS AT ANY TIME, FOR ANY REASON, WITHOUT PRIOR NOTICE.