@optionfactory/ful 0.99.0 → 0.101.0

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.
package/dist/ful.iife.js CHANGED
@@ -1160,8 +1160,7 @@ var ful = (function (exports) {
1160
1160
  */
1161
1161
  static from(el) {
1162
1162
  /** @type [string, Element][] */
1163
- const namedSlots = Array.from(el.childNodes)
1164
- .filter(el => el instanceof Element)
1163
+ const namedSlots = Array.from(el.children)
1165
1164
  .filter(el => el.matches('[slot]'))
1166
1165
  .map(el => {
1167
1166
  el.remove();
@@ -1184,13 +1183,30 @@ var ful = (function (exports) {
1184
1183
 
1185
1184
  class Nodes {
1186
1185
  static isParsed(el) {
1187
- for (var c = el; c; c = c.parentNode) {
1186
+ for (let c = el; c; c = c.parentNode) {
1188
1187
  if (c.nextSibling) {
1189
1188
  return true;
1190
1189
  }
1191
1190
  }
1192
1191
  return false;
1193
1192
  }
1193
+ static queryChildren(node, selector) {
1194
+ for (const c of node.children) {
1195
+ if (c.matches(selector)) {
1196
+ return c;
1197
+ }
1198
+ }
1199
+ return null;
1200
+ }
1201
+ static queryChildrenAll(node, selector) {
1202
+ const r = [];
1203
+ for (const c of node.children) {
1204
+ if (c.matches(selector)) {
1205
+ r.push(c);
1206
+ }
1207
+ }
1208
+ return r;
1209
+ }
1194
1210
  }
1195
1211
 
1196
1212
  class TemplatesRegistry {