How to use the svelte-native/dom.NativeElementNode function in svelte-native

To help you get started, we’ve selected a few svelte-native 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 halfnelson / svelte-native-realworld / app / app.ts View on Github external
/*
In NativeScript, the app.ts file is the entry point to your application.
You can use this file to perform app-level initialization, but the primary
purpose of the file is to pass control to the app’s first module.
*/

import { svelteNative, DomTraceCategory } from "svelte-native";
import { registerElement, NativeElementNode } from 'svelte-native/dom'
import { RadSideDrawer } from 'nativescript-ui-sidedrawer'

import * as trace from "tns-core-modules/trace"

// register plugins
registerElement('radSideDrawer', () => new NativeElementNode('radSideDrawer', RadSideDrawer))


//enable trace
//trace.enable();
trace.addCategories(DomTraceCategory)


import App from  "./App.svelte";
svelteNative(App, {});
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
static register() {
        registerElement('listViewLinearLayout', () => new NativeElementNode('listViewLinearLayout', ListViewLinearLayout));
        registerElement('listViewGridLayout', () => new NativeElementNode('listViewGridLayout', ListViewGridLayout));
        registerElement('listViewStaggeredLayout', () => new NativeElementNode('listViewStaggeredLayout', ListViewStaggeredLayout));

        registerElement('radlistview', () => new RadListViewElement());
    }
}
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
static register() {
        registerElement('listViewLinearLayout', () => new NativeElementNode('listViewLinearLayout', ListViewLinearLayout));
        registerElement('listViewGridLayout', () => new NativeElementNode('listViewGridLayout', ListViewGridLayout));
        registerElement('listViewStaggeredLayout', () => new NativeElementNode('listViewStaggeredLayout', ListViewStaggeredLayout));

        registerElement('radlistview', () => new RadListViewElement());
    }
}
github halfnelson / svelte-native-nativescript-ui / src / listview / index.ts View on Github external
        registerElement('listViewLinearLayout', () => new NativeElementNode('listViewLinearLayout', ListViewLinearLayout));
        registerElement('listViewGridLayout', () => new NativeElementNode('listViewGridLayout', ListViewGridLayout));