Skip to content

Conversation

@jails
Copy link

@jails jails commented Mar 29, 2015

Just a minor refactoring to simplify the 'ontext' handler.

@fb55
Copy link
Owner

fb55 commented Mar 29, 2015

I'm not convinced this change is much of an improvement, please motivate such changes: What's the rationale? Nevertheless, I would prefer to move concatenating text sequences upstream and consider this a temporary solution, which does is job.

@fb55 fb55 closed this Mar 29, 2015
@jails
Copy link
Author

jails commented Mar 29, 2015

Since "ontext" behave differently whether the writing is done in a stream way or not, it was just an attempt to make this "temporary solution" easier to understand since I had some troubles to get what use cases the big conditions was related to. I thought that reducing them into a single if (this._activeTextNode) { would be easier to understand but it was just a personnal taste.
Anyhow you're right, having another event like "onbody", "oncontent" or an {eager: true} option would be a way better solution.

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