You don't. It's an implementation detail that should never be exposed. IMHO the fact that you can get the WebDriver ID for the elements in Python and Ruby is a leak in the abstraction layer. That said, if you have a variable which is an IWebElement object, and you pass it in as an arg to `IJavaScriptExecutor.ExecuteScript()`, it'll work transparently. To wit:

IWebElement element = driver.FindElement(By.Name, "Sign In");
string tag = ((IJavaScriptExecutor)driver).ExecuteScript("return arguments[0].tagName;").ToString();

Your extensions to the executeScript() wire protocol command should be able to handle the element reference JSON object, not the raw ID. You can extract the raw ID from that element reference.