Skip to content

Commit

Permalink
fix(engine): Error boundary improvement (#937)
Browse files Browse the repository at this point in the history
* refactor(engine): error protocol refactor

refactor(engine): error protocol refactor 2

fix(engine): more granularity on the hooks

fix(engine): minor changes before reverting reorder of hooks

* refactor(engine): rolling back callback order for PR #937

fix(engine): fixing test

fix(engine): fixing test

fix(engine): fixing test

fix(engine): fixing test
  • Loading branch information
caridy authored and ekashida committed Feb 27, 2019
1 parent 08e45d8 commit 796997d
Show file tree
Hide file tree
Showing 19 changed files with 642 additions and 467 deletions.
34 changes: 15 additions & 19 deletions packages/@lwc/engine/src/3rdparty/snabbdom/types.ts
@@ -1,17 +1,19 @@
/*
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
/**
@license
Copyright (c) 2015 Simon Friis Vindum.
This code may only be used under the MIT License found at
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
Code distributed by Snabbdom as part of the Snabbdom project at
https://github.com/snabbdom/snabbdom/
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
/**
@license
Copyright (c) 2015 Simon Friis Vindum.
This code may only be used under the MIT License found at
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
Code distributed by Snabbdom as part of the Snabbdom project at
https://github.com/snabbdom/snabbdom/
*/

import { VM } from "../../framework/vm";

export type VNodeStyle = Record<string, string>;
export interface On {
Expand All @@ -35,9 +37,7 @@ export interface VNode {
key: Key | undefined;

hook: Hooks;
uid: number;
shadowAttribute?: string;
fallback: boolean;
owner: VM;
}

export interface VElement extends VNode {
Expand All @@ -46,7 +46,6 @@ export interface VElement extends VNode {
elm: Element | undefined;
text: undefined;
key: Key;
fallback: boolean;
}

export interface VCustomElement extends VElement {
Expand Down Expand Up @@ -91,19 +90,16 @@ export type InsertHook = (vNode: VNode, parentNode: Node, referenceNode: Node |
export type MoveHook = (vNode: VNode, parentNode: Node, referenceNode: Node | null) => void;
export type UpdateHook = (oldVNode: VNode, vNode: VNode) => void;
export type RemoveHook = (vNode: VNode, parentNode: Node) => void;
export type DestroyHook = (vNode: VNode) => void;

export interface Hooks {
create: CreateHook;
insert: InsertHook;
move: MoveHook;
update: UpdateHook;
remove: RemoveHook;
destroy: DestroyHook;
}

export interface Module {
create?: CreateHook;
update?: UpdateHook;
destroy?: DestroyHook;
}

0 comments on commit 796997d

Please sign in to comment.