21 @mizchi posted at 2018-03-07 Revisions Edit Requests Show all likers of this article Show article as Markdown Report articleChrome での DevTool 検知についてChrome21 コード var e = Object.defineProperty(document.createElement("DevToolDetector"), "id", { get: () => { // detect devtool } }) console.dir(e) 仕組み console.dir が DOM 要素を展開しようとする時、DevTools が開いていれば、 element.id 要素を取得しに行く。その結果 getter が走ことで検知できる。 使えるのか Chrome Canary (67) では対策済みなので、次のバージョンぐらいでは使えなくなると思います。 コード 仕組み 使えるのか Koutaro Chikuba@mizchiStockLike21Toot tadsan9428contribution2018-03-07 18:07Like1Chrome 65 (Beta channel) でも動作しなさそう Sign up for free and join this conversation.Sign UpIf you already have a Qiita account log in.
Chrome 65 (Beta channel) でも動作しなさそう