The jQuery dependency here is rather unnecessary. As many projects want to get rid of jQuery I think it would make sense to update this module.

As this module has a dependency on theme_breakpoint_js you will also need this patch to get rid of jQuery: https://www.drupal.org/project/theme_breakpoints_js/issues/2974508

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arthur_lorenz created an issue. See original summary.

mxh’s picture

Status: Needs review » Needs work

Thanks for the patch, seems a little work is needed:

1.
var ad_entity_id = JSON.stringify(container.dataset.adEntity);

Is a wrap by JSON.stringify necessary here?

2.
element.dataset is not compatible with IE < 11. We need at least compatibility with IE 10, i.e. ECMAScript 5 (5.1 is ok too). dataset does not belong to it. See also https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attri....
Using a proper polyfill would be ok too.

Please make sure the whole patch is conform to ECMAScript <= 5.1.

arthur_lorenz’s picture

Good catch, fixed both issues!

mxh’s picture

Status: Needs work » Needs review

  • mxh committed 5c2dfa4 on 8.x-1.x
    Issue #2974510 by arthur_lorenz, mxh: Get rid of jQuery dependency
    
mxh’s picture

Above commit includes heavily refactored JS code. This should be well tested before the next release, but I guess there's not enough time for it.
Will try to test as far as I can. Test contributions (manually or automated) are highly appreciated.

  • mxh committed f2be2b6 on 8.x-1.x
    Issue #2974510 by arthur_lorenz, mxh: Get rid of jQuery dependency /...
mxh’s picture

Status: Needs review » Fixed

Included in 1.0-beta17. Feel free to re-open if something is missing or wrong.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.