Closed Abdiloki closed 1 month ago
While I appreciate the thought, re-implementing JQuery would be a gigantic amount of work, and not something I think is in the scope of this project. Perhaps a small subset could be introduced, but I suspect it might have limited usefulness.
I'm not sure how feasible this could be, but it would be a great addition to be able to access jquery methods directly on any BlockElement and PageElement.
I make a lot of web extensions and userscripts, and whenever it comes to UI styling and layouts, I always include JQuery. It provides a lot of SwiftUI like simplicity and straight forwardness to quickly applying changes and styling to any element.
Some problem common in Ignite and especially in traditional html/css/javascript flow:
To my surprise, it wasn't too difficult to get jquery loaded externally and available for use to dynamically style the page using the
Script
Element. As quick example, I got the code below working in Ignite. It checks for jQuery, and creates a new element, styles it, clicking on it appends to itself, animates in, and fades out.Script(file: "https://code.jquery.com/jquery-3.7.1.min.js")
Other than jquery, a much larger target would be, being able to reference/access the DOM element on a
BlockElement
. This will enable writing logic javascript logic that cannot be done using swift. I've managed to get some decent results by using an Id tag to each BlockElement, and accessing them inside in aScript
element on the pageHead
, but it's very un-SwiftUI.Otherwise, Ignite has been pretty incredible and has high potential.