Methods
add(event)
Add a new link to the collection Validates input, sanitizes URL, prevents duplicates, and updates display
| Name | Type | Description |
|---|---|---|
event | Event | Click event from add button |
connect()
Connect controller to DOM Loads existing links from form value and recreates the display
createListItem(item)
Create a visual list item for a link Generates Bootstrap input group with icon, URL display, and remove button
| Name | Type | Description |
|---|---|---|
item | Object | Link object with url and type properties |
initialize()
Initialize controller state Sets up empty items array for link management
remove(event)
Remove a link from the collection Filters out the specified item and updates the display
| Name | Type | Description |
|---|---|---|
event | Event | Click event from remove button |
setLinkType(event)
Set the link type for new link additions Updates the link type icon and stores the selected type
| Name | Type | Description |
|---|---|---|
event | Event | Click event from link type selector |