弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the 兼容性表格 at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

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

TransitionEvent.initTransitionEvent() method Initializes a transition event created using the deprecated Document.createEvent("TransitionEvent") 方法。

TransitionEvent created that way are untrusted.

注意: this method has been dropped during the standard process. It has been deprecated and is in the progress of been removed from most implementation. Do not use it anymore, use the standard constructor, TransitionEvent() , to create a synthetic TransitionEvent

句法

transitionEvent.initTransitionEvent(typeArg, canBubbleArg, cancelableArg, transitionNameArg, elapsedTimeArg);
					

参数

typeArg
DOMString identifying the specific type of transition event that occurred. The following value is allowed:
含义
transitionend The transition completed.
canBubbleArg
布尔 flag indicating if the event can bubble ( true ) 或不 ( false) .
cancelableArg
布尔 flag indicating if the event associated action can be avoided ( true ) 或不 ( false) .
transitionNameArg
DOMString containing the name of the CSS property associated with the transition. This value is not affected by the transition-delay 特性。
elapsedTimeArg
Is float giving the amount of time the transition has been running, in seconds, when this event fired.

规范

This method is non-standard and not part of any specification, though it was present in early drafts of CSS Transitions .

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
initTransitionEvent 弃用 非标 Chrome No
不支持 No
Removal version unknown.
Edge 12 — 79 Firefox 6 — 23 IE 10 Opera No
不支持 No
Removal version unknown.
Safari Yes WebView Android No
不支持 No
Removal version unknown.
Chrome Android No
不支持 No
Removal version unknown.
Firefox Android 6 — 23 Opera Android No
不支持 No
Removal version unknown.
Safari iOS Yes Samsung Internet Android No
不支持 No
Removal version unknown.

图例

完整支持

完整支持

不支持

不支持

非标。预期跨浏览器支持较差。

非标。预期跨浏览器支持较差。

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

另请参阅

元数据

  • 最后修改:
  1. CSS Object Model
  2. TransitionEvent
  3. 构造函数
    1. TransitionEvent()
  4. 特性
    1. elapsedTime
    2. pseudoElement
    3. transitionName
  5. 方法
    1. initTransitionEvent()
  6. 继承:
    1. 事件
  7. Related pages for CSSOM
    1. AnimationEvent
    2. CSS
    3. CSSConditionRule
    4. CSSGroupingRule
    5. CSSKeyframeRule
    6. CSSKeyframesRule
    7. CSSMediaRule
    8. CSSNamespaceRule
    9. CSSPageRule
    10. CSSRule
    11. CSSRuleList
    12. CSSStyleDeclaration
    13. CSSStyleRule
    14. CSSStyleSheet
    15. CSSSupportsRule
    16. CaretPosition
    17. LinkStyle
    18. MediaQueryList
    19. MediaQueryListListener
    20. Screen
    21. StyleSheet
    22. StyleSheetList

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1