-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Pub/Sub model is simple-ish, but the documentation of it is a little weird and keeping track of the multiple events is also clunky.
It might be worth it to refactor the way they are assigned, making a singular detail object:
{
"form_selector": "ElementSelector<string>",
"button_selector": "ElementSelector<string>",
"difficulty": "number",
"verification": "Verification[]",
"msg": "string",
"percent": "number",
"done": "boolean",
}This would remove the event prefix, but also the elements from the event detail. This way it can be passed on as a simple string. What I'm not sure of is how to pass on which form is which when there are multiple on a single page.
Some options that come to mind are:
- a
data-multipleattribute on the body tag - adding a
data-whc-idattribute
The reason I'm hesitant to match it to an actual id attribute is because I want to decouple it as much from storing data in classes and ids as possible. They gave us data-* for a reason.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request