Skip to content

Commit f08b072

Browse files
committed
add SetExtensionsDir to go-webkit2
1 parent 4306d0b commit f08b072

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

webkit2/webcontext.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,12 @@ func (wc *WebContext) SetCacheModel(model CacheModel) {
5656
func (wc *WebContext) ClearCache() {
5757
C.webkit_web_context_clear_cache(wc.webContext)
5858
}
59+
60+
//SetWebExtensionsDirectory sets the directory where WebKit will look for Web Extensions.
61+
//
62+
//See also: webkit_web_context_set_web_extensions_directory
63+
//http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#webkit-web-context-set-web-extensions-directory
64+
func (wc *WebContext) SetWebExtensionsDirectory(directory string) {
65+
C.webkit_web_context_set_web_extensions_directory(wc.webContext, (*C.gchar)(C.CString(directory)))
66+
}
67+

0 commit comments

Comments
 (0)