stages

来源:互联网 发布:晚会抽奖系统php 编辑:程序博客网 时间:2024/05/16 06:30

 

The following are recommended for multistage applications and optional for single-stage applications:

  • Globals:
    • The Mojo.Controller.stageController global is not supported. Instead, use the stageController property of the scene or widget controller.
    • Do not use the document or window globals. Instead, use the document or window property, respectively, of the stage, scene, or widget controller.
  • Do not use document.viewport. Instead, use:
    Mojo.View.getViewportDimensions(targetDocument);

  • Prototype JavaScript library:
    • The $() function is not supported. Instead, use an applicable method from the scene or widget controller, such as get(), select(), or listen(). Be careful with nested functions. Use var controller = this.controller to put the appropriate scene controller in a local variable, making it visible to the nested function.
    • Because a secondary (child) stage does not load its own copy of the Prototype library, not all of its elements and events are extended with every method that appears in the parent document, specifically the Form and Event extension methods. Therefore, instead of $('prefsForm').serialize(), use Form.serialize(this.controller.get('prefsForm')).

 

原创粉丝点击