NCES.length; i++) {
        setRTL(DIR_INSTANCES[i]);
      }
    }

    function takeRecords() {
      if (observer && observer.takeRecords().length) {
        updateDirection();
      }
    }

    /**
     * Element class mixin that allows elements to use the `:dir` CSS Selector to have
     * text direction specific styling.
     *
     * With this mixin, any stylesheet provided in the template will transform `:dir` into
     * `:host([dir])` and sync direction with the page via the element's `dir` attri