mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 05:46:58 +00:00
[DOM] Stop speech synthesis if the originating document is closed.
This commit is contained in:
@@ -293,6 +293,12 @@ SpeechSynthesis::ForceEnd()
|
||||
}
|
||||
}
|
||||
|
||||
void SpeechSynthesis::DisconnectFromOwner() {
|
||||
Pause();
|
||||
Cancel();
|
||||
DOMEventTargetHelper::DisconnectFromOwner();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SpeechSynthesis::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData)
|
||||
|
||||
@@ -58,6 +58,8 @@ public:
|
||||
void GetVoices(nsTArray< RefPtr<SpeechSynthesisVoice> >& aResult);
|
||||
|
||||
void ForceEnd();
|
||||
|
||||
void DisconnectFromOwner() override;
|
||||
|
||||
IMPL_EVENT_HANDLER(voiceschanged)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user