hyperform / hyperform

Capture form validation back from the browser

Home Page:https://hyperform.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Several hyperform instances do not share a global registry

Boldewyn opened this issue · comments

A freak bug, where hyperform was embedded in a module, and the JS file containing it was loaded again and again. Everytime hyperform(window) runs in the module, Hyperform cannot detect, that another Hyperform instance already ran on window, since the registries of both instances are disconnected.

Proof of Concept:

import hyperform from 'hyperform';
hyperform(window);

Load this file more than once. Visible result: Error messages are duplicated.

Possible fix: Try to make several instances of Hyperform aware of one another. What to do, if config options differ?