-
Notifications
You must be signed in to change notification settings - Fork 257
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
Unable to set 'tag' multiple times on entity #719
Comments
I looked at this and noticed if you change the tag name to something other than "filter" then it works fine. I guess "filter" is a valid svg tag name. See https://github.com/witheve/Eve/blob/master/src/renderer.ts#L198 |
Right, this the renderer is choosing the type of the element based on the last valid tag, so when you reverse them, it's taking the span tag instead of the filter tag as the element. The error in the console is unrelated to why the div is not displaying, in the first place (the reason being that it was a filter element, and not a span). |
The error message technically is related in a very convoluted way. It's essentially the renderer throwing it's hands up in the air when it sees a situation it can't sanely resolve (that is, determining whether you meant the element to be a span tagged filter or a filter tagged span). That said, the tooling around the renderer is basically non-existent since it was written long before channels existed for that. Besides fixing the namespace collision issue, which we still need to do, we also need to catch renderer errors and display them in a human-readable way for users. |
If you download this gist: https://gist.githubusercontent.com/anonymous/abe3ec76cbaa3eca39cf54d7c1c3aa50
I am just committing 3 spans to the browser, each with an additional tag. I get the title warning in the console and none of them show up.
I can determine that the reason they don't show up is that they are added to the DOM as "filter" elements, which is actually the second tag on each span. If we reverse the order of the tags on the records, they will get added to the DOM, but the errors still appear in the console.
I thought from this line in the todo example that it was possible to set additional tags on records you commit to the browser. https://github.com/witheve/Eve/blob/master/examples/todomvc.eve#L61
The text was updated successfully, but these errors were encountered: