Skip to content
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

Implement support of @js directive #915

Closed
wants to merge 26 commits into from
Closed

Implement support of @js directive #915

wants to merge 26 commits into from

Conversation

exyi
Copy link
Member

@exyi exyi commented Dec 2, 2020

It renders an inline script that imports the module and register it into dotvvm.

When in a page, it is added into the serialized JSON.
When in a control, it renders a binding handler with the specified module

Mylan719 and others added 8 commits November 25, 2020 02:43
…using the same module.

Test sample with symulated markup control.
…ort for named comand registration from the view.
It renders an inline script that imports the module and register it into dotvvm.

When in a page, it is added into the serialized JSON.
When in a control, it renders a binding handler with the specified module
@Mylan719 Mylan719 self-assigned this Dec 3, 2020
@quigamdev
Copy link
Contributor

This PR also solves #899.

The bug is that DotvvmMarkupControl has the context of the parent view, only it's content should get the "inner context".
Previous change that changed inheritance of ResolvedTreeRoot to ResolvedControl broke how it was working before
we use the control unique id.

The id also has to be used in any commands invoking the module jsCommands. We can however reuse the infra for standard commands that also require control ID.
Only issue could be when a command would migrate from one markup control to another,
but that's considered unlikely given we add support for invoking _control.Command from staticCommands
@exyi
Copy link
Member Author

exyi commented Mar 3, 2021

Succeeded by #935

@exyi exyi closed this Mar 3, 2021
@exyi exyi deleted the js-directives branch August 22, 2021 19:23
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.

None yet

3 participants