Skip to content

Spread attributes behaves not like compiled #3357

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

Closed
cvlab opened this issue Aug 5, 2019 · 3 comments
Closed

Spread attributes behaves not like compiled #3357

cvlab opened this issue Aug 5, 2019 · 3 comments

Comments

@cvlab
Copy link
Contributor

cvlab commented Aug 5, 2019

Describe the bug
This bug is already described in a few places, #3067, #1434, #3235, I added comment at the end of #1434

Expected behavior
In special, spread attributes to be deleted on undefined or null values.
In general, spread attributes to behave similar to not spread (at runtime).

Severity
Low to medium.

Additional context
Some attributes are deleted with node.removeAttribute() when the value is undefined or null (but not spread attributes)
spread attributes use set_attributes

node[key] = attributes[key];

for undefined and null

(worst case <input { ...{ size: undefined} } >)

Before #3346 data attributes has to use dataset (but not spread attributes).

Maybe some other rules are not used for spread attr?

Thank you!

@Conduitry
Copy link
Member

#1434 was for non-spread attributes. Spread attributes need to be handled differently, because we can't just look up at compile time whether we should be using an attribute or a property.

Is there any difference between this issue and #3067 besides the amount of additional information present? Could this have been a comment on that issue?

@cvlab
Copy link
Contributor Author

cvlab commented Aug 7, 2019

@Conduitry #1434 was for both spread and non-spread. I commented there.

I opened this issue because of idea to check all cases of inconsistency between compiled and runtime spread attributes rules.

Even better is to prevent inconsistency, but this may not be possible.

@Conduitry
Copy link
Member

Duplicate of #3067.

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

No branches or pull requests

2 participants