FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Render objects by calling .toString() on them by joshski · Pull Request #105 · featurist/hyperdom · GitHub

Render objects by calling .toString() on them - #105

Open
joshski wants to merge 4 commits into
masterfrom
render-objects-by-calling-tostring
Open

Render objects by calling .toString() on them#105
joshski wants to merge 4 commits into
masterfrom
render-objects-by-calling-tostring

Conversation

joshski commented Jul 10, 2018

Copy link
Copy Markdown
Member

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 requested a review from refractalize July 10, 2018 08:43
refractalize force-pushed the render-objects-by-calling-tostring branch from 3e169fc to b59f938 Compare July 10, 2018 10:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL