Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

change svelte bind variable from js file

Gos Tsotetsi answered on April 3, 2023 Popularity 1/10 Helpfulness 3/10

Contents


More Related Answers

  • Svelte import variable

  • change svelte bind variable from js file

    0

    This is not directly possible with Svelte. The reason for this is because those variables do not exists on the global scope of your document, they are encapsulated by the browser into the app and shielded from outside interference.

    One way around this would be to explicitly define a way to do this 

    Now you can do window.setName('test') in the console and it will change the value of name 

    Popularity 1/10 Helpfulness 3/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Apr 03 2023
    Gos Tsotetsi
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.