स्थगित घटना
उदाहरण
जब ब्राउज़र को जानबूझकर मीडिया डेटा नहीं मिल रहा हो, तो JavaScript निष्पादित करें:
<video onsuspend="myFunction()">
परिभाषा और उपयोग
ऑनसस्पेंड घटना तब होती है जब ब्राउज़र को जानबूझकर मीडिया डेटा नहीं मिल रहा है।
यह घटना तब होती है जब मीडिया की लोडिंग को निलंबित कर दिया जाता है (जारी रहने से रोका जाता है)। यह तब हो सकता है जब डाउनलोड पूरा हो गया हो, या क्योंकि इसे किसी कारण से रोक दिया गया हो।
युक्ति: मीडिया लोडिंग प्रक्रिया में किसी प्रकार की गड़बड़ी होने पर होने वाली संबंधित घटनाएं हैं:
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से ईवेंट का समर्थन करता है।
Event | |||||
---|---|---|---|---|---|
onsuspend | Yes | 9.0 | Yes | Yes | Yes |
वाक्य - विन्यास
एचटीएमएल में:
<element onsuspend="myScript">
जावास्क्रिप्ट में:
object.onsuspend = function(){myScript};
जावास्क्रिप्ट में, addEventListener() विधि का उपयोग करना:
object.addEventListener("suspend", myScript);
नोट: AddEventListener () विधि Internet Explorer 8 और पुराने संस्करणों में समर्थित नहीं है।
टेक्निकल डिटेल
बुलबुले: | नहीं |
---|---|
रद्द करने योग्य: | नहीं |
घटना प्रकार: | आयोजन |
समर्थित HTML टैग: | <ऑडियो> और <वीडियो> |
डोम संस्करण: | स्तर 3 की घटनाएँ |