Open smileBeda opened 3 years ago
The default implementation of below does not respect the ignoreReturns: true:
ignoreReturns: true
$( window ).on('load', function() { Countable.on( document.getElementById('my_area'), counter => console.log(counter), { ignoreReturns: true } ) });
Doing so, the all property still counts returns (enter/newline)
all
Thus, we always get a wrong character count when doing this:
$( window ).on('load', function() { Countable.on( document.getElementById('my_area'), counter => document.getElementById('my_result').innerHTML = counter.all.toString(), { ignoreReturns: true } ) });
The doc clearly states that we shall use that option to Ignore returns when calculating the all property.
Ignore returns when calculating the all property.
Suggestions?
The default implementation of below does not respect the
ignoreReturns: true
:Doing so, the
all
property still counts returns (enter/newline)Thus, we always get a wrong character count when doing this:
The doc clearly states that we shall use that option to
Ignore returns when calculating the all property.
Suggestions?