Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/algorithm/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/application/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/collections/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/commands/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/coreutils/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/datastore/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/disposable/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/domutils/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/dragdrop/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
},
module: {
rules: [
Expand Down
3 changes: 2 additions & 1 deletion packages/keyboard/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/messaging/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/polling/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/properties/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
3 changes: 2 additions & 1 deletion packages/signaling/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
20 changes: 9 additions & 11 deletions packages/virtualdom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,8 @@ export function hpass(tag: string): VirtualElementPass {
} else if (arguments.length === 3) {
attrs = arguments[1];
renderer = arguments[2];
} else if (arguments.length > 3) {
throw new Error("hpass() should be called with 1, 2, or 3 arguments");
}

return new VirtualElementPass(tag, attrs, renderer);
Expand Down Expand Up @@ -1201,23 +1203,15 @@ namespace Private {
continue;
}

// Handle the case of passthru update.
if (oldVNode.type === 'passthru' && newVNode.type === 'passthru') {
newVNode.render(currElem as HTMLElement);
currElem = currElem!.nextSibling;
continue;
}

// If the types of the old and new nodes differ,
// create and insert a new node.
if (oldVNode.type === 'text' || newVNode.type === 'text' ||
oldVNode.type === 'passthru' || newVNode.type === 'passthru') {
if (oldVNode.type !== newVNode.type || oldVNode.type === 'text' || newVNode.type === 'text') {
ArrayExt.insert(oldCopy, i, newVNode);
createDOMNode(newVNode, host, currElem);
continue;
}

// At this point, both nodes are known to be element nodes.
// At this point, both nodes are known to be of matching non-text type.

// If the new elem is keyed, move an old keyed elem to the proper
// location before proceeding with the diff. The search can start
Expand Down Expand Up @@ -1263,7 +1257,11 @@ namespace Private {
updateAttrs(currElem as HTMLElement, oldVNode.attrs, newVNode.attrs);

// Update the element content.
updateContent(currElem as HTMLElement, oldVNode.children, newVNode.children);
if (oldVNode.type === 'passthru' || newVNode.type === 'passthru') {
(newVNode as VirtualElementPass).render(currElem as HTMLElement);
} else {
updateContent(currElem as HTMLElement, oldVNode.children, newVNode.children);
}

// Step to the next sibling element.
currElem = currElem!.nextSibling;
Expand Down
3 changes: 2 additions & 1 deletion packages/virtualdom/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
}
}
4 changes: 2 additions & 2 deletions packages/widgets/src/tabbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1344,9 +1344,9 @@ namespace TabBar {
let className = this.createIconClass(data);

if (title.iconRenderer) {
return hpass('div', title.iconRenderer);
return hpass('div', {className, title: title.iconLabel}, title.iconRenderer);
} else {
return h.div({className}, data.title.iconLabel);
return h.div({className}, title.iconLabel);
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/widgets/tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module.exports = {
entry: './build/index.spec.js',
mode: 'development',
output: {
filename: './build/bundle.test.js'
filename: './build/bundle.test.js',
path: path.resolve(__dirname)
},
module: {
rules: [
Expand Down