matlab.htmlviewer.HTMLViewer
R2026bDescription
The matlab.htmlviewer.HTMLViewer class represents an HTML tab open
in the HTML Viewer.
The HTML Viewer loads content from local files only. Store supporting files, such as JavaScript and CSS files, in the same folder as the HTML file or in a subfolder and reference them using relative paths. Third-party JavaScript libraries must also be saved locally. Libraries hosted on Content Delivery Networks (CDNs) are not accessible.
Note
Security Considerations: Only open trusted HTML files in the HTML Viewer. If an HTML file comes from an unknown user or an uncontrolled source, open it in your default web browser instead.
Creation
When you use the web function to open a local URL or file, the
function returns a matlab.htmlviewer.HTMLViewer object.
Properties
Object Functions
getHTMLText | Get contents of HTML Viewer tab |
Examples
Limitations
The HTML Viewer does not display
.bmp(bitmap) image files. Instead use.png,.gif, or.jpegformats for image files in HTML pages.In an installed version of MATLAB®, certain HTML features, such as web plugins and access to webcams or microphones, are not supported.