humanswitch/consentcookie

Navigate within consentcookie using API

Opened this issue · 3 comments

Description

Open, Close and change view in ConsentCookie using the ConsentCookie API

Expected Behavior

An API that is available to navigate within ConsentCookie

Actual Behavior

There is no API available

@christianvriens @rockxwre Do you have any suggestion for the naming of the API method

My suggestion would be:

ConsentCookie.open($view)
ConsentCookie.close($view)

with view the name of the ConsentCookie window to be opened or closed.

How do we handle using this API to open ConsentCookie when the consentwall is active but the consentwall has nog been accepted.

Possible options are:

  • throw an error
  • auto accept consentwall
  • add a parameter to the API method to be able to choose this behaviour using a flag
    ** e.g. autoAccept consentwall

@christianvriens @rockxwre Do you have any suggestion for the naming of the API method

Maybe show and hide is better than open and close, since the latter is more ambiguous?