Simple. Posted February 19, 2019 Share Posted February 19, 2019 Hello guys I have problem when use fontawesome with cef Showing a squares i try use link or download it but same problem Link to comment
Moderators IIYAMA Posted February 19, 2019 Moderators Share Posted February 19, 2019 Did you optimise it for web? A tool I use a lot: fontsquirrel.com 1 Link to comment
Simple. Posted February 19, 2019 Author Share Posted February 19, 2019 Problem sloved by using SVG Instead of CSS But there is another question if I can include a web page via iframe in CEF browser ? Link to comment
Moderators IIYAMA Posted February 19, 2019 Moderators Share Posted February 19, 2019 2 minutes ago, Simple. said: Problem sloved by using SVG Instead of CSS But there is another question if I can include a web page via iframe in CEF browser ? I am very sure that CORS will block it, if it is from another domain. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS But a way around that would be making a XMLHttpRequest https://developer.mozilla.org/nl/docs/Web/API/XMLHttpRequest And put the website inside of the contentWindow. https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow Of course, there are some seriously limitations to this, as images, css, js are received with other requests. So to answer your question: `It depends.` If the CSS, JS, images and other content are embedded then there will be no problem. 1 Link to comment
Simple. Posted February 19, 2019 Author Share Posted February 19, 2019 (edited) 54 minutes ago, IIYAMA said: I am very sure that CORS will block it, if it is from another domain. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS But a way around that would be making a XMLHttpRequest https://developer.mozilla.org/nl/docs/Web/API/XMLHttpRequest And put the website inside of the contentWindow. https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow Of course, there are some seriously limitations to this, as images, css, js are received with other requests. So to answer your question: `It depends.` If the CSS, JS, images and other content are embedded then there will be no problem. I tried to embed YouTube but didn't work requestBrowserDomains ({"googlevideo.com", "ytimg.com", "ggpht.com", "youtube.com"}) Edited February 19, 2019 by Simple. Link to comment
Moderators IIYAMA Posted February 19, 2019 Moderators Share Posted February 19, 2019 2 minutes ago, Simple. said: I tried to embed YouTube but didn't work requestBrowserDomains ({"googlevideo.com", "ytimg.com", "ggpht.com", "youtube.com"}) I don't think that is enough for just a Youtube video. Open your default browser. Go to the youtube video you want to watch. Open the inspector. Go to the network tab. Reload the page. And see the list of requests + domains showing up one by one. 1 Link to comment
Simple. Posted February 19, 2019 Author Share Posted February 19, 2019 2 minutes ago, IIYAMA said: I don't think that is enough for just a Youtube video. Open your default browser. Go to the youtube video you want to watch. Open the inspector. Go to the network tab. Reload the page. And see the list of requests + domains showing up one by one. I used this method But the browser is local, does that affect? Link to comment
Moderators IIYAMA Posted February 19, 2019 Moderators Share Posted February 19, 2019 4 minutes ago, Simple. said: I used this method But the browser is local, does that affect? yup 1 Link to comment
Addlibs Posted February 19, 2019 Share Posted February 19, 2019 (edited) 11 minutes ago, Simple. said: But the browser is local, does that affect? Yeah. If the browser is local, it's local only, and cannot communicate with the internet on it's own. This is because local browsers enable extended JavaScript functionality, namely, calling events etc. in MTA. If this was allowed, a malicious website would be able call events and exploit client-sided code, perhaps even the server-side integration of it. Browsers that can communicate with the internet, have that functionality disabled for that reason. Technically you could get around this by loading the contents through fetchRemote and injecting that into a local browser, but as mentioned above, this would be very difficult to get images and anything else that loads in a separate request unless you parse the fetch's return as a browser would and make those additional requests through fetchRemote too. This would likely also be a lot slower than a non-local browser. Edited February 19, 2019 by MrTasty 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now