Using CLOG with HTML, templating engines, HTML markup libraries and web frameworks #185
rabbibotton
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HTML:
1 To send raw html -
create-child
The returned clog-obj will refer to the outer html element. If you want to access any child elements you create you will need to also use for each method 2 or 3
2 To look up an element by its html id and use it (nothing changes on browser side, this just creates a clog object that points to the element on the HTML page, the as-child is referring to that the object is a child of the same connection as the clog-obj passed as the first parameter)
attach-as-child
3 Use a jquery to find the element on the page in other ways
create-jquery
It is possible to use create-jquery to refer to many elements at once and manipulate them as a unit.
Java Script:
js-execute and js-query allow you to execute any JavaScript on the browser desired.
jquery-execute and jquery-query allow you to execute jquery functions on a clog object.
jquery - returns the direct jquery string to be used in general js-* strings
Template Engines and HTML Markup Libs:
If you use a templating engine or markup library you would send the html output to the browser (make sure to assign ids) using # 1 and then use # 2 or # 3
Ways to use CLOG with existing html pages and web frameworks
See - Tutorial 11
Serve the HTML from the same server to satisfy the same-server policy as your clog app.
You can either through a web server, the framework’s webserver or even from your CLOG apps static files.
Make sure the the file contains the boot.js file and you use set-on-new-window with the url route to the file, then in your set-on-new-window you can do any CLOG magic you want as above.
Beta Was this translation helpful? Give feedback.
All reactions