Skip to content

Commit

Permalink
Remove allow transparency (#10823)
Browse files Browse the repository at this point in the history
* Remove allowTransparency attribute

`allowtransparency` is an Internet Explorer-only attribute that
controls the background transparency of an iFrame. When set to true,
it respects the background color of the iFrame. When set to false, it
sets the background color to that of the document.

This feature was removed in IE9 - falling out of React's support
commitment.

Developers that have somehow figured out how to get IE8 to work with
React 16.x can still use `allowtransparency="true"`, since React now
supports unrecognized attributes.

* Use correct attribute script location

* Use new UMD bundles in attribute fixtures

* Update attribute snapshot

* Blank for CI
  • Loading branch information
nhunzaker authored and gaearon committed Sep 28, 2017
1 parent a58e993 commit 4472442
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 39 deletions.
25 changes: 0 additions & 25 deletions fixtures/attribute-behavior/AttributeTableSnapshot.md
Expand Up @@ -473,31 +473,6 @@
| `allowReorder=(null)`| (initial)| `<null>` |
| `allowReorder=(undefined)`| (initial)| `<null>` |

## `allowTransparency` (on `<path>` inside `<svg>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `allowTransparency=(string)`| (changed)| `"a string"` |
| `allowTransparency=(empty string)`| (changed)| `<empty string>` |
| `allowTransparency=(array with string)`| (changed)| `"string"` |
| `allowTransparency=(empty array)`| (changed)| `<empty string>` |
| `allowTransparency=(object)`| (changed)| `"result of toString()"` |
| `allowTransparency=(numeric string)`| (changed)| `"42"` |
| `allowTransparency=(-1)`| (changed)| `"-1"` |
| `allowTransparency=(0)`| (changed)| `"0"` |
| `allowTransparency=(integer)`| (changed)| `"1"` |
| `allowTransparency=(NaN)`| (changed, warning)| `"NaN"` |
| `allowTransparency=(float)`| (changed)| `"99.99"` |
| `allowTransparency=(true)`| (changed)| `"true"` |
| `allowTransparency=(false)`| (changed)| `"false"` |
| `allowTransparency=(string 'true')`| (changed)| `"true"` |
| `allowTransparency=(string 'false')`| (changed)| `"false"` |
| `allowTransparency=(string 'on')`| (changed)| `"on"` |
| `allowTransparency=(string 'off')`| (changed)| `"off"` |
| `allowTransparency=(symbol)`| (initial, warning, ssr error, ssr mismatch)| `<null>` |
| `allowTransparency=(function)`| (initial, warning, ssr mismatch)| `<null>` |
| `allowTransparency=(null)`| (initial)| `<null>` |
| `allowTransparency=(undefined)`| (initial)| `<null>` |

## `alphabetic` (on `<font-face>` inside `<svg>`)
| Test Case | Flags | Result |
| --- | --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion fixtures/attribute-behavior/README.md
Expand Up @@ -8,7 +8,7 @@

## Instructions

`cd scripts/attribute-behavior && yarn install && yarn start`
`cd fixtures/attribute-behavior && yarn install && yarn start`

## Interpretation

Expand Down
6 changes: 3 additions & 3 deletions fixtures/attribute-behavior/src/App.js
Expand Up @@ -753,9 +753,9 @@ class App extends React.Component {

async componentDidMount() {
const sources = {
ReactStable: 'https://unpkg.com/react@latest/dist/react.js',
ReactDOMStable: 'https://unpkg.com/react-dom@latest/dist/react-dom.js',
ReactDOMServerStable: 'https://unpkg.com/react-dom@latest/dist/react-dom-server.js',
ReactStable: 'https://unpkg.com/react@latest/umd/react.development.js',
ReactDOMStable: 'https://unpkg.com/react-dom@latest/umd/react-dom.development.js',
ReactDOMServerStable: 'https://unpkg.com/react-dom@latest/umd/react-dom-server.browser.development.js',
ReactNext: '/react.development.js',
ReactDOMNext: '/react-dom.development.js',
ReactDOMServerNext: '/react-dom-server.browser.development.js',
Expand Down
6 changes: 0 additions & 6 deletions fixtures/attribute-behavior/src/attributes.js
Expand Up @@ -92,12 +92,6 @@ const attributes = [
tagName: 'switch',
read: getSVGAttribute('allowReorder'),
},
{
name: 'allowTransparency',
containerTagName: 'svg',
tagName: 'path',
read: getSVGAttribute('allowtransparency'),
},
{
name: 'alphabetic',
containerTagName: 'svg',
Expand Down
3 changes: 0 additions & 3 deletions src/renderers/dom/shared/HTMLDOMPropertyConfig.js
Expand Up @@ -26,9 +26,6 @@ var HTMLDOMPropertyConfig = {
// name warnings.
Properties: {
allowFullScreen: HAS_BOOLEAN_VALUE,
// IE only true/false iFrame attribute
// https://msdn.microsoft.com/en-us/library/ms533072(v=vs.85).aspx
allowTransparency: HAS_STRING_BOOLEAN_VALUE,
// specifies target context for links with `preload` type
async: HAS_BOOLEAN_VALUE,
// autoFocus is polyfilled/normalized by AutoFocusUtils
Expand Down
1 change: 0 additions & 1 deletion src/renderers/dom/shared/hooks/possibleStandardNames.js
Expand Up @@ -18,7 +18,6 @@ var possibleStandardNames = {
accesskey: 'accessKey',
action: 'action',
allowfullscreen: 'allowFullScreen',
allowtransparency: 'allowTransparency',
alt: 'alt',
as: 'as',
async: 'async',
Expand Down

0 comments on commit 4472442

Please sign in to comment.