Passing arguments to javascript file, how does it work?

Posted by vietean on Stack Overflow See other posts from Stack Overflow or by vietean
Published on 2011-11-12T09:06:35Z Indexed on 2011/11/12 9:51 UTC
Read the original article Hit count: 140

Filed under:

From the tutorial ScriptJSONOptions of FirebugLite page, I found the below:


Script JSON options

It is possible to set options using a JSON object inside the linked script:

<script type="text/javascript" 
src="https://getfirebug.com/firebug-lite.js">
{
    overrideConsole: false,
    startInNewWindow: true,
    startOpened: true,
    enableTrace: true
}
</script>

It means that we can pass the arguments to javascript file.
But I don't know how does it work?

Update:

My question is how to get the arguments inside the js file?

P/S:

I also looked into code, but I could not find the code is implemented this feature.

© Stack Overflow or respective owner

Related posts about JavaScript