Comments (10)
Wasn't the new Edge built using Chromium as a base? Does it not replace the old IE webview?
edit: I don't quite understand. IE is not Webkit so what does IE have to do with it?
from webgui.
thought appendChild need dom ready, we can simply use onload even there is little different.
I've tested on win11.
#define CSS_INJECT_FUNCTION \
"(function(e){window.onload=function(){var " \
"t=document.createElement('style'),d=document.head||document." \
"getElementsByTagName('head')[0];t.setAttribute('type','text/" \
"css'),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document." \
"createTextNode(e)),d.appendChild(t)}})"
from webgui.
It is a known "bug", basically if you target Windows, you have to keep IE compatibility,
theres tools on JavaScript world to compile the JavaScript to older JavaScript compatible with Internet Explorer, like Babel and similar.
Basically of the 3 web engines built in the OS, the Windows one sucks the most.
Honestly I do not know a better way to fix that.
I look for other alternatives and libs to wrap but they tend to use .NET on Windows.
:(
from webgui.
It does not use Chromium, thats why is more light weight than ElectronJS.
:)
from webgui.
I got the same error on the blink example, that doesn't even use Javascript in the HTML part.
This error is from 'CSS_INJECT_FUNCTION' in webview.h
It is the only occurance of appendChild that I could find in the code.
I was able to run the example on windows without error message after making some modifications in the webview.h
I changed the webview.h from
#define CSS_INJECT_FUNCTION \
"(function(e){var " \
"t=document.createElement('style'),d=document.head||document." \
"getElementsByTagName('head')[0];t.setAttribute('type','text/" \
"css'),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document." \
"createTextNode(e)),d.appendChild(t)})"
to
#define CSS_INJECT_FUNCTION \
"(function(e){var " \
"t=document.createElement('style'),d=document.head||document." \
"getElementsByTagName('head')[0];t.setAttribute('type','text/" \
"css'),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document." \
"createTextNode(e))})"
After this, I needed to force to recompile the example with
nim c -r -f example.nim
However, this isn't any permanent solution.
The "blink" text stopped blinking in the application. So there are now issues with inline css. Maybe also other new CSS issues.
The CSS_INJECT_FUNCTION issue in the Webview.h was also in the original Webview code and was never changed. The code doesn't exists in the current webview main branch, as there were massive changes in March. A complete new webview branch was merged that changed webview.h completely: webview/webview@843c3aa#diff-90d68d8f03ac5ea2a94bf99d53d4b9d0
from webgui.
Did you guys manage to fix this ? I'm having exactly the same problem
from webgui.
@juancarlospaco I think in newWebView
result.css should not be called by default. this project main usage is create crossplatorm web based gui, the end developer will use their own design in common, I also notice jsTemplate
use arrow function syntax which is not supported in old IE webview, please alteast make this project usable.
from webgui.
Pull Request welcome, and will be merged, right now I do not have Windows to test easily.
from webgui.
why it was closed? this error stills persist
from webgui.
Using run_js example, first i get this error
Using @bung87 will prevent this error but it still (even without the fix) a second error happens:
wich wont fully load the js
from webgui.
Related Issues (12)
- Please use release tags to help with versioning HOT 1
- using karax with webgui? HOT 1
- Maximized wins HOT 8
- [Linux] TypeError: undefined is not an object (evaluating 'window.external.invoke') HOT 3
- import html from a variable HOT 1
- dataUriHtmlHeader should consistent with WEBVIEW_DATA_URL_PREFIX otherwise load from html string not work HOT 5
- Question: Can you use relative filepaths for HTML files? If not, how could you ship an application using webgui? HOT 7
- Bootstrap/Tailwind support HOT 6
- bindProcs issue: CONSOLE JS ERROR ReferenceError: Can't find variable: api HOT 3
- Can't import on MacOS Catalina HOT 6
- Linking on Windows fails: undefined reference to ShellExecute HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webgui.