-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Navigator.plugins, mimeTypes, pdfViewerEnabled updates (#13605)
* Navigator.plugins, mimeTypes, pdfViewerEnabled updates * Apply suggestions from code review Co-authored-by: Joe Medley <jmedley@google.com> * Update files/en-us/web/api/navigator/pdfViewerEnabled/index.md Co-authored-by: Joe Medley <jmedley@google.com> * lower case the file name * revert slug Co-authored-by: Joe Medley <jmedley@google.com>
- Loading branch information
1 parent
97891a8
commit c1d3f3d
Showing
4 changed files
with
96 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Navigator.pdfViewerEnabled | ||
slug: Web/API/Navigator/pdfViewerEnabled | ||
tags: | ||
- pdfViewerEnabled | ||
- API | ||
- DOM | ||
- Property | ||
- Reference | ||
browser-compat: api.Navigator.pdfViewerEnabled | ||
--- | ||
{{APIRef("HTML DOM")}} | ||
|
||
The **`pdfViewerEnabled`** property of the {{domxref("Navigator")}} interface indicates whether the browser supports inline display of PDF files when navigating to them. | ||
|
||
If inline viewing is not supported the PDF is downloaded and may then be handled by some external application. | ||
|
||
> **Note:** This method replaces a number of legacy methods of inferring support for inline viewing of PDF files. | ||
## Value | ||
|
||
`true` if the browser can display PDF files inline when navigating to the file (using either an internal viewer or a PDF viewer extension); otherwise `false`. | ||
|
||
## Examples | ||
|
||
To check PDF inline viewing support: | ||
|
||
```js | ||
if (!navigator.pdfViewerEnabled) { | ||
// The browser does not support inline viewing of PDF files. | ||
} | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters