New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jsx-dom

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-dom - npm Package Compare versions

Comparing version 2.0.2 to 3.0.0

6

dist/index.cjs.js

@@ -51,4 +51,6 @@ 'use strict';

} else if (isFunction( tag )) {
var props = Object.assign({}, attr, { children: children });
return tag( props );
// Custom elements.
var node$1 = new tag();
attributes(attr, node$1);
return node$1;
}

@@ -55,0 +57,0 @@ }

@@ -47,4 +47,6 @@ function isElement(val) {

} else if (isFunction( tag )) {
var props = Object.assign({}, attr, { children: children });
return tag( props );
// Custom elements.
var node$1 = new tag();
attributes(attr, node$1);
return node$1;
}

@@ -51,0 +53,0 @@ }

declare module "jsx-dom" {
function createElement(
type: string,
type: string | Function,
props?: any,

@@ -5,0 +5,0 @@ ...children: (Node|string)[]

{
"name": "jsx-dom",
"version": "2.0.2",
"description": "JSX to document.createElement.",
"version": "3.0.0",
"description": "JSX to document.createElement",
"main": "dist/index.cjs.js",

@@ -6,0 +6,0 @@ "jsnext:main": "dist/index.es.js",

@@ -38,4 +38,5 @@ # jsx-dom

6. `innerHTML`, `innerText` and `textContent` are accepted.
7. Uppercase tag names are treated as a **Custom Element** and will be initialized with a `new` call.
## Browser Support
`jsx-dom` requires `Object.keys` and `Object.assign` (an ES6 feature). If you are using Babel, the [`transform-object-assign`](https://babeljs.io/docs/plugins/transform-object-assign/#usage) plugin should eliminate the need for a polyfill.

@@ -28,4 +28,6 @@ import {

} else if (isFunction( tag )) {
const props = Object.assign({}, attr, { children });
return tag( props );
// Custom elements.
const node = new tag();
attributes(attr, node);
return node;
}

@@ -32,0 +34,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc