简体   繁体   中英

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()
}

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM