public DOMObject(object jsobject) { ManagedJSObject = jsobject as JSObject; if (ManagedJSObject == null) { throw new NullReferenceException($"{nameof(jsobject)} must be of type JSObject and non null!"); } }
// Protected implementation of Dispose pattern. protected virtual void Dispose(bool disposing) { if (disposing) { // Free any other managed objects here. // } // Free any unmanaged objects here. // ManagedJSObject?.Dispose(); ManagedJSObject = null; }