Yuzu is a gemenai browser and a fork of Amfora. It aims to implement basic scripting the gemenai protocal that keeps the power in the users hands.
As markdown is already supported in Gemeni, Yuzu fold all code blocks annoted as scripts and gives you the option to run them requiring you explicit input.
This change of paradimgn where code is displayed inline and users have to volentarily run the code aims to discorage what has happend to the modern web without the nuclear options of removing all scripting.
To use the code any language that supports WASI is good, however sticking to the more popular once is better as code needs to be compiled on the users system and so using more common compilers is better.
/// Run this code to enable live search on the page
Page::search_bar()?.set_callback(|input| {
Page::list()?.text.edit(|text| {
text
.lines()
.filter(|line| line.contain(input))
})
})
To define html like tags to query elements the must be labled withing the documents like this:
< dynamic>
< \dynamic>
You could then query this element as Page::dynamic() and make changes to it.
Yuzu is not trying to change the way gemeni works. Part of the magic is that beacuse these code snippets are showed on other sites in plain text it encorages websites to keep it to a minimal.
This is great as it means that people think twice before putting code in their websites.
Although some people disable js on the web they are a sever minority and so websites can afford to exclude these people. The goal is to make that not an option on gemeni
- Bookmarks