JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<body id ="test">
   <div id="test2"/>
</body>

JavaScript

const _d = document;

const Hoge = function(){
    //(略)
    alert(_d.getElementById('test2')); //アクセスできてdocumentオブジェクトのメソッドが使える
    //(略)
};

Hoge.prototype = {
    testdesuyo : function(){
        alert(_d.URL); //ここもdocumentオブジェクトのメソッドが使える
        _d.getElementById("test").insertAdjacentHTML('afterbegin', '<p>testes</p>'); 
       //何故かinsertAdjacentHTMLが使えない
    //insertAdjacentHTMLなんてないよとGoogleChromeのコンソールが言ってくる
      // ↑これが何故か分からない
    }
};

const hoge = new Hoge()

hoge.testdesuyo();