All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.jsinterop.client.core.JsUtils Maven / Gradle / Ivy

There is a newer version: 0.1.1
Show newest version
/*
 * #%L
 * JsInterop.xyz
 * %%
 * Copyright (C) 2015 Norbert Sándor
 * %%
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * #L%
 */
package xyz.jsinterop.client.core;

/**
 * Javascript related utility functions.
 */
public final class JsUtils {
	/**
	 * Cast an object to another type.
* The main usage is to cast an Javascript object to another Javascript type: *

* Note: this is a potentially unsafe operation, the cast is performed at runtime! *

*/ public static native T cast(Object object) /*-{ return object; }-*/; /** * Invokes the Javascript {@code typeof} operator. */ public static native String typeOf(Object object) /*-{ return typeof(object); }-*/; private JsUtils() { } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy