diff --git a/src/preact.d.ts b/src/preact.d.ts index 3413ff6cb1..ffc11a13e7 100644 --- a/src/preact.d.ts +++ b/src/preact.d.ts @@ -421,6 +421,7 @@ declare global { interface DOMAttributes extends preact.PreactDOMAttributes { // Image Events onLoad?: GenericEventHandler; + onError?: GenericEventHandler; onLoadCapture?: GenericEventHandler; // Clipboard Events diff --git a/src/vdom/component.js b/src/vdom/component.js index 64fd32970e..f702fa1ba1 100644 --- a/src/vdom/component.js +++ b/src/vdom/component.js @@ -189,7 +189,7 @@ export function renderComponent(component, renderMode, mountAll, isChild) { } if (!isUpdate || mountAll) { - mounts.unshift(component); + mounts.push(component); } else if (!skip) { // Ensure that pending componentDidMount() hooks of child components diff --git a/src/vdom/diff.js b/src/vdom/diff.js index a2db0f90fd..ff32fbb533 100644 --- a/src/vdom/diff.js +++ b/src/vdom/diff.js @@ -24,11 +24,13 @@ let hydrating = false; /** Invoke queued componentDidMount lifecycle methods */ export function flushMounts() { - let c; - while ((c=mounts.pop())) { + let c, i; + for (i=0; i