Replies: 5 comments 12 replies
-
Look at the source for clog:load-script |
Beta Was this translation helpful? Give feedback.
1 reply
-
The idea is to block till you receive a custom event from the browser. It
is a very nice little trick to have in your pocket for many things.
…On Thu, Jul 25, 2024 at 2:50 PM Konrad Hinsen ***@***.***> wrote:
Thanks! I think I understand how this works. It will require some
adaptation to my use case, but that looks very possible. On my agenda for
tomorrow.
—
Reply to this email directly, view it on GitHub
<#377 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUEFIAKPF3N7BUNLTXT3DZOFCH7AVCNFSM6AAAAABLOY62QSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMJVGIZDONA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
-
(defgeneric ready-state (clog-document)
(:documentation "Get ready-state. Returns
'loading'|'interactive'|'complete'.
The state would only change if the boot-page was still loading css,
graphics, etc.
Under normal circumstance there is no need in CLOG to check if the state is
ready
as on-new-window is only called once one can interact with page. See also
SET-ON-READY-STATE-CHANGE"))
I didn't read code yet you sent working - but if waiting for the page use
that
…On Fri, Jul 26, 2024 at 10:35 AM Konrad Hinsen ***@***.***> wrote:
I also tried wrapping the event trigger in $( ), which the recommended
way to wait for "DOM ready" after a page load. But this doesn't make any
difference for inner-html.
—
Reply to this email directly, view it on GitHub
<#377 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUEFIXQXNRAO3KP7VTGGTZOJNDXAVCNFSM6AAAAABLOY62QSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMJWGEYDSNI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
and the events see rest of clog-document the document events
…On Fri, Jul 26, 2024 at 10:56 AM David Botton ***@***.***> wrote:
(defgeneric ready-state (clog-document)
(:documentation "Get ready-state. Returns
'loading'|'interactive'|'complete'.
The state would only change if the boot-page was still loading css,
graphics, etc.
Under normal circumstance there is no need in CLOG to check if the state
is ready
as on-new-window is only called once one can interact with page. See also
SET-ON-READY-STATE-CHANGE"))
I didn't read code yet you sent working - but if waiting for the page use
that
On Fri, Jul 26, 2024 at 10:35 AM Konrad Hinsen ***@***.***>
wrote:
> I also tried wrapping the event trigger in $( ), which the recommended
> way to wait for "DOM ready" after a page load. But this doesn't make any
> difference for inner-html.
>
> —
> Reply to this email directly, view it on GitHub
> <#377 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACYUEFIXQXNRAO3KP7VTGGTZOJNDXAVCNFSM6AAAAABLOY62QSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMJWGEYDSNI>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
6 replies
-
I will try and do some experiments Sunday sorry been so busy
…On Fri, Jul 26, 2024 at 4:16 PM Konrad Hinsen ***@***.***> wrote:
My script does nothing exotic. It walks through an SVG element created by
graphviz and changes the ID attributes of some element so that I can later
define on-click events for them. Nothing async, no calling other scripts,
it's really boring stuff. But it gets only 4/5 of its work done before the
following script is run and fires the custom event.
—
Reply to this email directly, view it on GitHub
<#377 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUEFL5TYCOSL667WP5XVLZOKVBLAVCNFSM6AAAAABLOY62QSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMJWGM3TSMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to synchronize DOM manipulations via CLOG with DOM manipulations made by
<script>
elements?More specifically, I use
clog:inner-html
to add HTML with embedded script tags to an element. I want to wait for all the scripts to have terminated before manipulating the DOM from CLOG.Beta Was this translation helpful? Give feedback.
All reactions