chromium

Puppeteer Throwing Invalid Parameters Error

六眼飞鱼酱① 提交于 2019-12-25 00:12:19
问题 I am trying to convert an HTML content to PDF, but I am getting Invalid parameters for scale and preferCSSPageSize when passed using variables. Error Message: Error: Protocol error (Page.printToPDF): Invalid parameters scale: double value expected; preferCSSPageSize: boolean value expected at Promise (/home/santhosh-4759/Downloads/node-v8.11.3-linux-x64/bin/node_modules/puppeteer/lib/Connection.js:202:56) at new Promise () Command Used: ./node puppeteerpdf.js test.pdf 1 false '' '' false

Navigate on same page via element id in electron

 ̄綄美尐妖づ 提交于 2019-12-24 18:50:29
问题 I want to navigate via href in <a> elements in electron. Which works like a charm in Firefox throws following exception in Electron/Chromium: Not allowed to navigate top frame to data URL The element (transformed via XSLT stylesheet from an XML, so I can't really change it) looks e.g. like this: <a href="#idPFMOB">Mobility</a> where the element with the id idPFMOB is an <h2> -Tag. As I said, this works in Firefox when I open the file there, but throws given exception in Chromium. Is there a

-webkit-margin-before

半城伤御伤魂 提交于 2019-12-24 02:15:51
总的来说:这是CSS3.0的对于文章段P容器的定义方法语句!display:block这个样式,只定义了P容器为一个块;后面四句是CSS3中的样式定义方法;-webkit-margin-before: 1em;-webkit-margin-after: 1em;分别定义p的上边距和下边距的数值是1倍字体高度,如10px像素的字,那么边距就为10px; -webkit-margin-start: 0px;-webkit-margin-end: 0px; 上面二句则定义为左右边距都为0PX,这个应该好理解;所以以上p {display: block;-webkit-margin-before: 1em;-webkit-margin-after: 1em;-webkit-margin-start: 0px;-webkit-margin-end: 0px;}相当于CSS2.0中的p { display: block; margin-top: 1em; margin-bottom: 1em; margin-right: 0px; margin-left: 0px;} 但由于CSS3.0要求浏览器版本较高,所以国内并没有流行CSS3.0样式,依然以CSS2.0为主流,但以后应该是CSS3.0的天下,因为它代表着先进性。 下面是讲下它的由来:

Last revision Chromium Embedded Framework 3

你说的曾经没有我的故事 提交于 2019-12-24 02:09:51
问题 Where can I find the latest revision of the Chromium Embedded Framework 3 for Delphi? I downloaded it from this page with TortoiseSVN: http://code.google.com/p/dcef3/ because CEF1 gave too many problems, but it is a very old revision, there is a download of the revision 24, but the latest revision is 823. Could you tell me where to find the latest version for Delphi-XE2? Thank you very much. 回答1: There are three projects that have been mentioned here: chromiumembedded, latest revision 996

MARGIN-BEFORE MARGIN-AFTER MARGIN-START MARGIN-END

て烟熏妆下的殇ゞ 提交于 2019-12-23 22:41:11
总的来说:这是CSS3.0的对于文章段P容器的定义方法语句!display:block这个样式,只定义了P容器为一个块;后面四句是CSS3中的样式定义方法;-webkit-margin-before: 1em;-webkit-margin-after: 1em;分别定义p的上边距和下边距的数值是1倍字体高度,如10px像素的字,那么边距就为10px; -webkit-margin-start: 0px;-webkit-margin-end: 0px; 上面二句则定义为左右边距都为0PX,这个应该好理解;所以以上p {display: block;-webkit-margin-before: 1em;-webkit-margin-after: 1em;-webkit-margin-start: 0px;-webkit-margin-end: 0px;}相当于CSS2.0中的p { display: block; margin-top: 1em; margin-bottom: 1em; margin-right: 0px; margin-left: 0px;} 但由于CSS3.0要求浏览器版本较高,所以国内并没有流行CSS3.0样式,依然以CSS2.0为主流,但以后应该是CSS3.0的天下,因为它代表着先进性。 下面是讲下它的由来:

What does this gyp syntax mean?

久未见 提交于 2019-12-23 20:18:17
问题 I have been digging up chromium code recently, then I found piece of code that I could not understand. File is located at src/media/media.gyp Can someone explain what this line means in plain English? The line I don't understand : '<!@(<(pkg-config) --cflags libpulse)', The code : ['OS!="linux"', { 'sources!': [ 'audio/cras/audio_manager_cras.cc', 'audio/cras/audio_manager_cras.h', 'audio/cras/cras_input.cc', 'audio/cras/cras_input.h', 'audio/cras/cras_unified.cc', 'audio/cras/cras_unified.h'

speechSynthesis.getVoices() is empty array in Chromium Fedora

寵の児 提交于 2019-12-23 13:53:38
问题 Is Speech Synthesis API supported by Chromium? Do I need to install voices? If so how can I do that? I'm using Fedora. Is voices like video that I need to install extra package for it to work? I've tried this code: var msg = new SpeechSynthesisUtterance('I see dead people!'); msg.voice = speechSynthesis.getVoices().filter(function(voice) { return voice.name == 'Whisper'; })[0]; speechSynthesis.speak(msg); from article Web apps that talk - Introduction to the Speech Synthesis API but the

In Puppeteer how to switch to chrome window from default profile to desired profile

让人想犯罪 __ 提交于 2019-12-23 12:27:54
问题 My requirement is to test chrome extensions on a new profile. I referred https://peter.sh/experiments/chromium-command-line-switches/ for Chromium args[--user-data-dir, --profile-directory] After the browser is launched, 2 chrome windows are opened. One with given profile and extension and another with default profile and given extension. Also the focus is on a window with default profile. So all actions are happening on it. I had expected that only 1 browser window would be opened with

node-webkit equivalent for sinatra?

大城市里の小女人 提交于 2019-12-23 10:17:06
问题 I've been thinking about learning how to make simple Mac OS X applications based on web-technology and I came across node-webkit which seems compelling. However, I've recently invested in learning the basics of Sinatra/Ruby and I wanted to stay on that course. Is there a "node-webkit equivalent" for developers who use Sinatra? Or, is there a recommended way to use the Sinatra framework (or Ruby) to build OS X apps that are essentially web wrappers? 回答1: Sinatra is a server-side framework.

delphi CEF4 Chromium do not show web sites with secure connection error

你离开我真会死。 提交于 2019-12-23 06:34:06
问题 I am created an application with CEF4 Chromium that browse pages in a local network. but my page has "Secure Connection Error" because of my url begin with "https". for example "https://10.36.159.212/login.html" my program don't display anything at Chromiumwindow or CEFWindowParent. it would be appriciate that help me. 回答1: By default, CEF cancels the request when a certificate issue occurs during its navigation. Hard to say what you want to do in your case, but in general, you should not