I don’t have a definite answer on all the codes, and they do vary from town to town but I don’t believe there would be any code restricting except for the flammability of the trim or frame. The other issues that could be of concern would be, does the window open? If it does the air movement could cause safety issues with carbon monoxide, blowing out a flame or even causing a fire flare up if it becomes windy. Also there will be condensation and grease build up on the glass when cooking. And if placed too close a very hot pot with cold glass can cause the glass to crack.
If you decide to still to do this than I would check with your local jurisdiction on codes and a hydrophobic glass coating would be great to apply to this glass to help keep clean (e.g.. Diamon Fusion)