Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

WebPolicyDelegate.Install

Assigns this webviewer our policy delegate as a filter to the FileMaker built in delegate.

Component Version macOS Windows Linux Server iOS SDK
WebView 2.7 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "WebPolicyDelegate.Install"; WebViewerRef )   More

Parameters

Parameter Description Example
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.

Result

Returns OK on success or error.

Description

Assigns this webviewer our policy delegate as a filter to the FileMaker built in delegate.
When using our WebDownloadDelegate, you may see that it prefers to show a PDF with the build in PDF Viewer rather than downloading it. This set of functions serves to fix on problem: Getting the webviewer to download files instead of showing them.
So you can for example register that PDF files (mime type "application/pdf") are downloaded instead of viewed.
All other policy things are forwarded to normal FileMaker policy delegate. And the plugin makes sure you don't install the policy delegate twice.

Not supported for WebKit 2.x (FileMaker 16 Mac), but may work with plugin made web viewers (see WebView.Create).

Examples

Makes sure all PDF files are downloaded:

MBS( "WebDownloadDelegate.Install" ; "web" )
MBS( "WebPolicyDelegate.AddMimeType"; "application/pdf"; "download" )

See also

Created 18th August 2014, last changed 1st March 2019


WebPolicyDelegate.AddMimeType - WebPolicyDelegate.RemoveMimeType

Feedback: Report problem or ask question.