jsf.js_next_gen 4.0.3-beta.3 → 4.0.3-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1945,7 +1945,7 @@ class DomQuery {
1945
1945
  // script execution order by relative pos in their dom tree
1946
1946
  scriptElements.asArray
1947
1947
  .flatMap(item => [...item.values])
1948
- .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3) // preceding 2, following == 4)
1948
+ .sort((node1, node2) => node2.compareDocumentPosition(node1) - 3) // preceding 2, following == 4)
1949
1949
  .forEach(item => execScript(item));
1950
1950
  evalCollectedScripts(finalScripts);
1951
1951
  }
@@ -6512,8 +6512,9 @@ var ExtLang;
6512
6512
  .orElseLazy(() => queryElem.byTagName(Const_1.HTML_TAG_FORM, true))
6513
6513
  .orElseLazy(() => eventTarget.firstParent(Const_1.HTML_TAG_FORM))
6514
6514
  .orElseLazy(() => eventTarget.byTagName(Const_1.HTML_TAG_FORM))
6515
+ .orElseLazy(() => mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_FORM))
6515
6516
  .first();
6516
- assertFormExists(form);
6517
+ assertOnlyOneFormExists(form);
6517
6518
  return form;
6518
6519
  }
6519
6520
  ExtLang.getForm = getForm;
@@ -6586,12 +6587,12 @@ var ExtLang;
6586
6587
  }
6587
6588
  ExtLang.debounce = debounce;
6588
6589
  /**
6589
- * assert that the form exists and throw an exception in the case it does not
6590
+ * assert that the form exists and only one form exists and throw an exception in the case it does not
6590
6591
  *
6591
- * @param form the form to check for
6592
+ * @param forms the form to check for
6592
6593
  */
6593
- function assertFormExists(form) {
6594
- if (form.isAbsent()) {
6594
+ function assertOnlyOneFormExists(forms) {
6595
+ if (forms.isAbsent() || forms.length > 1) {
6595
6596
  throw makeException(new Error(), null, null, "Impl", "getForm", getMessage("ERR_FORM"));
6596
6597
  }
6597
6598
  }