AlierFramework.js モジュール

モジュールパス: /alier_sys/AlierFramework.js

概要


AlierFramework.js はフレームワーク機能を一括でインポートするためのモジュールで、Alier.View の設定などを行います。

利用方法


Alier.import() を使ってモジュールをインポートします。通常では、モジュールオブジェクトが持つプロパティを window にコピーするだけです。

const module_object = await Alier.import("/alier_sys/AlierFramework.js");
  // Alier.import は非同期関数のため、結果を await する必要がある
Object.assign(globalThis, module_object);
  // モジュールの展開方法 1:  Object.assign を利用する方法
// Object.defineProperties(globalThis, Object.getOwnPropertyDescriptors(module_object));
  // モジュールの展開方法 2:  Object.defineProperties と Object.getOwnPropertyDescriptors を利用する方法

効果


  1. 以下のモジュールがグローバルにインポートされます:
  2. [副作用] カスタム HTML 要素 <alier-app-view> が、ViewElement をコンストラクタとして window に登録されます
  3. [副作用] Alier.View<alier-app-view> が設定されます
  4. [副作用] Alier.Viewdocument.body の子要素として追加されます

関数


setupAlier()

  • Alier フレームワークの初期化を行います。