How to use aurelia-pal - 10 common examples

To help you get started, we’ve selected a few aurelia-pal 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 aurelia / templating-resources / test / focus.spec.ts View on Github external
it('should set focus value to false when element loses focus', () => {
        focus.attached();
        setBindedFocusValue(true);

        otherElement.focus();
        element.dispatchEvent(DOM.createCustomEvent('blur'));

        expect(focus.value).toBe(false);
    });
github aurelia / templating-router / test / setup.ts View on Github external
import 'aurelia-polyfills';
import 'aurelia-loader-webpack';
import {initialize} from 'aurelia-pal-browser';
import { PLATFORM } from 'aurelia-pal';

PLATFORM.moduleName('test/routes/route-1');
PLATFORM.moduleName('test/routes/route-2');
PLATFORM.moduleName('test/routes/layout-1');
PLATFORM.moduleName('test/routes/layout-2');
PLATFORM.moduleName('test/routes/multiple-slots-route-1');
PLATFORM.moduleName('test/routes/multiple-slots-layout-1');

initialize();
github aurelia / ui-virtualization / dist / es2015 / template-strategy.js View on Github external
createTopBufferElement(element) {
    const elementName = /^[uo]l$/.test(element.parentNode.localName) ? 'li' : 'div';
    const buffer = DOM.createElement(elementName);
    const tableElement = element.parentNode.parentNode;
    tableElement.parentNode.insertBefore(buffer, tableElement);
    buffer.innerHTML = ' ';
    return buffer;
  }
github aurelia / ui-virtualization / dist / native-modules / template-strategy.js View on Github external
TableStrategy.prototype.createTopBufferElement = function createTopBufferElement(element) {
    var elementName = /^[uo]l$/.test(element.parentNode.localName) ? 'li' : 'div';
    var buffer = DOM.createElement(elementName);
    var tableElement = element.parentNode.parentNode;
    tableElement.parentNode.insertBefore(buffer, tableElement);
    buffer.innerHTML = ' ';
    return buffer;
  };
github aurelia / ui-virtualization / dist / aurelia-ui-virtualization.js View on Github external
createTopBufferElement(element: Element): Element {
    const elementName = /^[uo]l$/.test(element.parentNode.localName) ? 'li' : 'div';
    const buffer = DOM.createElement(elementName);
    const tableElement = element.parentNode.parentNode;
    tableElement.parentNode.insertBefore(buffer, tableElement);
    buffer.innerHTML = ' ';
    return buffer;
  }
github aurelia / ux / packages / core / dist / es2015 / index.js View on Github external
cssNormalize() {
        PLATFORM.moduleName('./styles/normalize.css');
        this.loader.loadText('@aurelia-ux/core/styles/normalize.css')
            .catch(err => {
            this.logger.warn('Aurelia-UX Core failed to load normalize.css, some visual errors may appear.', err);
        })
            .then(text => {
            if (text) {
                this.globalStyleEngine.addOrUpdateGlobalStyle('@aurelia-ux/core/styles/normalize.css', text);
            }
        });
        return this;
    }
};
github aurelia / ux / packages / core / dist / native-modules / ux-configuration.js View on Github external
UXConfiguration.prototype.cssReset = function () {
        var _this = this;
        PLATFORM.moduleName('./styles/reset.css');
        this.loader.loadText('@aurelia-ux/core/styles/reset.css')
            .catch(function (err) {
            _this.logger.warn('Aurelia-UX Core failed to load reset.css, some visual errors may appear.', err);
        })
            .then(function (text) {
            if (text) {
                _this.globalStyleEngine.addOrUpdateGlobalStyle('@aurelia-ux/core/styles/reset.css', text);
            }
        });
        return this;
    };
    UXConfiguration = __decorate([
github aurelia / ux / packages / core / dist / es2015 / ux-configuration.js View on Github external
cssReset() {
        PLATFORM.moduleName('./styles/reset.css');
        this.loader.loadText('@aurelia-ux/core/styles/reset.css')
            .catch(err => {
            this.logger.warn('Aurelia-UX Core failed to load reset.css, some visual errors may appear.', err);
        })
            .then(text => {
            if (text) {
                this.globalStyleEngine.addOrUpdateGlobalStyle('@aurelia-ux/core/styles/reset.css', text);
            }
        });
        return this;
    }
};
github aurelia / ux / packages / core / dist / native-modules / index.js View on Github external
UXConfiguration.prototype.cssNormalize = function () {
        var _this = this;
        PLATFORM.moduleName('./styles/normalize.css');
        this.loader.loadText('@aurelia-ux/core/styles/normalize.css')
            .catch(function (err) {
            _this.logger.warn('Aurelia-UX Core failed to load normalize.css, some visual errors may appear.', err);
        })
            .then(function (text) {
            if (text) {
                _this.globalStyleEngine.addOrUpdateGlobalStyle('@aurelia-ux/core/styles/normalize.css', text);
            }
        });
        return this;
    };
    UXConfiguration = __decorate([
github aurelia / fetch-client / dist / es2015 / aurelia-fetch-client.js View on Github external
function trackRequestStart(client) {
    client.isRequesting = !!(++client.activeRequestCount);
    if (client.isRequesting) {
        let evt = DOM.createCustomEvent('aurelia-fetch-client-request-started', { bubbles: true, cancelable: true });
        setTimeout(() => DOM.dispatchEvent(evt), 1);
    }
}
function trackRequestEnd(client) {

aurelia-pal

Aurelia's platform abstraction layer (PAL).

MIT
Latest version published 6 years ago

Package Health Score

53 / 100
Full package analysis