According to the upgrade instructions at Port Extensions to GNOME Shell 49 | GNOME JavaScript :
Meta.Window
Meta.Windowremoves theMeta.MaximizeFlagsfrom the parameters formaximize()andunmaximize(). Alsoget_maximized()is removed and you can useis_maximized()instead. To maximize or unmaximize the window horizontally or vertically, you can call new methodsset_maximize_flags()andset_unmaximize_flags().
I’m not seeing that the method actually exists: (gsl is a helper that evals stdin inside of gnome-shell)
➜ ~ echo "global.display.get_focus_window()['maximized-horizontally']" | gsl
(true, 'false')
➜ ~ echo "global.display.get_focus_window().is_maximized.toString()" | gsl
(true, '"method Meta.Window.is_maximized() {\\n\\t/* wrapper for native symbol meta_window_is_maximized() */\\n}"')
➜ ~ echo "global.display.get_focus_window().is_maximized()" | gsl
(true, 'false')
➜ ~ echo "global.display.get_focus_window().get_maximized_flags()" | gsl
(false, 'TypeError: global.display.get_focus_window().get_maximized_flags is not a function')
➜ ~ echo "global.display.get_focus_window().set_maximized_flags()" | gsl
(false, 'TypeError: global.display.get_focus_window().set_maximized_flags is not a function')
➜ ~ echo "global.display.get_focus_window()['maximized-horizontally'] = true" | gsl
(false, 'Error: Property MetaWindowWayland.maximized-horizontally is not writable')