Assign color profile Illustrator

Does anyone know if it is possible to assign a named color profile, or even the working profile to an open document. Maybe it is possible in Javascript?

If so, any leads?

Thanks

I think this is possible in both. You need to do this with the app’s colour management. Define your colour management and save to *.csf file you can then load this with script setting this to nothing will turn management off.