diff --git a/src/Mod/Web/Gui/AppWebGui.cpp b/src/Mod/Web/Gui/AppWebGui.cpp index 8901e04957..016abf531e 100644 --- a/src/Mod/Web/Gui/AppWebGui.cpp +++ b/src/Mod/Web/Gui/AppWebGui.cpp @@ -62,6 +62,14 @@ public: ); add_varargs_method("openBrowserWindow",&Module::openBrowserWindow ); + add_varargs_method("open",&Module::openBrowser, + "open(string)\n" + "Load a local (X)HTML file." + ); + add_varargs_method("insert",&Module::openBrowser, + "insert(string)\n" + "Load a local (X)HTML file." + ); initialize("This module is the WebGui module."); // register with Python } diff --git a/src/Mod/Web/InitGui.py b/src/Mod/Web/InitGui.py index 87dd9575a3..a3daa1455f 100644 --- a/src/Mod/Web/InitGui.py +++ b/src/Mod/Web/InitGui.py @@ -47,4 +47,7 @@ class WebWorkbench ( Workbench ): Gui.addWorkbench(WebWorkbench()) +# Append the open handler +FreeCAD.addImportType("Web Page (*.html *.xhtml)", "WebGui") + FreeCAD.__unit_test__ += [ "TestWebGui" ]