# How to get application start parameters in HTML5 (SOLVED)

**URL:** <https://forum.defold.com/t/how-to-get-application-start-parameters-in-html5-solved/5888>\
**Category:** Questions\
**Created:** [March 4, 2017, 7:04am UTC](https://forum.defold.com/t/how-to-get-application-start-parameters-in-html5-solved/5888 "2017-03-04T07:04:58Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![nicloay](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nicloay/32/1895_2.png) [@nicloay](https://forum.defold.com/u/nicloay)\
**Post date:** [March 4, 2017, 8:40am UTC](https://forum.defold.com/t/how-to-get-application-start-parameters-in-html5-solved/5888/6 "2017-03-04T08:40:41Z")

</div>

thanks i solved the issue.  
So here is how to do that  
1 In game.project defined new section and variable (not sure if it’s mandatory or not). (upd: Add this only if you need default value)

`[test]
value = 5555555`

2 In index.html template instead of one string parameter you need to make an array with string parameters

```lua
engine_arguments: ["{{DEFOLD_ENGINE_ARGUMENTS}}", "--config=test.value=111333"]
```

that’s it.

thanks again!

upd. this is the whole section which i use

```lua
	<script type='text/javascript'>
      var engine_args = []
      {{#HAS_DEFOLD_ENGINE_ARGUMENTS}}
      engine_args.push("{{DEFOLD_ENGINE_ARGUMENTS}}")
      {{/HAS_DEFOLD_ENGINE_ARGUMENTS}}
      var url_params = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
      for(var i = 0; i < url_params.length; i++)
         {
           var new_arg = "--config=url.".concat(url_params[i])
           engine_args.push(new_arg);
         }
      var extra_params = {
        archive_location_filter: function( path ) {
          return ("{{DEFOLD_ARCHIVE_LOCATION_PREFIX}}" + path + "{{DEFOLD_ARCHIVE_LOCATION_SUFFIX}}");
        },
        engine_arguments: engine_args,
        splash_image: "{{DEFOLD_SPLASH_IMAGE}}",
        custom_heap_size: {{DEFOLD_HEAP_SIZE}}
      }

      Module.runApp("canvas", extra_params);

	    /* Fullscreen button */
	    document.getElementById("fullscreen").onclick = function (e) {
	      Module.toggleFullscreen();
	    };
	</script>
```

and then in lua you can use  
`sys.get_config("url.your_param_here")`

---

_[View the full topic](https://forum.defold.com/t/how-to-get-application-start-parameters-in-html5-solved/5888)._
