(tagName)
| 950 | |
| 951 | |
| 952 | var _toNode = function toNode(tagName) { |
| 953 | var node = document.createElement(tagName); // Apply the class |
| 954 | |
| 955 | node.className = createClass(this.classes); // Apply inline styles |
| 956 | |
| 957 | for (var style in this.style) { |
| 958 | if (this.style.hasOwnProperty(style)) { |
| 959 | // $FlowFixMe Flow doesn't seem to understand span.style's type. |
| 960 | node.style[style] = this.style[style]; |
| 961 | } |
| 962 | } // Apply attributes |
| 963 | |
| 964 | |
| 965 | for (var attr in this.attributes) { |
| 966 | if (this.attributes.hasOwnProperty(attr)) { |
| 967 | node.setAttribute(attr, this.attributes[attr]); |
| 968 | } |
| 969 | } // Append the children, also as HTML nodes |
| 970 | |
| 971 | |
| 972 | for (var i = 0; i < this.children.length; i++) { |
| 973 | node.appendChild(this.children[i].toNode()); |
| 974 | } |
| 975 | |
| 976 | return node; |
| 977 | }; |
| 978 | /** |
| 979 | * Convert into an HTML markup string |
| 980 | */ |
nothing calls this directly
no test coverage detected