How can I retrieve a file using WKWebView?

Right now, WKWebView instances will ignore any of the default networking storages (NSURLCache, NSHTTPCookieStorage, NSCredentialStorage) and also the standard networking classes you can use to customize the network requests (NSURLProtocol, etc.). So the cookies of the WKWebView instance are not stored in the standard Cookie storage of your App, and so NSURLSession/NSURLConnection which only uses … Read more

Safari jittering/jumping (bug?) on first “focus” event of page load

I’ve had this issue a while back and honestly I don’t remember what exactly was the cause but here are some of the steps I followed: Check that you don’t have hide() and show() for the same element in the next line or vice versa. Example: el.show() el.hide() Change Custom fonts to “Arial” For the … Read more

iOS/iPadOS safari push api support

iOS don’t support the W3C Spec web push notifications yet. But there is a Safari specific API for web notifications. Refer to this answer on multiple options you have. https://stackoverflow.com/a/49803408/1057093 Update: Corrected the Answer in the above link to clarify proprietary solution is only for OS X – Safari and no solution for iOS Safari … Read more

Disable pinch zoom in webkit (or electron)

UPDATE 2: Use webFrame.setZoomLevelLimits (v0.31.1+) in render process (Differences Between Main Process and Renderer Process). Because smart zoom on mac still work with document.addEventListener. Example require(‘electron’).webFrame.setZoomLevelLimits(1, 1) UPDATE: deltaY property for pinch zoom has float value, but normal scroll event return int value. Now solution has no problem with ctrl key. Demo 2. document.addEventListener(‘mousewheel’, function(e) … Read more

Multiple webkit animations

You can separate multiple animations with a , and set a delay on the second one if needed: -webkit-animation: shrink 2s ease-out, pulsate 4s 2s infinite ease-in-out; 2s in the second animation is the delay Since Chrome 43 and Safari 9/9.2, the -webkit- prefix is only needed for Blackberry and UC (Android) browser. So the … Read more

Tint image using CSS without overlay

Eventually it will be, using shaders. See the W3C Docs on Filters. At the moment, what is possible for instance is: -webkit-filter: grayscale; /*sepia, hue-rotate, invert….*/ -webkit-filter: brightness(50%); See David Walsh on CSS Filters Stackoverflow: apply a rose tint…: W3C Filter Effects 1.0 Docs – 38.2.5. Other uniform variables: the CSS shaders parameters Update: Adobe … Read more

How to run JavaScript using jsc on OS X?

Complements of this post, JSC lives at /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc and is not in the shell PATH by default. You can fix that with ln -s /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc /usr/local/bin jsc takes filenames as arguments. You could run a file named demo.js with jsc demo.js Note that you’ll have to use debug() instead of the conventional console.log() in your … Read more

Is there a way to use the WebKit web inspector from a Cocoa WebView object?

A REALLY easy way to do it… is in the terminal…. ⌘ ⬆ ☺ defaults write com.yourcompany.yourbundleid WebKitDeveloperExtras TRUE (With OSX 10.8, use defaults write com.yourcompany.yourbundleid WebKitDeveloperExtras -bool true instead). NOTE: You MUST change com.yourcompany.yourbundleid to YOUR specific “apps” (or whatever company’s app bundle ID it may be) before this will work!** The nice thing … Read more

How to embed WebKit into my C/C++/Win32 application?

Brent Fulgham has put lots of work into producing a Windows Cairo port of WebKit, which doesn’t rely on Apple’s proprietary backend stuff (e.g. CoreGraphics, CoreFoundation, CFNetwork). I believe that is what you are after. The details aren’t entirely collated in one place, but there is some information in the Trac wiki and other bits … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)