protected function includeJsFile($path)
    {
        $pageRenderer = $this->assetHandlerConnectorManager->getPageRenderer();

        if ($this->environmentService->isEnvironmentInFrontendMode()) {
            $pageRenderer->addJsFooterFile($path);
        } else {
            $pageRenderer->addJsFile($path);
        }
    }