private string ResolveObjectUrl(Uri uri) { byte[] imageData = EmbeddedResourceLoader.LoadResourceData(uri); string mimeType = converter.ToMimeTypeString(GetExtension(uri.GetLocalPath())); return(InteropBridge.Invoke(InteropCall.CreateBlobUrl, elementId: 0, (imageData, mimeType))); }
public static HtmlElement CreateElementNS(string namespaceUri, string qualifiedName) { var element = new HtmlElement(namespaceUri, qualifiedName); InteropBridge.SendMessage(InteropCall.CreateElementNS, element.ElementId, (namespaceUri, qualifiedName)); return(element); }
public static HtmlElement CreateElement(string tagName) { var element = new HtmlElement(null, tagName); InteropBridge.SendMessage(InteropCall.CreateElement, element.ElementId, tagName); return(element); }
public static HtmlElement GetBody() { var element = new HtmlElement(null, BodyElementName); InteropBridge.SendMessage(InteropCall.RegisterBody, element.ElementId); return(element); }
public TResult Invoke <TResult>(InteropCall <IBrowserComponent, None, TResult> kind) { return(InteropBridge.Invoke(kind, ElementId)); }
public TResult Invoke <TArg, TResult>(InteropCall <IBrowserComponent, TArg, TResult> kind, TArg arg) { return(InteropBridge.Invoke(kind, ElementId, arg)); }
public void Send(InteropCall <IBrowserComponent, None> kind) { InteropBridge.SendMessage(kind, ElementId); }
public void Send <TArg>(InteropCall <IBrowserComponent, TArg> kind, TArg arg) { InteropBridge.SendMessage(kind, ElementId, arg); }
public static void Print(string message) { InteropBridge.SendMessage(InteropCall.Print, 0, message); }
public static void SetApplicationListener(IHtmlApplicationListener listener) { ApplicationListenerHandle = new JSHandle(); ApplicationComponent.Add(ApplicationListenerHandle.Id, listener); InteropBridge.SendMessage(InteropCall.HandleApplicationEvents, ApplicationListenerHandle.Id); }