A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/javascript/latest/api-reference/esri-core-lang.html below:

lang | API Reference | ArcGIS Maps SDK for JavaScript 4.33

ESM: import * as esriLang from "@arcgis/core/core/lang.js";

CDN: const esriLang = await $arcgis.import("@arcgis/core/core/lang.js");

Object: @arcgis/core/core/lang

Since: ArcGIS Maps SDK for JavaScript 4.0

Provides a utility method for deeply cloning objects with properties that are computed or have their own clone() method, such as Extent.

Method Overview Name Return Type Summary Object clone() Object

Use this method to deeply clone objects with properties that are computed or have their own clone() method.

lang Method Details
clone Method clone(elem){Object}

Use this method to deeply clone objects with properties that are computed or have their own clone() method. For example, if you are creating an object that stores an initial extent and a spatial reference for your application, you can use esriLang.clone(initialProps) to clone this object so that the extent and spatialReference are properly cloned.

Returns

Type Description Object A clone of the object.

Example

const esriLang = await $arcgis.import("@arcgis/core/core/lang.js");
let initialProps = {
  extent: appExtent, // app initial extent
  spatialReference: spatReference // app spatialReference
};
// Creates a deep clone of the object
let clonedInitialProps = esriLang.clone(initialProps);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4