Comment 2 for bug 1815968

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Hello, I was looking into this some more today, and noticed something.

If I set a breakpoint in firefox for the line
document.body.appendChild(audio);

Then the audio file plays. I wonder if that is because it delays the next line, which is removing the audio element?

document.body.removeChild(audio);

Maybe there was a behavior change, at one time it worked to append and then immediately remove the audio element... but now the element isn't around long enough to actually play the audio?

Any javascript guru's know of a way to delay the removeChild until after the audio has a chance to fully play.

https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/web/js/dojo/openils/Util.js;h=e3588ae61f006ead72029a357112a77eeda6b3d2;hb=686ccf782a2dba2bb6ba1abf82edcee4590b1153#l362