Note

Represents a custom HTML element for a note.

Constructor

new Note()

Initializes the note element.

Extends

  • HTMLElement

Members

(static) ObservedAttributes

Returns an array of all attributes that can be observed for a note element.

content

Gets the value of the `content` attribute.

content

Sets the value of the `content` attribute.

date

Gets the value of the `date` attribute.

date

Sets the value of the `date` attribute.

id

Gets the value of the `id` attribute.

id

Sets the value of the `id` attribute.

preview

Gets the value of the `preview` attribute.

title

Gets the value of the `title` attribute.

title

Sets the value of the `title` attribute.

Methods

_formatDate(dateString) → {string}

Formats a date string into a readable form.
Parameters:
NameTypeDescription
dateStringstringThe date string to format
Returns:
The formatted date string
Type: 
string

attributeChangeCallback(name, oldValue, newValue)

Handles attribute changes for the note element.
Parameters:
NameTypeDescription
namestringThe name of the attribute that changed
oldValuestringThe old value of the attribute
newValuestringThe new value of the attribute

connectedCallback()

Initializes the note element when it is added to the DOM.