# Credit

#### new Cesium.Credit(html, showOnScreen)
Core/Credit.js 23

A credit contains data pertaining to how to display attributions/credits for certain content on the screen.

Name | Type | Default | Description
--- | --- | --- | ---
`html` | String |  | An string representing an html code snippet
`showOnScreen` | Boolean | `false` | optional If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover

##### Throws:

- DeveloperError : html is required.

##### Example:

    //Create a credit with a tooltip, image and link
    var credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>');

### Members

#### readonly element : HTMLElement
Core/Credit.js 90

Gets the credit element

#### readonly html : String
Core/Credit.js 53

The credit content

#### readonly showOnScreen : Boolean
Core/Credit.js 78

Whether the credit should be displayed on screen or in a lightbox

### Methods

#### static Cesium.Credit.clone(credit) → Credit
Core/Credit.js 156

Duplicates a Credit instance.

Name | Type | Description
--- | --- | ---
`credit` | Credit | optional The Credit to duplicate.

##### Returns:

A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)

#### static Cesium.Credit.equals(left, right) → Boolean
Core/Credit.js 119

Returns true if the credits are equal

Name | Type | Description
--- | --- | ---
`left` | Credit | The first credit
`right` | Credit | The second credit

##### Returns:

`true` if left and right are equal, `false` otherwise.

#### equals(credit) → Boolean
Core/Credit.js 132

Returns true if the credits are equal

Name | Type | Description
--- | --- | ---
`credit` | Credit | The credit to compare to.

##### Returns:

`true` if left and right are equal, `false` otherwise.