Obsolete since Gecko 11 (Firefox 11 / Thunderbird 11 / SeaMonkey 2.8)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。

摘要

An event handler for the MozBeforePaint event. This is used in concert with the window.mozRequestAnimationFrame() method to perform smooth, synchronized animations from JavaScript code.

句法

window.onmozbeforepaint = funcRef;
						
  • funcRef is the handler function.

范例

window.mozRequestAnimationFrame() 范例。

注意事项

This event fires immediately before the browser window is repainted, if the event has been requested by one or more scripts calling window.mozRequestAnimationFrame() . The event handler receives as an input parameter an event whose timeStamp property is the time, in milliseconds since epoch, that is the "current time" for the current animation frame. This time is the same for all animations being run in the same browser window, including those using the window.mozRequestAnimationFrame() 方法, CSS transitions , and SMIL animations.

规范

Not part of a specification.

元数据

  • 最后修改:
  1. Window
  2. 特性
    1. applicationCache
    2. caches
    3. closed
    4. console
    5. controllers
    6. crypto
    7. customElements
    8. defaultStatus
    9. devicePixelRatio
    10. dialogArguments
    11. 目录
    12. document
    13. event
    14. frameElement
    15. frames
    16. fullScreen
    17. history
    18. indexedDB
    19. innerHeight
    20. innerWidth
    21. isSecureContext
    22. isSecureContext
    23. length
    24. localStorage
    25. location
    26. locationbar
    27. menubar
    28. mozAnimationStartTime
    29. mozInnerScreenX
    30. mozInnerScreenY
    31. mozPaintCount
    32. 名称
    33. navigator
    34. onabort
    35. onafterprint
    36. onanimationcancel
    37. onanimationend
    38. onanimationiteration
    39. onappinstalled
    40. onauxclick
    41. onbeforeinstallprompt
    42. onbeforeprint
    43. onbeforeunload
    44. onblur
    45. oncancel
    46. oncanplay
    47. oncanplaythrough
    48. onchange
    49. onclick
    50. onclose
    51. oncontextmenu
    52. oncuechange
    53. ondblclick
    54. ondevicelight
    55. ondevicemotion
    56. ondeviceorientation
    57. ondeviceorientationabsolute
    58. ondeviceproximity
    59. ondragdrop
    60. ondurationchange
    61. onended
    62. onerror
    63. onfocus
    64. ongamepadconnected
    65. ongamepaddisconnected
    66. ongotpointercapture
    67. onhashchange
    68. oninput
    69. oninvalid
    70. onkeydown
    71. onkeypress
    72. onkeyup
    73. onlanguagechange
    74. onload
    75. onloadeddata
    76. onloadedmetadata
    77. onloadend
    78. onloadstart
    79. onlostpointercapture
    80. onmessage
    81. onmessageerror
    82. onmousedown
    83. onmouseenter
    84. onmouseleave
    85. onmousemove
    86. onmouseout
    87. onmouseover
    88. onmouseup
    89. onmozbeforepaint
    90. onpaint
    91. onpause
    92. onplay
    93. onpointercancel
    94. onpointerdown
    95. onpointerenter
    96. onpointerleave
    97. onpointermove
    98. onpointerout
    99. onpointerover
    100. onpointerup
    101. onpopstate
    102. onrejectionhandled
    103. onreset
    104. onresize
    105. onscroll
    106. onselect
    107. onselectionchange
    108. onselectstart
    109. onstorage
    110. onsubmit
    111. ontouchcancel
    112. ontouchstart
    113. ontransitioncancel
    114. ontransitionend
    115. onunhandledrejection
    116. onunload
    117. onuserproximity
    118. onvrdisplayactivate
    119. onvrdisplayblur
    120. onvrdisplayconnect
    121. onvrdisplaydeactivate
    122. onvrdisplaydisconnect
    123. onvrdisplayfocus
    124. onvrdisplaypointerrestricted
    125. onvrdisplaypointerunrestricted
    126. onvrdisplaypresentchange
    127. onwheel
    128. opener
    129. origin
    130. outerHeight
    131. outerWidth
    132. pageXOffset
    133. pageYOffset
    134. parent
    135. 性能
    136. personalbar
    137. pkcs11
    138. screen
    139. screenLeft
    140. screenTop
    141. screenX
    142. screenY
    143. scrollbars
    144. scrollMaxX
    145. scrollMaxY
    146. scrollX
    147. scrollY
    148. self
    149. sessionStorage
    150. sidebar
    151. speechSynthesis
    152. status
    153. statusbar
    154. toolbar
    155. top
    156. visualViewport
    157. window
  3. 方法
    1. alert()
    2. atob()
    3. back()
    4. blur()
    5. btoa()
    6. cancelAnimationFrame()
    7. cancelIdleCallback()
    8. captureEvents()
    9. clearImmediate()
    10. clearInterval()
    11. clearTimeout()
    12. close()
    13. confirm()
    14. convertPointFromNodeToPage()
    15. convertPointFromPageToNode
    16. createImageBitmap()
    17. dump()
    18. fetch()
    19. find()
    20. focus()
    21. forward()
    22. getAttention()
    23. getComputedStyle()
    24. getDefaultComputedStyle()
    25. getSelection()
    26. home()
    27. matchMedia()
    28. minimize()
    29. moveBy()
    30. moveTo()
    31. open()
    32. openDialog()
    33. postMessage()
    34. print()
    35. prompt()
    36. queueMicrotask()
    37. releaseEvents()
    38. requestAnimationFrame()
    39. requestFileSystem()
    40. requestIdleCallback()
    41. resizeBy()
    42. resizeTo()
    43. restore()
    44. routeEvent()
    45. scroll()
    46. scrollBy()
    47. scrollByLines()
    48. scrollByPages()
    49. scrollTo()
    50. setCursor()
    51. setImmediate()
    52. setInterval()
    53. setTimeout()
    54. showModalDialog()
    55. sizeToContent()
    56. stop()
    57. updateCommands()
  4. 事件
    1. event
    2. afterprint
    3. beforeprint
    4. beforeunload
    5. blur
    6. copy
    7. cut
    8. DOMContentLoaded
    9. error
    10. focus
    11. hashchange
    12. languagechange
    13. load
    14. message
    15. messageerror
    16. offline
    17. online
    18. orientationchange
    19. pagehide
    20. pageshow
    21. paste
    22. popstate
    23. rejectionhandled
    24. storage
    25. unhandledrejection
    26. unload
    27. vrdisplayconnect
    28. vrdisplaydisconnect
    29. vrdisplaypresentchange