private void toggle() {
        if (toggle.checked) {
            element().classList.add("completed");
        } else {
            element().classList.remove("completed");
        }
        repository().complete(item(), toggle.checked);
        application().update();
    }
private void toggle ( ) { if ( toggle . checked ) { element ( ) . classList . add ( "completed" ) ; } else { element ( ) . classList . remove ( "completed" ) ; } repository ( ) . complete ( item ( ) , toggle . checked ) ; application ( ) . update ( ) ; }
------------------------------------------------------ event handler