jbmc
November 6, 2021, 7:10pm
1
I have a block that can generate an HTML from text. Is it possible to:
Make the created page back-interact with Snap! via JS (If so, how do I add JS?)
lol i didnt realize you could embed js directly into the html code
Make Snap! forcefully close the page
What are you asking and what are you trying to do? I think I've done what I think you're trying to do.
I think the time has come to ask - what is your project all about?
jbmc
November 7, 2021, 4:48pm
4
I was thinking of making something somewhat like an OS in snap!, and utilizing custom HTML to create things in windows.
There is a Snap/src/api.js to allow sites to embed/interact with Snap!. You can send/receive broadcasts, set/get var, and so on...
jbmc
November 7, 2021, 5:31pm
7
aaa something like this i guess (its supposed to be one block but scratchblocks doesnt have multiline)
There are a few projects that open a browser window on top of Snap!
But right now I'm talking of the idea used here TuneScope .
I have a block that opens a popup window with input HTML. It's the 35th block in my collection of custom blocks: Snap! 6.9.2 Build Your Own Blocks
jbmc
November 7, 2021, 11:44pm
10
Not what I meant... I mean an actual HTML page that can, say, have a button on it that when clicked will trigger something in the project. Example: The project opens a page with a scratch embed and a "next" button, which when clicked tells snap to close the page and open a different scratch embed page
Some of htis is possible, like the button functions. I experimented with this in my Snap! HTML projects. I do not know about the other stuff though.
I'm going to look at api.js and see what I can do.
jbmc
November 18, 2021, 8:59pm
13
Bump
is that even how you use that
jbmc
November 18, 2021, 9:00pm
14
I've started work on an actual HTML-themed Snap 7.0 mega-extension so this is actually really important now