react / react-0.13.3 / examples / basic-commonjs / node_modules / reactify / node_modules / react-tools / src / browser / ReactDOM.js
81152 views/**1* Copyright 2013-2014, Facebook, Inc.2* All rights reserved.3*4* This source code is licensed under the BSD-style license found in the5* LICENSE file in the root directory of this source tree. An additional grant6* of patent rights can be found in the PATENTS file in the same directory.7*8* @providesModule ReactDOM9* @typechecks static-only10*/1112"use strict";1314var ReactElement = require('ReactElement');15var ReactElementValidator = require('ReactElementValidator');16var ReactLegacyElement = require('ReactLegacyElement');1718var mapObject = require('mapObject');1920/**21* Create a factory that creates HTML tag elements.22*23* @param {string} tag Tag name (e.g. `div`).24* @private25*/26function createDOMFactory(tag) {27if (__DEV__) {28return ReactLegacyElement.markNonLegacyFactory(29ReactElementValidator.createFactory(tag)30);31}32return ReactLegacyElement.markNonLegacyFactory(33ReactElement.createFactory(tag)34);35}3637/**38* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.39* This is also accessible via `React.DOM`.40*41* @public42*/43var ReactDOM = mapObject({44a: 'a',45abbr: 'abbr',46address: 'address',47area: 'area',48article: 'article',49aside: 'aside',50audio: 'audio',51b: 'b',52base: 'base',53bdi: 'bdi',54bdo: 'bdo',55big: 'big',56blockquote: 'blockquote',57body: 'body',58br: 'br',59button: 'button',60canvas: 'canvas',61caption: 'caption',62cite: 'cite',63code: 'code',64col: 'col',65colgroup: 'colgroup',66data: 'data',67datalist: 'datalist',68dd: 'dd',69del: 'del',70details: 'details',71dfn: 'dfn',72dialog: 'dialog',73div: 'div',74dl: 'dl',75dt: 'dt',76em: 'em',77embed: 'embed',78fieldset: 'fieldset',79figcaption: 'figcaption',80figure: 'figure',81footer: 'footer',82form: 'form',83h1: 'h1',84h2: 'h2',85h3: 'h3',86h4: 'h4',87h5: 'h5',88h6: 'h6',89head: 'head',90header: 'header',91hr: 'hr',92html: 'html',93i: 'i',94iframe: 'iframe',95img: 'img',96input: 'input',97ins: 'ins',98kbd: 'kbd',99keygen: 'keygen',100label: 'label',101legend: 'legend',102li: 'li',103link: 'link',104main: 'main',105map: 'map',106mark: 'mark',107menu: 'menu',108menuitem: 'menuitem',109meta: 'meta',110meter: 'meter',111nav: 'nav',112noscript: 'noscript',113object: 'object',114ol: 'ol',115optgroup: 'optgroup',116option: 'option',117output: 'output',118p: 'p',119param: 'param',120picture: 'picture',121pre: 'pre',122progress: 'progress',123q: 'q',124rp: 'rp',125rt: 'rt',126ruby: 'ruby',127s: 's',128samp: 'samp',129script: 'script',130section: 'section',131select: 'select',132small: 'small',133source: 'source',134span: 'span',135strong: 'strong',136style: 'style',137sub: 'sub',138summary: 'summary',139sup: 'sup',140table: 'table',141tbody: 'tbody',142td: 'td',143textarea: 'textarea',144tfoot: 'tfoot',145th: 'th',146thead: 'thead',147time: 'time',148title: 'title',149tr: 'tr',150track: 'track',151u: 'u',152ul: 'ul',153'var': 'var',154video: 'video',155wbr: 'wbr',156157// SVG158circle: 'circle',159defs: 'defs',160ellipse: 'ellipse',161g: 'g',162line: 'line',163linearGradient: 'linearGradient',164mask: 'mask',165path: 'path',166pattern: 'pattern',167polygon: 'polygon',168polyline: 'polyline',169radialGradient: 'radialGradient',170rect: 'rect',171stop: 'stop',172svg: 'svg',173text: 'text',174tspan: 'tspan'175176}, createDOMFactory);177178module.exports = ReactDOM;179180181