mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
fix api doc
This commit is contained in:
@@ -644,4 +644,5 @@ cc.EditBox = module.exports = EditBox;
|
||||
* // when you don't need editbox anymore
|
||||
* editbox.node.destroy();
|
||||
* @method destroy
|
||||
* @return {Boolean} whether it is the first time the destroy being called
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ var Base = require('./CCRendererUnderSG');
|
||||
/**
|
||||
* !#en Enum for sprite type.
|
||||
* !#zh Sprite 类型
|
||||
* @enum Sprite.SpriteType
|
||||
* @enum Sprite.Type
|
||||
*/
|
||||
/**
|
||||
* !#en The simple type.
|
||||
|
||||
@@ -369,6 +369,21 @@ var VideoPlayer = cc.Class({
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should
|
||||
* call the destroy method on this component or the associated node explicitly.
|
||||
* Otherwise, the created DOM element won't be removed from web page.
|
||||
* !#zh
|
||||
* 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。
|
||||
* 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。
|
||||
* @example
|
||||
* videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false);
|
||||
* // when you don't need videoplayer anymore
|
||||
* videoplayer.node.destroy();
|
||||
* @method destroy
|
||||
* @return {Boolean} whether it is the first time the destroy being called
|
||||
*/
|
||||
});
|
||||
|
||||
cc.VideoPlayer = module.exports = VideoPlayer;
|
||||
@@ -443,17 +458,3 @@ cc.VideoPlayer = module.exports = VideoPlayer;
|
||||
* @param {Event.EventCustom} event
|
||||
* @param {VideoPlayer} event.detail - The VideoPlayer component.
|
||||
*/
|
||||
|
||||
/**
|
||||
* !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should
|
||||
* call the destroy method on this component or the associated node explicitly.
|
||||
* Otherwise, the created DOM element won't be removed from web page.
|
||||
* !#zh
|
||||
* 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。
|
||||
* 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。
|
||||
* @example
|
||||
* videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false);
|
||||
* // when you don't need videoplayer anymore
|
||||
* videoplayer.node.destroy();
|
||||
* @method destroy
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user