Hi @John_Betong, not sure if this will help at all but I made a discovery some time ago that if you set a CSS display:block rule to a script tag it will actually display the script’s code. I was quite surprised by it. Hope it helps in any case.
Hi John, maybe I’m not understanding you actually…
What I meant anyway is that you can display styles and scripts within the page if you set their display to ‘block’ like so:
<style style='display:block;'>
.some-rule {
color: red;
}
</style>
<script style='display:block;'>
console.log('this is some script we want to display in the page');
</script>
It is most likely I too am not fully understanding, but hopefully I’m in the ball park.
Scenario - desktop:
I see a cool script I want to try. eg.
var gremlin = 'Gizmo';
console.log(gremlin);
I copy the code, paste it into a file on my computer, give it the .html extension, open the file in my browser, then look in the console to see if it works.
Scenario - mobile:
I see the same script. I copy and paste it into a file on my device (AFAIK it doesn’t do .html files). at this point I know of no way I can open that file in my browser to see if it works
In other words, even though my desktop browser can render [sic open and run] HTML, CSS and JavaScript files without them being at an actual online or localhost URL, on mobile the browser needs to go to an online page.
I’ve not used my tablet for development purposes. If I wanted to, and wanted to not use an online site, I’m wondering if a localhost in a flash drive connected to USB might work.