Skip to content

Conversation

@joshski
Copy link
Member

@joshski joshski commented Jul 10, 2018

I would like to pass objects into hyperdom.html() and have hyperdom call .toString() on those objects.

Hyperdom calls JSON.stringify() when it doesn't know what else to do with an object. This might be reasonable behaviour for primitive objects, so this change preserves that behaviour, but calls .toString() on user-defined types that implement .toString()

@joshski joshski requested a review from refractalize July 10, 2018 08:43
@refractalize refractalize force-pushed the render-objects-by-calling-tostring branch from 3e169fc to b59f938 Compare July 10, 2018 10:36
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.

3 participants