Web: [skip ci] allow to directly load local (X)HTML files with file browser

This commit is contained in:
wmayer
2020-09-07 14:33:04 +02:00
parent 208c2f5e6c
commit 49ea7ed8dd
2 changed files with 11 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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" ]