-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/real incremental diff based rendering #411
Bugfix/real incremental diff based rendering #411
Conversation
stroke fixed |
Namespaced attributes are being tracked in a separate branch #416 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firefix and IE11 broken therefore all the browser that uses the custom element polyfill are broken
src/js/abstract/base-component.js
Outdated
|
||
if (ENV !== PROD) { | ||
lifecycleLogger(this.logLifecycle)(`willRenderCallback -> ${this.nodeName}#${this._id} <- initial: ${!initial}`); | ||
lifecycleLogger(this.logLifecycle)(`willRenderCallback -> ${this.nodeName}#${this._id} <- initial: ${!notInitial}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not notInitial is more readable?
src/js/abstract/base-component.js
Outdated
* Monkey patch `childNodes` API to re-rendering. | ||
*/ | ||
get childNodes() { | ||
if (this._morphing || !this._hasTemplate || !this._hasRendered) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe isMorphing ?
src/js/abstract/base-component.js
Outdated
*/ | ||
// @todo: ideally this code is only attached during morphing phase | ||
function isSameNodeOnce(node) { | ||
node.isSameNode = isSameNodeStopMorph; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node.isSameNode = () => true;
src/js/abstract/base-component.js
Outdated
/** | ||
* Monkey patch `childNodes` API to re-rendering. | ||
*/ | ||
get childNodes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LucaMele
This block breaks the Web-Component polyfill, they also patch querySelector
by accessing childNodes
.
The polyfill is really doing allot of stuff, patching various DOM API's and I think we should get aware of it. Otherwise get into big trouble...
2f1e347
to
28981a5
Compare
@@ -0,0 +1,173 @@ | |||
import morph from './morph'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may will create it's own npm package for morphin in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a todo in the file directly and also WHY we did copy/modify the nanomorph one
@LucaMele |
Successfully tested in Edge 15 and 16 too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested attr change on
Firefox, Chrome and Safari IOS. All good.
and runs on IE11 :)
@AndyOGo ur a coder GOD |
@LucaMele hehe, thanks for your very friendly commendation 😃 |
Fixes #408
fixes #416
Changes proposed in this pull request:
installsWe morph by ourselvesnanomorph
<input />
states likefocus
Type of change
How Has This Been Tested?
Needs tests in every browser.
SVG use does not repaint in firefox upon second update choojs/nanomorph#101
Checklist: