How to use the driver-dom.createElement function in driver-dom

To help you get started, we’ve selected a few driver-dom 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 / driver-universal / src / dom.js View on Github external
createElement(type, props, component) {
    if (props.hasOwnProperty(STYLE)) {
      const style = props[STYLE];
      const node = DriverDOM.createElement(type, {
        ...props,
        [STYLE]: null,
      }, component);
      driver.setStyle(node, style);
      return node;
    } else {
      return DriverDOM.createElement(type, props, component);
    }
  },
  addEventListener(node, eventName, eventHandler, props) {
github alibaba / rax / packages / driver-miniapp / src / index.js View on Github external
createElement(type, props, component) {
    return DriverDOM.createElement(type, props, component, true);
  },
  setStyle(node, style) {
github alibaba / rax / packages / driver-universal / src / dom.js View on Github external
createElement(type, props, component) {
    if (props.hasOwnProperty(STYLE)) {
      const style = props[STYLE];
      const node = DriverDOM.createElement(type, {
        ...props,
        [STYLE]: null,
      }, component);
      driver.setStyle(node, style);
      return node;
    } else {
      return DriverDOM.createElement(type, props, component);
    }
  },
  addEventListener(node, eventName, eventHandler, props) {

driver-dom

DOM driver for Rax

BSD-3-Clause
Latest version published 4 years ago

Package Health Score

57 / 100
Full package analysis

Similar packages