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

Execute script tags in the html #65

Open
ZuperZee opened this issue Nov 24, 2021 · 6 comments
Open

Execute script tags in the html #65

ZuperZee opened this issue Nov 24, 2021 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ZuperZee
Copy link
Contributor

ZuperZee commented Nov 24, 2021

What would you like to be added:

Execute script tags in the html

Why is this needed:

Makes it easier to add external dependencies and below code would work

<script>
  function test() {
    // Something
  }
</script>
<button onclick="test">Click me</button>
@ZuperZee
Copy link
Contributor Author

Related to #64

@ZuperZee ZuperZee changed the title Execute scripts tags in the html Execute script tags in the html Nov 24, 2021
@ZuperZee ZuperZee added the enhancement New feature or request label Nov 24, 2021
@samant-rags
Copy link

maybe we can link it to this now - ZuperZee/example-htmlgraphics-html-bundler-include-js@e65e451

@ZuperZee
Copy link
Contributor Author

ZuperZee commented Jun 14, 2022

maybe we can link it to this now - ZuperZee/example-htmlgraphics-html-bundler-include-js@e65e451

This is a feature request for script tags in the HTML/SVG Document section. Javascript has always been able to run in onRender and onInit. External dependencies have also been able to be added with bundlers for a while.

image

ZuperZee/example-htmlgraphics-html-bundler-include-js@e65e451 is just an example of how to use javascript with https://github.com/gapitio/htmlgraphics-html-bundler-template as the bundler template has been written in typescript. Renaming the .ts files to .js, removing tsconfig and the typescript plugin in the rollup files should make the entire bundler handle javascript normally.

@samant-rags
Copy link

@ZuperZee Just checking if this is feasible ?

@ZuperZee
Copy link
Contributor Author

ZuperZee commented Jun 3, 2023

I have not implemented it yet. I don't know if it's feasible. I haven't tested it. Maybe someone else can try to do this?

@ZuperZee ZuperZee added the help wanted Extra attention is needed label Jun 3, 2023
@samant-rags
Copy link

@ZuperZee saw something similar in https://github.com/volkovlabs/volkovlabs-dynamictext-panel if that helps to implement this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants