-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Add support for Shadow DOM #5585
Conversation
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.
Is it the only changes needed to support shadow DOM?
src/core/core.helpers.js
Outdated
@@ -481,8 +481,15 @@ module.exports = function() { | |||
|
|||
return padding.indexOf('%') > -1 ? parentDimension / parseInt(padding, 10) : parseInt(padding, 10); | |||
}; | |||
helpers.getParentNode = function(domNode) { |
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.
This method should be private (and at some point will be moved in the dom platform implementation):
/**
* @private
*/
helpers._getParentNode = function(node) {
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.
Done
return; | ||
} | ||
|
||
var shadow = div.attachShadow({mode: 'closed'}); |
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.
Do we reach this point when tests are executed by our CI / Travis?
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.
Yes in Chrome, not in Firefox.
IMO, yes since other features are working correctly in my app. |
Thanks @reda-alaoui |
Is this fix already available in the latest stable version? |
Update package.json. Bump chart.js version to 2.7.3. We're using vue-chartjs in a web component. Shadow DOM support was added in Version 2.7.3 chartjs/Chart.js#5585 .
Update package.json. Bump chart.js version to 2.7.3. We're using vue-chartjs in a web component. Shadow DOM support was added in Version 2.7.3 chartjs/Chart.js#5585 . ### Fix or Enhancement? - [ ] All tests passed ### Environment - OS: Write here - NPM Version: Write here
Update package.json. Bump chart.js version to 2.7.3. We're using vue-chartjs in a web component. Shadow DOM support was added in Version 2.7.3 chartjs/Chart.js#5585 . ### Fix or Enhancement? - [ ] All tests passed ### Environment - OS: Write here - NPM Version: Write here
Update package.json. Bump chart.js version to 2.7.3. We're using vue-chartjs in a web component. Shadow DOM support was added in Version 2.7.3 chartjs/Chart.js#5585 . ### Fix or Enhancement? - [ ] All tests passed ### Environment - OS: Write here - NPM Version: Write here
https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/host
Fix #5583