Constructor
new RecipeCardFeaturedPG()
Attach the shadowroot which contains the Featured Recipe Card materials.
Members
data
The data needed to populate the materials are passed in as "data".
Methods
changeHeart(data, cardObj)
Toggles on and off the heart based on favorite
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | a JSON data object contains information to keep track of which recipe is being added to favorites. |
cardObj |
HTMLElement | an HTML element that contains the heart image. |
Returns:
Void