UNPKG

jdm_javascript_dom_manipulator

Version:
456 lines (172 loc) 7.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Jdm - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Jdm_Jdm.html">Jdm</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Proto.html">Proto</a></span></li> </nav> <div id="main"> <h1 class="page-title">Jdm</h1> <section> <header> <h2> Jdm </h2> </header> <article> <div class="container-overview"> <div class="section-method"> <h4 class="name" id="Jdm"><span class="type-signature"></span>JDM<span class="signature">(element<span class="signature-attributes">opt</span>, parent<span class="signature-attributes">opt</span>, classList<span class="signature-attributes">opt</span>, deep<span class="signature-attributes">opt</span>, &hellip;args<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {HTMLElement}</span></h4> <div class="description"> Crea una nuova istanza della classe Jdm e manipola l'elemento DOM. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="jdm.js.html">jdm.js</a>, <a href="jdm.js.html#line22">line 22</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>element</code></td> <td class="type"> <span class="param-type"><code>HTMLElement</code></span> | <span class="param-type"><code>null</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> null </td> <td class="description last"> L'elemento DOM da manipolare. Se non specificato, verrà creato un nuovo nodo. </td> </tr> <tr> <td class="name"><code>parent</code></td> <td class="type"> <span class="param-type"><code>HTMLElement</code></span> | <span class="param-type"><code>null</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> null </td> <td class="description last"> Il genitore dell'elemento. Se specificato, l'elemento verrà aggiunto come figlio del genitore. </td> </tr> <tr> <td class="name"><code>classList</code></td> <td class="type"> <span class="param-type"><code>Array.&lt;string></code></span> | <span class="param-type"><code>null</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> null </td> <td class="description last"> Una lista di classi da aggiungere all'elemento. Se specificato, verranno aggiunte le classi all'elemento. </td> </tr> <tr> <td class="name"><code>deep</code></td> <td class="type"> <span class="param-type"><code>boolean</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> true </td> <td class="description last"> Se impostato su `true`, i figli dell'elemento verranno manipolati ricorsivamente. </td> </tr> <tr> <td class="name"><code>args</code></td> <td class="type"> <span class="param-type"><code>*</code></span> </td> <td class="attributes"> &lt;optional><br> &lt;repeatable><br> </td> <td class="default"> </td> <td class="description last"> Altri argomenti opzionali che possono essere passati per la manipolazione del nodo. </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>HTMLElement</code></span> </dd> </dl> <div class="param-desc"> - Restituisce il nodo appena creato o manipolato. </div> </div> <div class="section-examples"> <h5>Example</h5> <pre class="prettyprint"><code>const div = JDM('div', document.body, ['my-class'], true); // Crea un nuovo div con la classe 'my-class' e lo aggiunge al body</code></pre> </div> </div> </div> </article> </section> </div> <br class="clear"> <footer> Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Mar 26 2025 15:17:51 GMT+0100 (Central European Standard Time) using the Minami theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>