TEIC / CETEIcean

TEI in HTML5 Custom Elements
BSD 2-Clause "Simplified" License
164 stars 36 forks source link

Behavior functions are being called with the wrong `this`. #37

Closed dubinsky closed 4 years ago

dubinsky commented 4 years ago

This breaks behaviors that assume that their this is CETEI; there is one like that in defaultBehavoirs: endnotes.

(This will auto-fix in `/tutorial/js/CETEI.js once results of the npm build are checked in - which seems to have not been happening for a while in /tutorial...)

hcayless commented 4 years ago

The point of the refactoring @raffazizzi did was to introduce better code isolation (so, e.g. behaviors wouldn't have the full set of CETEI methods available to them. It seems a bit sad to break that. But on the other hand, it does seem like the CETEI DOM ought to be available to behaviors. I'm about to release a patch that does just that. Thanks for bringing this to our attention!