The deleteMedium() method of the MediaList interface removes from this MediaList the given media query.
deleteMedium(medium)mediumA string containing the media query to remove from the list.
None (undefined).
NotFoundError DOMExceptionThrown when the media query to remove is not in the list.
The following removes the media query print from the MediaList associated with the first stylesheet applied to the current document.
const stylesheet = document.styleSheets[0];
stylesheet.media.deleteMedium("print");