Felix Schildmann
Felix Schildmann

Reputation: 683

How do I check if a browser supports the creation of a ClipBoardItem?

I want to determine if a browser is able to create a new ClipBoardItem in Javascript.
The following if condition is sometimes true and sometimes false in Google Chrome so it doesn't work in my case:

if(typeof ClipBoardItem !== "undefined") {
    // new ClipBoardItem()
}

Upvotes: 0

Views: 717

Answers (1)

Sandeep Nagaraj
Sandeep Nagaraj

Reputation: 128

Is it ClipboardItem instead of ClipBoardItem, because typeof ClipboardItem is giving me correct results.

Upvotes: 1

Related Questions