Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding source codes #11

Open
Eliyanan opened this issue Oct 1, 2016 · 1 comment
Open

Hiding source codes #11

Eliyanan opened this issue Oct 1, 2016 · 1 comment

Comments

@Eliyanan
Copy link

Eliyanan commented Oct 1, 2016

Hello pravic, i wanted to do the UI code inside my .py source code. is that possible. i didnt want to expose all my styling and tiscript code.. because anybody can edit it. thanks.

@pravic
Copy link
Member

pravic commented Oct 1, 2016

In general, there is a Host.set_html (usually called from Window), so you can keep your resources anywhere (in zip with password, in encrypted file, on your server, etc.).

Also take note about Host.on_load_data, where you can intercept resources load requests and override with your own path:

HTML loaded into Sciter may contain external resources: CSS (Cascading Style Sheets), images, fonts, cursors and scripts. To get any of such resources Sciter will first send SC_LOAD_DATA notification to your application using callback function defined in code of your application. Your application can

  • provide your own data for such resources (for example from resource section, DB or other storage of your choice)
  • or delegate resource loading to built-in HTTP client and file loader
  • or discard loading at all.

http://sciter.com/developers/embedding-principles/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants