isTrusted event property

Definition and Usage

The isTrusted event property returns a boolean value indicating whether the event is trusted or not.

মন্তব্য:In Chrome, Firefox, and Opera, an event is trusted if it is called by the user, and it is not trusted if it is called by a script. In IE, all events are trusted except for those created using the createEvent() method.

উদাহরণ

Determine if a specific event is trusted:

function myFunction(event) {
  if ("isTrusted" in event) {
    if (event.isTrusted) {
      alert("The " + event.type + " event is trusted.");
    } else {
      alert("The " + event.type + " event is not trusted.");
    }
  } else {
    alert("The isTrusted property is not supported by your browser");
  }
}

স্বয়ংক্রিয়ভাবে প্রয়োগ করুন

গঠনশৈলী

event.isTrusted

প্রযুক্তিগত বিবরণ

ফলাফল

বলীয় মান, ইভেন্ট কি বিশ্বাস্য নয় তা নির্দেশ করে

সম্ভাব্য মানঃ

  • true - ইভেন্ট বিশ্বাস্য
  • false - ইভেন্ট অবিশ্বাস্য
DOM সংস্করণঃ DOM লেভেল 3 ইভেন্ট

ব্রাউজার সমর্থন

সারণীতে বর্ণিত সংখ্যাগুলি এই প্রকৃতির প্রথম ব্রাউজার সংস্করণটির সম্পূর্ণ সমর্থন উল্লেখ করে

প্রকৃতি চ্রোম আইই ফায়ারফক্স স্যাফারি ওপেরা
isTrusted 46.0 9.0 সমর্থন করে সমর্থন না করে 33.0