The LayerList widget in 3.15 has some additional functionality, including showing the legend. However, the legend doesn't get updated when the checkbox on a layer is clicked. It will only update when the map is zoomed in or out. It will not update if the map is panned.
JS Bin - Collaborative JavaScript Debugging