Ejemplo n.º 1
0
        private void OnConsole(RuntimeConsoleFirefoxEvent e)
        {
            var context = ContextIdToContext[e.ExecutionContextId];

            var type     = e.GetConsoleType();
            var location = e.ToConsoleMessageLocation();

            Page.AddConsoleMessage(type, Array.ConvertAll(e.Args, arg => context.CreateHandle(arg)), location);
        }
Ejemplo n.º 2
0
 public static ConsoleMessageLocation ToConsoleMessageLocation(this RuntimeConsoleFirefoxEvent runtimeConsole) => new ConsoleMessageLocation
 {
     ColumnNumber = (int?)runtimeConsole.Location.ColumnNumber,
     LineNumber   = (int?)runtimeConsole.Location.LineNumber,
     URL          = runtimeConsole.Location.Url,
 };
Ejemplo n.º 3
0
 public static ConsoleType GetConsoleType(this RuntimeConsoleFirefoxEvent runtimeConsole)
 => runtimeConsole.Type == "warn" ? ConsoleType.Warning : runtimeConsole.Type.ToEnum <ConsoleType>();