You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function create Paragraph() {
let para = document.createElement('p');
para.textContent = 'You clicked the button!';
document.body.appendChild(para);
}
/*
Get references to all the buttons on the page in an array format.
Loop through all the buttons and add a click event listener to each one.
When any button is pressed, the create Paragraph() function will be run.
*/
const buttons = document.querySelectorAll('button');
for (let i = 0; i < buttons. Length ; I++) {
buttons[i].addEventListener('click', create Paragraph);
}
A nice suggestion from @wilkerlucio.
Create a page
klipse-embed.html
that when included (presumably in an iframe) renders one or more Klipse snippets.It would allow to embed Klipse snippets in blog posts very easily without any security concerns by embedding Klipse snippet iframe (See below).
The information about the snippets are passed as url query parameters. For example:
klipse-embed.html?snippet_language=cljs&snippet_code=(map inc [1 2 3])
It would be nice to support multiple snippets from multiple languages e.g.
klipse-embed.html?snippet_language=cljs&snippet_code=(map inc [1 2 3])&snippet_language=js&snippet_code=1+2
The snippets should be able to share code and data.
Here is how one could embed Klipse snippets in an iframe:
@wilkerlucio would you like to refine the requirements?
The text was updated successfully, but these errors were encountered: