Method enableAutoResize is deprecated from 4.0 version.
There is no such method for ribbon, but how do you going to use it? Could you describe this situation?
I got using this snippet in my html page. Works when you load the page and then resize the window to be bigger or smaller.
The ribbon doesn’t stay the same size as the when the window first loaded, it now resizes to fit the window.
window loads, loading the ribbon to be the size of the window and then I drag the window making it bigger (longer) and then ribbon stays the same width size. See attached image