What is a proper way to add a list of pages (type: dropdown-pages) using Customizer JS API?
Currently, I have this code but it does not display a control:
api.control.add( new api.Control( 'custom-control', {
type: 'dropdown-pages',
section: 'custom-section',
setting: new wp.customize.Setting( 'custom-control', '0' ),
label: 'Select Page'
} ) );
If I change the type to, for example, text then the control is shown in the section.