UNPKG

qcobjects-docs

Version:

The official app and website for documentation of QCObjects

28 lines (20 loc) 802 B
### QC_Append, append method This is a special method inserted to make your life easier when you want to dynamically manipulate the **DOM**. You can insert even a **Component**, a **QCObjects** Object or a **DOM** Element inside another **HTMLElement**. ##### Usage: ```javascript [element].append([object or element]); ``` #### Example: ```javascript // This will create a QCObjects class named "canvas" extending a HTMLCanvasElement with a customAttr property that has a "custom" value Class('canvas',HTMLCanvasElement,{ customAttr:'custom' }); // This will declare an instance canvas1 from the class canvas let canvas1 = New(canvas,{ width:100, height:100, }); // This will append the canvas1 object to the document body document.body.append(canvas1); ```