

Hs.webview.new(rect,, ) -> webviewObjectĬreate a webviewObject and optionally modify its preferences. If a toolbar is attached to the webview, you can achieve the same effect as this method with hs.webview:attachedToolbar():inTitleBar(boolean)Įxtensions/webview/libwebview.m line 2179 When the title is hidden, the toolbar will only display the toolbar items as icons without labels, and ignores changes made with hs.webview.toolbar:displayMode. When a toolbar is attached to the webview, this function can be used to specify whether the Toolbar appears underneath the webview window's title ("visible") or in the window's title bar itself, as seen in applications like Safari ("hidden"). See also hs.webview:windowStyle and hs.webview.windowMasks. if a value is provided, returns the webview object otherwise returns the current value.state - an optional string containing the text "visible" or "hidden", specifying whether or not the webview's title text appears when webview's window style includes "titled".Get or set whether or not the title text appears in the webview window. Hs.webview:titleVisibility() -> webviewObject | string The Close, Minimize, and Maximize buttons are only visible when the Window is also Titled.Įxtensions/webview/libwebview.m line 2528.The Maximize button in the window title is enabled when Resizable is set.SSL certificates provided to the callback function for (#sslCallback) or in the results of (#certificateChain) use OID strings as the keys which describe the properties of the certificate and this table can be used to get a more common name for the keys you are most likely to see.Įxtensions/webview/libwebview.m line 2570Ī table containing valid masks for the webview window. see the notes for hs.drawing.windowLevelsĪ table of common OID values found in SSL certificates.Hs.webview:setLevel(theLevel) -> drawingObjectĭeprecated you should use (#level) instead. Returns an hs.window object for the webview so that you can use hs.window methods on it. Hs.webview:asHSWindow() -> hs.window object If you believe that a useful method has been overlooked, please submit an issue. Hs.webview:asHSDrawing() -> hs.drawing objectīecause use of this method can easily lead to a crash, useful methods from `hs.drawing` have been added to the `hs.webview` module itself. Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Deprecateds asHSDrawing Signature.Constructors - API calls which return an object, typically one that offers API methods.

#Hammerspoon video code#

#Hammerspoon video full#
This module is not intended to replace a full web browser and does have some limitations to keep in mind: The objective is to provide a functional interface to the WKWebView and WKUserContentController classes. This module uses Apple's WebKit WKWebView class to provide web content display with JavaScript injection support. Hammerspoon docs: hs.webview docs » hs.webviewĭisplay web content in a window from Hammerspoon
