melody-idom
Advanced tools
Comparing version 1.2.0-commit.f9b4ed0d to 1.2.0-update-deps.0
@@ -48,6 +48,6 @@ /** | ||
/** | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
declare var assertCloseMatchesOpenTag: (nodeName: any, tag: any) => void; | ||
@@ -54,0 +54,0 @@ /** |
@@ -18,12 +18,12 @@ /** | ||
/** | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
var inAttributes = false; | ||
/** | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
var inSkip = false; | ||
@@ -99,6 +99,6 @@ /** | ||
/** | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
var assertCloseMatchesOpenTag = function (nodeName, tag) { | ||
@@ -105,0 +105,0 @@ if (nodeName !== tag) { |
@@ -14,2 +14,3 @@ import { enqueueComponent } from './renderQueue'; | ||
notify(): void; | ||
type: String; | ||
} | ||
@@ -16,0 +17,0 @@ declare const patchInner: (node: any, fn: any, data: any) => any; |
@@ -26,64 +26,64 @@ /** | ||
/** | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.attrs = createMap(); | ||
/** | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
this.attrsArr = []; | ||
/** | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.newAttrs = createMap(); | ||
/** | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
this.key = key; | ||
/** | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
this.keyMap = createMap(); | ||
/** | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
this.keyMapValid = true; | ||
/** | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
this.staticsApplied = false; | ||
/** | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
this.focused = false; | ||
/** | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
this.nodeName = nodeName; | ||
/** | ||
* @type {?string} | ||
*/ | ||
* @type {?string} | ||
*/ | ||
this.text = null; | ||
/** | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
this.componentInstance = null; | ||
/** | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
this.childLength = 0; | ||
@@ -90,0 +90,0 @@ } |
@@ -23,4 +23,3 @@ /** | ||
/* istanbul ignore next */ | ||
document.createElement('div') | ||
.addEventListener('test', function () { }, { | ||
document.createElement('div').addEventListener('test', function () { }, { | ||
get passive() { | ||
@@ -59,13 +58,15 @@ supportsPassiveListeners = true; | ||
} | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
if (component.type !== 'streaming') { | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component) { | ||
// if so: replace the child with its parent | ||
head.component = component; | ||
return; | ||
} | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component) { | ||
// if so: replace the child with its parent | ||
head.component = component; | ||
return; | ||
} | ||
if (head.next === NIL) { | ||
@@ -72,0 +73,0 @@ // insert the new node at the end of the list |
@@ -53,7 +53,7 @@ /** | ||
/* | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
var attrsArr = data.attrsArr; | ||
@@ -100,4 +100,4 @@ var newAttrs = data.newAttrs; | ||
/** | ||
* Actually perform the attribute update. | ||
*/ | ||
* Actually perform the attribute update. | ||
*/ | ||
for (i = 0; i < attrsArr.length; i += 2) { | ||
@@ -281,5 +281,5 @@ newAttrs[attrsArr[i]] = attrsArr[i + 1]; | ||
/* | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
var fn = arguments[i]; | ||
@@ -286,0 +286,0 @@ formatted = fn(formatted); |
@@ -124,64 +124,64 @@ import _debounce from 'lodash/debounce'; | ||
/** | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.attrs = createMap(); | ||
/** | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
this.attrsArr = []; | ||
/** | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.newAttrs = createMap(); | ||
/** | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
this.key = key; | ||
/** | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
this.keyMap = createMap(); | ||
/** | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
this.keyMapValid = true; | ||
/** | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
this.staticsApplied = false; | ||
/** | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
this.focused = false; | ||
/** | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
this.nodeName = nodeName; | ||
/** | ||
* @type {?string} | ||
*/ | ||
* @type {?string} | ||
*/ | ||
this.text = null; | ||
/** | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
this.componentInstance = null; | ||
/** | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
this.childLength = 0; | ||
@@ -349,12 +349,12 @@ } | ||
/** | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
var inAttributes = false; | ||
/** | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
var inSkip = false; | ||
@@ -423,6 +423,6 @@ /** | ||
/** | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
var assertCloseMatchesOpenTag = function assertCloseMatchesOpenTag(nodeName, tag) { | ||
@@ -1105,13 +1105,15 @@ if (nodeName !== tag) { | ||
} | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component$$1) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
if (component$$1.type !== 'streaming') { | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component$$1) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component$$1) { | ||
// if so: replace the child with its parent | ||
head.component = component$$1; | ||
return; | ||
} | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component$$1) { | ||
// if so: replace the child with its parent | ||
head.component = component$$1; | ||
return; | ||
} | ||
if (head.next === NIL) { | ||
@@ -1574,7 +1576,7 @@ // insert the new node at the end of the list | ||
/* | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
var attrsArr = data.attrsArr; | ||
@@ -1620,4 +1622,4 @@ var newAttrs = data.newAttrs; | ||
/** | ||
* Actually perform the attribute update. | ||
*/ | ||
* Actually perform the attribute update. | ||
*/ | ||
for (i = 0; i < attrsArr.length; i += 2) { | ||
@@ -1802,5 +1804,5 @@ newAttrs[attrsArr[i]] = attrsArr[i + 1]; | ||
/* | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
var fn = arguments[i]; | ||
@@ -1807,0 +1809,0 @@ formatted = fn(formatted); |
146
lib/index.js
@@ -130,64 +130,64 @@ 'use strict'; | ||
/** | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.attrs = createMap(); | ||
/** | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
this.attrsArr = []; | ||
/** | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.newAttrs = createMap(); | ||
/** | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
this.key = key; | ||
/** | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
this.keyMap = createMap(); | ||
/** | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
this.keyMapValid = true; | ||
/** | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
this.staticsApplied = false; | ||
/** | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
this.focused = false; | ||
/** | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
this.nodeName = nodeName; | ||
/** | ||
* @type {?string} | ||
*/ | ||
* @type {?string} | ||
*/ | ||
this.text = null; | ||
/** | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
this.componentInstance = null; | ||
/** | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
this.childLength = 0; | ||
@@ -355,12 +355,12 @@ } | ||
/** | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
var inAttributes = false; | ||
/** | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
var inSkip = false; | ||
@@ -429,6 +429,6 @@ /** | ||
/** | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
var assertCloseMatchesOpenTag = function assertCloseMatchesOpenTag(nodeName, tag) { | ||
@@ -1111,13 +1111,15 @@ if (nodeName !== tag) { | ||
} | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component$$1) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
if (component$$1.type !== 'streaming') { | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component$$1) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component$$1) { | ||
// if so: replace the child with its parent | ||
head.component = component$$1; | ||
return; | ||
} | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component$$1) { | ||
// if so: replace the child with its parent | ||
head.component = component$$1; | ||
return; | ||
} | ||
if (head.next === NIL) { | ||
@@ -1580,7 +1582,7 @@ // insert the new node at the end of the list | ||
/* | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
var attrsArr = data.attrsArr; | ||
@@ -1626,4 +1628,4 @@ var newAttrs = data.newAttrs; | ||
/** | ||
* Actually perform the attribute update. | ||
*/ | ||
* Actually perform the attribute update. | ||
*/ | ||
for (i = 0; i < attrsArr.length; i += 2) { | ||
@@ -1808,5 +1810,5 @@ newAttrs[attrsArr[i]] = attrsArr[i + 1]; | ||
/* | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
var fn = arguments[i]; | ||
@@ -1813,0 +1815,0 @@ formatted = fn(formatted); |
{ | ||
"name": "melody-idom", | ||
"version": "1.2.0-commit.f9b4ed0d", | ||
"version": "1.2.0-update-deps.0+de6e156", | ||
"description": "", | ||
@@ -17,5 +17,3 @@ "main": "./lib/index.js", | ||
}, | ||
"devDependencies": { | ||
"rollup-plugin-babel": "^2.6.1" | ||
} | ||
"gitHead": "de6e1564f77139d39c12925dd4e0f0aa0328308a" | ||
} |
@@ -19,13 +19,13 @@ /** | ||
/** | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an attributes declaration (after | ||
* elementOpenStart, but before elementOpenEnd). | ||
* @type {boolean} | ||
*/ | ||
var inAttributes = false; | ||
/** | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
* Keeps track whether or not we are in an element that should not have its | ||
* children cleared. | ||
* @type {boolean} | ||
*/ | ||
var inSkip = false; | ||
@@ -120,6 +120,6 @@ | ||
/** | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
* Makes sure that tags are correctly nested. | ||
* @param {string} nodeName | ||
* @param {string} tag | ||
*/ | ||
var assertCloseMatchesOpenTag = function(nodeName, tag) { | ||
@@ -126,0 +126,0 @@ if (nodeName !== tag) { |
@@ -46,2 +46,3 @@ /** | ||
notify(): void; | ||
type: String; | ||
} | ||
@@ -48,0 +49,0 @@ |
@@ -28,75 +28,75 @@ /** | ||
/** | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The attributes and their values. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.attrs = createMap(); | ||
/** | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
* An array of attribute name/value pairs, used for quickly diffing the | ||
* incomming attributes to see if the DOM node's attributes need to be | ||
* updated. | ||
* @const {Array<*>} | ||
*/ | ||
this.attrsArr = []; | ||
/** | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
* The incoming attributes for this Node, before they are updated. | ||
* @const {!Object<string, *>} | ||
*/ | ||
this.newAttrs = createMap(); | ||
/** | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
* The key used to identify this node, used to preserve DOM nodes when they | ||
* move within their parent. | ||
* @const | ||
*/ | ||
this.key = key; | ||
/** | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
* Keeps track of children within this node by their key. | ||
* {?Object<string, !Element>} | ||
*/ | ||
this.keyMap = createMap(); | ||
/** | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
* Whether or not the keyMap is currently valid. | ||
* {boolean} | ||
*/ | ||
this.keyMapValid = true; | ||
/** | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the statics for the given node have already been applied. | ||
* | ||
* @type {boolean} | ||
*/ | ||
this.staticsApplied = false; | ||
/** | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
* Whether or not the associated node is or contains a focused Element. | ||
* @type {boolean} | ||
*/ | ||
this.focused = false; | ||
/** | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
* The node name for this node. | ||
* @const {string} | ||
*/ | ||
this.nodeName = nodeName; | ||
/** | ||
* @type {?string} | ||
*/ | ||
* @type {?string} | ||
*/ | ||
this.text = null; | ||
/** | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
* The component instance associated with this element. | ||
* @type {Object} | ||
*/ | ||
this.componentInstance = null; | ||
/** | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
* The length of the children in this element. | ||
* This value is only calculated for raw elements. | ||
* @type {number} | ||
*/ | ||
this.childLength = 0; | ||
@@ -103,0 +103,0 @@ } |
@@ -48,9 +48,12 @@ /** | ||
/* istanbul ignore next */ | ||
(document.createElement('div') | ||
.addEventListener as WhatWGAddEventListener)('test', function() {}, { | ||
get passive() { | ||
supportsPassiveListeners = true; | ||
return false; | ||
}, | ||
}); | ||
(document.createElement('div').addEventListener as WhatWGAddEventListener)( | ||
'test', | ||
function() {}, | ||
{ | ||
get passive() { | ||
supportsPassiveListeners = true; | ||
return false; | ||
}, | ||
} | ||
); | ||
@@ -91,13 +94,15 @@ const BUSY_FRAME_LENGTH = 3; | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
} | ||
if (component.type !== 'streaming') { | ||
// 2: Is the parent of this component already scheduled for an update? | ||
if (getParent(component) === head.component) { | ||
// if so: we don't need to do anything | ||
return; | ||
} | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component) { | ||
// if so: replace the child with its parent | ||
head.component = component; | ||
return; | ||
// 3: Is the component a parent of a node within the queue? | ||
if (getParent(head.component) === component) { | ||
// if so: replace the child with its parent | ||
head.component = component; | ||
return; | ||
} | ||
} | ||
@@ -104,0 +109,0 @@ |
@@ -72,7 +72,7 @@ /** | ||
/* | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
* Checks to see if one or more attributes have changed for a given Element. | ||
* When no attributes have changed, this is much faster than checking each | ||
* individual argument. When attributes have changed, the overhead of this is | ||
* minimal. | ||
*/ | ||
const attrsArr = data.attrsArr; | ||
@@ -124,4 +124,4 @@ const newAttrs = data.newAttrs; | ||
/** | ||
* Actually perform the attribute update. | ||
*/ | ||
* Actually perform the attribute update. | ||
*/ | ||
for (i = 0; i < attrsArr.length; i += 2) { | ||
@@ -330,5 +330,5 @@ newAttrs[attrsArr[i]] = attrsArr[i + 1]; | ||
/* | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
* Call the formatter function directly to prevent leaking arguments. | ||
* https://github.com/google/incremental-dom/pull/204#issuecomment-178223574 | ||
*/ | ||
var fn = arguments[i]; | ||
@@ -335,0 +335,0 @@ formatted = fn(formatted); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285326
0
41
8234
1