Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16.8.6 #15226

Closed
wants to merge 7 commits into from
Closed

React 16.8.6 #15226

wants to merge 7 commits into from

Commits on Mar 27, 2019

  1. Eager bailout optimization should always compare to latest reducer (f…

    …acebook#15124)
    
    * Eager bailout optimization should always compare to latest reducer
    
    * queue.eagerReducer -> queue.lastRenderedReducer
    
    This name is a bit more descriptive.
    
    * Add test case that uses preceding render phase update
    acdlite authored and gaearon committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    d9fa20d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa8736a View commit details
    Browse the repository at this point in the history
  3. Improve warning for invalid class contextType (facebook#15142)

    * Improve warning for invalid class contextType
    
    * Don't warn for null
    
    * Grammar
    gaearon committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    e0c2c56 View commit details
    Browse the repository at this point in the history
  4. fix(react-dom): access iframe contentWindow instead of contentDocument (

    facebook#15099)
    
    MDN has a list of methods for obtaining the window reference of an
    iframe:
    
    https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Syntax
    
    fix(react-dom): check if iframe belongs to the same origin
    
    Accessing the contentDocument of a HTMLIframeElement can cause the browser
    to throw, e.g. if it has a cross-origin src attribute.
    Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
    
    ```javascript
    try {
     $0.contentDocument.defaultView
    } catch (err) {
      console.log('err', err)
    }
    
    > Blocked a frame with origin X from accessing a frame with origin Y. Protocols, domains, and ports must match.
    > err – TypeError: null is not an object (evaluating '$0.contentDocument.defaultView')
    ```
    
    A safety way is to access one of the cross origin properties: Window or Location
    Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
    
    ```javascript
    try {
     $0.contentWindow.location.href
    } catch (err) {
     console.log('err', err)
    }
    
    > err – SecurityError: Blocked a frame with origin "http://localhost:3001" from accessing a cross-origin frame. Protocols, domains, and ports must match.
    ```
    
    https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
    renanvalentin authored and gaearon committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    f00be84 View commit details
    Browse the repository at this point in the history
  5. Changelog

    gaearon committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    cd5b895 View commit details
    Browse the repository at this point in the history
  6. Port tests to old API

    gaearon committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    297165f View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2019

  1. Update versions for 16.8.6

    gaearon committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    487f4bf View commit details
    Browse the repository at this point in the history