add element parameter for gui.append method

The user might want to have a reference to the parent they're appending to. So the function sig should be something like function(frag, e, window, nw_win)