I need to change location.hash in html5 apps

Hello everyone,

For some exceptional reasons, I need to change the “location.hash” of the page where the html5 application is running.

JS:

window.location.hash = "testing";

Is it possible to do this directly em lua or do I need to create a plugin?

Thank you

You will probably need to do a plugin for this.

Rob

Yes, needs a plugin for this at this time. But probably we should expose window object from browser to Lua.

Thanks for the replies!

I made the js plugin, it was very easy!

// // locationhash\_js.js // window.locationhash\_js = { set: function(string\_arg) { location.hash = string\_arg; }, get: function() { return location.hash; } }; console.log('location hash js is loaded');

Without the plugin, it worked for me. below is the code. 

window.location.hash = ‘panel-’ + id.replace(’#’, ‘’);

You will probably need to do a plugin for this.

Rob

Yes, needs a plugin for this at this time. But probably we should expose window object from browser to Lua.

Thanks for the replies!

I made the js plugin, it was very easy!

// // locationhash\_js.js // window.locationhash\_js = { set: function(string\_arg) { location.hash = string\_arg; }, get: function() { return location.hash; } }; console.log('location hash js is loaded');

Without the plugin, it worked for me. below is the code. 

window.location.hash = ‘panel-’ + id.replace(’#’, ‘’);