C3: [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.

Created on 7 Aug 2017  路  2Comments  路  Source: c3js/c3

Expected Behavior

c3.js should be optimized for performance

Current Behavior

Chrome throws warning
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

Possible Solution
Change
addEventListener(eventType, method); to
addEventListener(eventType, method. {passive: true});

Steps to Reproduce (for bugs)
Create a chart and check the console.

Environment
c3.js version: 0.4.13
Browser name and version: Chrome 59.0.3071.115

Most helpful comment

Worth noticing that one needs to have their Chrome console set to output Verbose level to see [Violation] outputs, but yes it seems a good point of optimization.

All 2 comments

Worth noticing that one needs to have their Chrome console set to output Verbose level to see [Violation] outputs, but yes it seems a good point of optimization.

Has there been any progress on this issue?

Was this page helpful?
0 / 5 - 0 ratings