Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Is there any function like AddScriptToExecuteOnDocumentCreated() in WebView2 #100

Answered by c-smile
lk9015 asked this question in Q&A
Discussion options

You must be logged in to vote

There are multiple ways to achieve that. So context is required.

I am assuming that you will need that for some third party documents, if so then you should load such documents in <frame>s.

In Sciter you can define <frame content-style="content.css" src="...">. The frame is ordinary element similar to iframe in browsers - so it can appear in your root document (the one that is loaded into window directly).

That content.css may have this declaration:

html { 
   aspect: UsersContent url(.../users-content-handler.js);
} 
// some other CSS definitions for user's content like predefined components:
widget.file-selector {
   prototype: FileSelector url(.../users-content-handler.js);
   // other…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by lk9015
Comment options

You must be logged in to vote
2 replies
@c-smile
Comment options

@lk9015
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #99 on May 10, 2021 17:42.