Web pages can use Javascript to access engine functions, and it works like this: when a page is being rendered in the embedded browser, there exist special objects that can be used to invoke underlying engine functions. The existence of these objects is a mark that the page runs in engine, as opposed to running in a normal browser outside the engine. So you can actually write pages that work both inside and outside, for example - when used inside the game, the script can control game objects directly, whereas in off-game mode it could invoke some server methods instead.
Obviously it can't be used for everything, but for things like setting up the production queue it would be cool if you could get the same controls in-game and in a browser when you access your base off-game at work.
Technically, the API exposed to html scripts should allow what normal UI controls allow to player. Which can be a quite clean design, since the UI is done via html in the first place.
There's a question if the scripting couldn't be used to gain unfair advantage, but IMO the game should be designed in a way that it doesn't matter - in fact, creation of better and fitter interfaces should be encouraged.