(1) Rewriting of page scripts in V17.2

■Dialogue components affected and the dialogue components that will be supported

・The dialogue components added to the package in V17.2 are as follows.

・If you are using native API dialogs in your page scripts, you will need to rewrite your scripts to call the SkyVisualEditor original dialogs.

Dialogue type

【Before】

Native API Dialogs

【After】SkyVisualEditor original dialogs

Dialogs methodIF
Confirmwindow.confirm(message)showSveConfirmDialog(title, message)

title: String

message: String

return: Selection result string("OK"or'Cancel')

Alertwindow.alert(message)showSveAlertDialog(title, message)

title: String

message: String

return : fixed string("OK")

Promptwindow.prompt(message)showSvePromptDialog(title, message)

title: String

message: String

return : Text string entered by the user

■Specific examples of page script changes

・Here are some specific examples of how page scripts can be used in dialogue patterns.

【Before】

// confirm
function confirmDialogPettern1() {
	if (confirm('Do you wish to execute it?')) {
		// Business Logic
	}
};

// alert
function alertDialogPettern1() {
	alert('Execute the process');
 	// Business Logic 
};

// prompt
function promptDialogPettern1() {
	let inputtext = prompt('Please enter a string');
  	// Business Logic
};

【After】

// confirm
async function confirmDialogPettern1() {
	if (await showSveConfirmDialog('', 'Do you wish to execute it?') == 'OK') {
       // Business Logic
    };
};

// alert
async function alertDialogPettern1() {
	await showSveAlertDialog('', 'Execute the process');
  	// Business Logic  
};

// prompt
async function promptDialogPettern1() {
   let sign = await showSvePromptDialog('', 'Please enter a string');
   // Business Logic
};