Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

dubinsky
Copy link
Contributor

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.jsonce results of thenpm` build are checked in - which seems to have not been happening for a while in `/tutorial`...)

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`...)

resolves #36
dubinsky added a commit to opentorah/alter-rebbe.org that referenced this pull request Jun 18, 2020
…ions;

- switch to the current CETEIcean;
- remove old `CETEI.js`;
dubinsky added a commit to opentorah/alter-rebbe.org that referenced this pull request Jun 18, 2020
@dubinsky dubinsky changed the title Behavior function are being called with the wrong this. Behavior functions are being called with the wrong this. Jun 18, 2020
@hcayless
Copy link
Member

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!

@hcayless hcayless closed this Jun 18, 2020
dubinsky added a commit to opentorah/alter-rebbe.org that referenced this pull request Jun 21, 2020
…ions;

- switch to the current CETEIcean;
- remove old `CETEI.js`;
@dubinsky dubinsky mentioned this pull request Oct 7, 2020
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants