NikolayRys / Likely

The social sharing buttons that aren’t shabby
ISC License
395 stars 61 forks source link

Deprecation warning for data attributes unknown on service level #182

Closed sashotoster closed 4 years ago

sashotoster commented 4 years ago

Related to #172 (initial change for 2.5)

Looks like in 'addAdditionalParamsToUrl' we only iterate widget's own data attributes (at least I couldn't find a scenario where this.options.data is not undefined which might be a separate issue to investigate).

So when it comes to common data attributes (data-url, data-title), we should probably only mark them as 'known' if having them specified on service level is officially supported and has an effect on the outcome (so if it's actually used by service in which case it also overrides url / title specified on parent level).

For example, facebook service doesn't use 'title' when constructing a share url, which results in: