element.oncanplay = handlerFunction; var handlerFunction = element.oncanplay;
handlerFunction should be either
See the DOM event handlers page for information on working with
canplay event is fired when the user agent can play the media but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
|WHATWG HTML Living Standard
The definition of 'canplay' in that specification.