Introduction
A non-visible extension that loads HTML content inside of a WebViewer.
I made this open source version of ✨ [Free] NoFileHtml - view html without files, I just want to use this extension for learning. The code was referenced from this Stack Overflow answer. Free to modify. Thank you!
Release date: 2022-03-03T01:00:00Z
Package name: com.gordonlu.htmlloader.aix
BIG thanks to: @TIMAI2
Documentation
ClearHtmlContent
Clears the content loaded in the given WebViewer. Note that it also clears all content, even the HomeUrl, of the WebViewer.
Parameters: webViewer = component
LoadHtmlContent
Loads the HTML content inside of the WebViewer. If you have already loaded HTML content, it will replace the former HTML content with this current content.
Parameters: webViewer = component, content = text
What can the LoadHtmlContent method load?
These are accepted.
These are also accepted.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h1>The Window Object</h1>
<h2>The open() Method</h2>
<p>Click the button to open a new browser window.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
window.open("https://www.w3schools.com");
}
</script>
</body>
</html>
Downloads
TXT: HtmlLoader.txt (2.1 KB)
AIX: com.gordonlu.htmlloader.aix (6.1 KB)
Tests
Works exactly as what it should be in the companion of Xiaomi 11 5G NE and App Inventor aiStarter emulator.
Rate my extension!
- Good extension!
- Bad extension.
Made with Niotron IDE.
Kindly PM me if you have any questions! Also, if you like my extension, please like it! It takes some effort for me to make it...
Votes and likes tell me the general user feedback of my extension. If you read this extension, please take 20 seconds to drop by and give a vote / like!
If you have any features that you want to add and you know the code, PM me.
Gordon Lu