Skip to content

Commit

Permalink
Support onLoad event on link element (facebook#6815)
Browse files Browse the repository at this point in the history
(cherry picked from commit fd589fc)
  • Loading branch information
roderickhsiao authored and zpao committed Jun 8, 2016
1 parent 3fa9130 commit 16b408c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/renderers/dom/shared/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,13 @@ ReactDOMComponent.Mixin = {
var props = this._currentElement.props;

switch (this._tag) {
case 'audio':
case 'form':
case 'iframe':
case 'object':
case 'img':
case 'form':
case 'link':
case 'object':
case 'video':
case 'audio':
this._wrapperState = {
listeners: null,
};
Expand Down Expand Up @@ -1084,12 +1085,13 @@ ReactDOMComponent.Mixin = {
*/
unmountComponent: function(safely) {
switch (this._tag) {
case 'audio':
case 'form':
case 'iframe':
case 'object':
case 'img':
case 'form':
case 'link':
case 'object':
case 'video':
case 'audio':
var listeners = this._wrapperState.listeners;
if (listeners) {
for (var i = 0; i < listeners.length; i++) {
Expand Down

0 comments on commit 16b408c

Please sign in to comment.