How to use the driver-browser.setTagNamePrefix function in driver-browser

To help you get started, we’ve selected a few driver-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / rax / packages / miniapp-web-renderer / src / index.js View on Github external
import 'atag';
import { render as raxRender, createElement } from 'rax';
import BrowserDriver from 'driver-browser';
import createHashHistory from 'history/createHashHistory';
import UniversalRouter from 'universal-router';

import { resolve } from './path';
import Container from './components/Container';
import ErrorPage from './components/ErrorPage';
import PagesManager from './PagesManager';

try {
  BrowserDriver.setTagNamePrefix('a-');
} catch (e) {
  BrowserDriver.setTagPrefix('a-');
}

export default {
  /**
   * Render App from manifest source.
   *
   * @param {object} manifest project manifest data
   * @param {object} pagesMap map of pages
   * @param {string} pagesMap.key page name
   * @param {function} pagesMap.value page component
   * @example
   *  render({name: "demo"}, { home: HomeComponent })
   */
  render(manifest, pagesMap) {

driver-browser

Browser driver for Rax

BSD-3-Clause
Latest version published 6 years ago

Package Health Score

57 / 100
Full package analysis