- enum class CookieAcceptPolicy
- {
- /**
- * @brief Accepts every cookie sent from any page.
- */
- ALWAYS,
-
- /**
- * @brief Rejects all the cookies.
- */
- NEVER,
-
- /**
- * @brief Accepts only cookies set by the main document that is loaded.
- */
- NO_THIRD_PARTY
- };
+ using JavaScriptAlertCallback = std::function<bool(const std::string&)>;
+
+ /**
+ * @brief Confirm callback when JavaScript confirm is called with a message.
+ * It returns true if a pop-up is created successfully, false otherwise.
+ */
+ using JavaScriptConfirmCallback = std::function<bool(const std::string&)>;
+
+ /**
+ * @brief Prompt callback when JavaScript prompt is called with a message
+ * and an optional value that is the default value for the input field.
+ * It returns true if a pop-up is created successfully, false otherwise.
+ */
+ using JavaScriptPromptCallback = std::function<bool(const std::string&, const std::string&)>;