Android Browser Versioning Event Continues Shooting

The following is a simple html when viewed in an android browser (nexus one), leads to a continuous chain of chainchange events when you change the orientation of the phone only once.

<html><body>
<script type="text/javascript">
window.addEventListener("orientationchange",function(){alert("test");},false);
</script>
</body></html>
Can someone explain and suggest some workaround?
+3
source share
3 answers

changechange : , . , , , - .

( - , while(1) alert("");). JavaScript? DoS , . Opera - , , , , .)

+4

, Falmarri , . , , . .

0

These devices seem to trigger the "changechange" event before the window is resized to reflect the new orientation.

How to fix this: github

0
source

Source: https://habr.com/ru/post/1771971/


All Articles