Search in sources :

Example 1 with SubscriptionPrototype

use of com.github.anba.es6draft.runtime.objects.observable.SubscriptionPrototype in project es6draft by anba.

the class Realm method initializeObservableModule.

/**
     * <h1>Extension: Observable</h1>
     * 
     * @param realm
     *            the realm instance
     */
private static void initializeObservableModule(Realm realm) {
    EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
    // allocation phase
    ObservableConstructor observableConstructor = new ObservableConstructor(realm);
    ObservablePrototype observablePrototype = new ObservablePrototype(realm);
    SubscriptionPrototype subscriptionPrototype = new SubscriptionPrototype(realm);
    SubscriptionObserverPrototype subscriptionObserverPrototype = new SubscriptionObserverPrototype(realm);
    // registration phase
    intrinsics.put(Intrinsics.Observable, observableConstructor);
    intrinsics.put(Intrinsics.ObservablePrototype, observablePrototype);
    intrinsics.put(Intrinsics.SubscriptionPrototype, subscriptionPrototype);
    intrinsics.put(Intrinsics.SubscriptionObserverPrototype, subscriptionObserverPrototype);
    // initialization phase
    observableConstructor.initialize(realm);
    observablePrototype.initialize(realm);
    subscriptionPrototype.initialize(realm);
    subscriptionObserverPrototype.initialize(realm);
}
Also used : SubscriptionObserverPrototype(com.github.anba.es6draft.runtime.objects.observable.SubscriptionObserverPrototype) ObservableConstructor(com.github.anba.es6draft.runtime.objects.observable.ObservableConstructor) Intrinsics(com.github.anba.es6draft.runtime.types.Intrinsics) OrdinaryObject(com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject) SubscriptionPrototype(com.github.anba.es6draft.runtime.objects.observable.SubscriptionPrototype) ObservablePrototype(com.github.anba.es6draft.runtime.objects.observable.ObservablePrototype)

Aggregations

ObservableConstructor (com.github.anba.es6draft.runtime.objects.observable.ObservableConstructor)1 ObservablePrototype (com.github.anba.es6draft.runtime.objects.observable.ObservablePrototype)1 SubscriptionObserverPrototype (com.github.anba.es6draft.runtime.objects.observable.SubscriptionObserverPrototype)1 SubscriptionPrototype (com.github.anba.es6draft.runtime.objects.observable.SubscriptionPrototype)1 Intrinsics (com.github.anba.es6draft.runtime.types.Intrinsics)1 OrdinaryObject (com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)1