code: function $(CSS, parent = document) {
    switch (typeof CSS) {
      case 'string': return patch(search(CSS.split(','), parent));
      case 'object':
        // needed to avoid iterator dance (breaks in older IEs)
        const nodes = [];
        const all = ('nodeType' in CSS || 'postMessage' in CSS) ? [CSS] : CSS;
        push.apply(nodes, slice(all));
        return patch(new QueryResult(...nodes));
      case 'function':
        const $parent = $(parent);
        const $window = $(parent.defaultView);
        const handler = {handleEvent(event) {
          $parent.off(DOM_CONTENT_LOADED, handler);
          $window.off(LOAD, handler);
          CSS(event);
        }};
        $parent.on(DOM_CONTENT_LOADED, handler);
        $window.on(LOAD, handler);
        const rs = parent.readyState;
        if (rs == 'complete' || (rs != 'loading' && !parent.documentElement.doScroll))
          setTimeout(() => $parent.dispatch(DOM_CONTENT_LOADED));
        return $;
    }
  }
docs: use function to avoid usage of Symbol.hasInstance (broken in older browsers anyway)