Class: AddRecipe

AddRecipe()

This is the component for the Add Recipe Page

Constructor

new AddRecipe()

Attach the shadowroot which contains the add page materials.
Source:

Members

data

The data needed to populate the materials are passed in as "data". Add page will have nothing for data
Source:

Methods

addIngreItems(buttonItem)

Add an ingredient to the bottom of ingredients list
Parameters:
Name Type Description
buttonItem HTMLElement the + button element to add on top of it
Source:

addInstruItems(olItem)

Add an instruction to instructions list.
Parameters:
Name Type Description
olItem HTMLElement an ordered HTML list element.
Source:
Returns:
Void

leaveAdd()

Leave the add page action. Hides the current add page view and load the appropriate view.
Source:
Returns:
Void

removeIngreItem(ingreList)

Removes ingredient div in DOM. Essentially removes the bottom ingredient.
Parameters:
Name Type Description
ingreList Object list of ingredient
Source:

removeInstruItem(instruList)

Removes the bottom instruction item in list.
Parameters:
Name Type Description
instruList Object list of instructions.
Source:
Returns:
Void