How to use the @glimmer/component.RootReference function in @glimmer/component

To help you get started, we’ve selected a few @glimmer/component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bakerac4 / glimmer-native / dist / src / glimmer / native-component-manager.js View on Github external
import { RootReference } from '@glimmer/component';
import { CONSTANT_TAG } from '@glimmer/reference';
const EMPTY_SELF = new RootReference(null);
const NOOP_DESTROYABLE = { destroy() { } };
const DESTROYING = Symbol('destroying');
const DESTROYED = Symbol('destroyed');
export class Bounds {
    constructor(__bounds) {
        this._bounds = __bounds;
    }
    get firstNode() {
        return this._bounds.firstNode();
    }
    get lastNode() {
        return this._bounds.lastNode();
    }
}
export class ComponentStateBucket {
    constructor(definition, args) {
github bakerac4 / glimmer-native / dist / src / glimmer / native-component-manager.js View on Github external
getSelf(bucket) {
        if (bucket) {
            return new RootReference(bucket.component);
        }
        return EMPTY_SELF;
    }
    didCreateElement() { }
github bakerac4 / glimmer-native / src / glimmer / native-component-manager.ts View on Github external
getSelf(bucket: ComponentStateBucket): PathReference {
        if (bucket) {
            return new RootReference(bucket.component) as any;
        }
        return EMPTY_SELF as any;
    }
    didCreateElement() {}
github bakerac4 / glimmer-native / src / glimmer / native-component-manager.ts View on Github external
import { ComponentDefinition, RootReference } from '@glimmer/component';
import { DefinitionState } from '@glimmer/component/dist/types/src/component-definition';
import { AotRuntimeResolver, ComponentManager as VMComponentManager, Invocation } from '@glimmer/interfaces';
import { CONSTANT_TAG, PathReference, Tag } from '@glimmer/reference';

const EMPTY_SELF = new RootReference(null);
const NOOP_DESTROYABLE = { destroy() {} };
export const DESTROYING = Symbol('destroying');
export const DESTROYED = Symbol('destroyed');

export class Bounds {
    private _bounds: any;
    constructor(__bounds: any) {
        this._bounds = __bounds;
    }

    get firstNode(): Node {
        return this._bounds.firstNode() as Node;
    }

    get lastNode(): Node {
        return this._bounds.lastNode() as Node;

@glimmer/component

Glimmer component library

MIT
Latest version published 24 days ago

Package Health Score

89 / 100
Full package analysis