Comparing version 6.4.7 to 6.4.8
@@ -0,1 +1,5 @@ | ||
# 6.4.8 | ||
- Assigns event listener directly instead of `addEventListener`. | ||
- Exports `HTML` helper type alias namespace. | ||
# 6.4.5 | ||
@@ -2,0 +6,0 @@ - Adds `React.createFactory` support. |
{ | ||
"name": "jsx-dom", | ||
"version": "6.4.7", | ||
"version": "6.4.8", | ||
"description": "JSX to document.createElement.", | ||
@@ -25,7 +25,7 @@ "main": "lib/index.cjs.js", | ||
"@rollup/plugin-replace": "^2.3.1", | ||
"@types/babel__core": "^7.1.3", | ||
"@types/chai": "^4.2.8", | ||
"@types/jsdom": "^12.2.4", | ||
"@types/babel__core": "^7.1.4", | ||
"@types/chai": "^4.2.9", | ||
"@types/jsdom": "^16.1.0", | ||
"@types/mocha": "^7.0.1", | ||
"@types/node": "^13.7.0", | ||
"@types/node": "^13.7.4", | ||
"@types/prop-types": "^15.7.3", | ||
@@ -36,7 +36,7 @@ "babel-preset-minify": "^0.5.1", | ||
"fs-extra": "^8.1.0", | ||
"jsdom": "^16.1.0", | ||
"jsdom": "^16.2.0", | ||
"mocha": "^7.0.1", | ||
"nyc": "^15.0.0", | ||
"prettier": "^1.19.1", | ||
"rollup": "^1.31.0", | ||
"rollup": "^1.31.1", | ||
"rollup-plugin-prettier": "^0.6.0", | ||
@@ -63,2 +63,2 @@ "rollup-typescript": "^1.2.1", | ||
} | ||
} | ||
} |
# jsx-dom | ||
<!-- prettier-ignore --> | ||
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | ||
@@ -20,3 +20,3 @@ [![build status](https://travis-ci.org/proteriax/jsx-dom.svg?branch=master)](https://travis-ci.org/proteriax/jsx-dom) | ||
**Note:** If you previously use `h` as pragma, there is nothing you need to change. | ||
**Note:** Using HyperScript? `h` pragma is also supported. | ||
@@ -34,3 +34,3 @@ ```jsx | ||
// Functional components | ||
// `defaultProps` and `props.children` are supported natively and work as you expected. | ||
// `defaultProps` and `props.children` are supported natively and work as you expect. | ||
function Hello(props) { | ||
@@ -43,2 +43,5 @@ return ( | ||
} | ||
Hello.defaultProps = { | ||
firstName: "John" | ||
} | ||
@@ -77,3 +80,3 @@ document.body.appendChild(<Hello firstName="Johnny" lastName="Appleseed" />) | ||
<div style="background: transparent;" /> | ||
<div style={{ background: 'transparent', fontFamily: 'serif' }} /> | ||
<div style={{ background: "transparent", fontFamily: "serif" }} /> | ||
``` | ||
@@ -109,3 +112,3 @@ | ||
// Callback | ||
;<input ref={node => $(node).typehead({ hint: true })} /> | ||
<input ref={node => $(node).typehead({ hint: true })} /> | ||
@@ -161,3 +164,3 @@ // React.createRef | ||
import * as React from "jsx-dom" | ||
;<a namespaceURI={React.SVGNamespace}>I am an SVG element!</a> | ||
<a namespaceURI={React.SVGNamespace}>I am an SVG element!</a> | ||
``` | ||
@@ -167,11 +170,14 @@ | ||
Two extra functions and one constant are provided by this package: | ||
Three extra functions and one constant are provided by this package: | ||
1. `preventDefault(event: Event): Event` | ||
2. `stopPropagation(event: Event): Event` | ||
3. `SVGNamespace` is the `namespaceURI` string for SVG Elements. | ||
3. `createFactory(component: string | (props) => JSX.Element)` | ||
4. `SVGNamespace` is the `namespaceURI` string for SVG Elements. | ||
5. `import { HTML } from "jsx-dom"` contains short type aliases for HTML elements | ||
## Browser Support | ||
There is no support for Internet Explorer. | ||
There is no support for Internet Explorer, although it will very likely work if you bring your own | ||
polyfill. | ||
@@ -181,2 +187,2 @@ ## Known Issues | ||
`<div />`, and other tags, are inferred as a general `JSX.Element` in TypeScript instead of | ||
`HTMLDivElement` (or the equivalents). This is a known bug and its fix depends on [TypeScript#21699](https://github.com/Microsoft/TypeScript/issues/21699). | ||
`HTMLDivElement` (or the equivalents). This is a known bug and its fix depends on [TypeScript#21699](https://github.com/Microsoft/TypeScript/issues/21699). |
@@ -1,1 +0,1 @@ | ||
export * from './lib/svg'; | ||
export * from "./lib/svg" |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132568
12
3377
180