-
Notifications
You must be signed in to change notification settings - Fork 18
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
Compatability with Blazor updating? #1
Comments
Hey @HurricanKai, thanks for your concern/question! I just tested this exact scenario, and you seem to be right that there is some weird things happening in cases like this. It seems that setting the content of an element after having the binded "TestVal", unbinds it and makes TestVal no longer display. I'm gonna look into it to see if I can find a possible fix. |
You'll definitely want to avoid modifying the DOM manually when using Blazor. In Blazor's JS Interop documentation it says as much.
Later in the documentation, it states that they would only recommend modifying an element if the element started out empty. That way Blazor doesn't try to diff it. Perhaps moving forward, this package shouldn't support updating the DOM, and should only support getting data/information from the DOM, since Blazor is lacking in that regard. |
I use this project specifically for DOM manipulation, as I'm making a Chrome extension with Blazor for manipulating web pages. |
I can definitely see this use case as you just pointed out. Being able to manipulate DOM's easily in Chrome extensions is really powerful. I do agree that supporting both scenarios would make a lot of sense. |
Is this compatible with Blazor updating the DOM? Wouldn't that override all changes?
For example:
What will actually be displayed? (I'm not at home and I'm really interested into this, maybe you can answer, else I'll try it out later)
The text was updated successfully, but these errors were encountered: