-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
class nameOfClass {
constructor(ID, ParentID, Type) {
this.Type = (typeof(Type) === "undefined") ? "Some Default" : Type; // Optional property
this.ID = (typeof(ID) === "undefined") ? "nameOfClass" : ID;
this.ParentID = (typeof(ParentID) === "undefined") ? "main" : ParentID; // Optional Property
this.Object = null;
this.MDCObject = null; // Optional property
}
// Creates the nameOfClass.
Create() {
// pass
}
// Removes the nameOfClass.
Remove() {
// pass
}
// A method that returns the type of the Class.
Identifier() {
return "Class long form name";
}
}
- this.Type - Optional
- this.ID
- this.ParentID
- this.Object
- this.MDCObject - Optional
This property specifies the outermost object's ID. This may be used as the base structure for grids or other objects that are generated with sub objects. This property can be specified when the class is instantiated.
Examples:
- Make element query-able after being added to the DOM.
- Have specific CSS attributes for the element.
- Make it possible to nest other elements under this element.
- Your standard HTML ID reasons...
This property allows direct access to the object for custom modifications. This is generally handy for modifying the object in ways that the class does not natively support.
This property is created after the class' Create() method has been invoked. Otherwise the value will rest at null
.
Examples:
- Add a href attribute to an element without referencing an ID or class.
- Attach the element to some parent element. As seen in the AttachMenuItem() method of the nav drawer.
- Specify custom CSS attributes for the object.
This property allows the dev to chose where the new element will be nested. By default the new element will be created under this specified ID.
This is an optional property. If this property is available then it will have a default setting which can be overridden manually by changing the property. If supported, this can be specified on class instantiation.
- Specify to create a waterfall toolbar or a flexible waterfall toolbar.
- Specify to create a temporary nav drawer or a persistent nav drawer.
- etc...
This is an optional property. If this property is available then it will be automatically created when the class' Create()
method is called.
This property is generally used for accessing the MDC system underneath the ELJUMP system.
- Open or close a nav drawer.
- Manually set an event listener for a dialog box.