driver-browser
v0.6.7
Published
Browser driver for Rax
Downloads
339
Readme
driver-browser
Browser driver for Rax.
Install
$ npm install --save driver-browser
Use
import {createElement, Component, render} from 'rax';
import BrowserDriver from 'driver-browser';
import {isWeb} from 'universal-env';
class Example extends Component {
render() {
return (
<div>
<img width="560" height="560" src="https://img.alicdn.com/tps/TB1z.55OFXXXXcLXXXXXXXXXXXX-560-560.jpg" />
</div>
);
}
}
render(<Example />, null, {
driver: isWeb ? BrowserDriver : null
});
API
static setTagNamePrefix(prefix: String)
Set tag prefix for custom elements.
import BrowserDriver from 'driver-browser';
BrowserDriver.setTagNamePrefix('a-');