Closed CountNick closed 7 months ago
@harmenjanssen ik heb bovenstaande punten verwerkt, ik kwam er alleen wel achter dat de constructor functie niet word uitgevoerd op safari, chrome incognito en firefox. Het zal dus ook op andere browsers wel niet werken op dit moment. Ik ben er nog niet achter waarom de constructor functie niet word uitgevoerd.
@harmenjanssen @MartijnNieuwenhuizen Alles werkt nu naar behoren, er gaat nu een check op de test niet goed, maar ik weet niet hoe ik deze nu moet aanpassen.
@CountNick This PR can be closed right?
Convert the cookie-consent to a custom element
The cookie-consent package is now turned into a
custom-element
, there's still some code in here which might be redundant also the test needs to be updated probably. To test this feature out this branch needs to be linked with this Ammodo branchSo what's been done:
dialog
file now contains the class for the custom elementDialog
multiple methods have been added to make the code more comprehendible, a small summary:getData
, responsible for getting data out from the passeddata-attributes
getConfig
, responsible for setting the config datainitEventDispatcher
, initialises theeventDispatcher
initTabList()
, initialises thetabList
elementgenerateDialogElement
generates the dialog elementsubmitHandler
, responsible for sending the cookies on submitcomposeValues
, responsible for composing values based on inputgetPreferences()
, responsible for getting the preferences fromConfig
updatePreference
, responsible for updates on the cookie preferences, parameterselectedCookies
gets passed hereinitDomToggler
, initialises thedomToggler
show
, responsible for showing the custom elementhide
, responsible for hiding the custom elementon
, responsible for adding events, needs parameterstype
andpayload