Safari Developer Tools

RSS for tag

Inspect, edit, debug, and check the performance of your web content using Safari developer tools.

Safari Developer Tools Documentation

Posts under Safari Developer Tools tag

99 Posts
Sort by:
Post not yet marked as solved
0 Replies
193 Views
I have read in lots of places on google related to this topic and everywhere its mentioned that webp is supportive after safari 14, but in my case its still not working. Also wants to know which image format should we use for good optimised website. Thank You.
Posted
by
Post marked as solved
2 Replies
349 Views
In Safari AppExtensions we have this API made available https://developer.apple.com/documentation/safariservices/sfsafariextensionhandling/3238030-contentblocker?changes=_8__2 optional func contentBlocker(withIdentifier contentBlockerIdentifier: String, blockedResourcesWith urls: [URL], on page: SFSafariPage) Is there something made available to WebExtension given WebRequest blocking isn't available in Safari.
Posted
by
Post not yet marked as solved
0 Replies
265 Views
Hi Developers, I created a custom oracle application which is working fine in Windows browser and android browsers, but not working within iframe in IOS15. Previously, it was working fine but after upgradation in IOS15 My application is not working any more within Iframe although it is working without iframe in same IOS testing Device which is useless for me. i am trying to fix this issue from last 6 months but unable to resolve. Any pointers to solve this issue will be greatly appreciated. Thanks in Advance
Posted
by
Post not yet marked as solved
1 Replies
318 Views
Hi there - I am trying to port over Chrome extension over to Safari Web extension. Looks like Safari has a very aggressive permissions flow which isn't a great user experience but I get the privacy benefits. I am trying to move some of my permissions like <all_urls> or tabs as optional permissions and build a flow where I can request the user for them in hopes that i can educate them as to why I need them similar to how Chrome/FF have it. However when i use browser.permissions.request - i always end up getting true without invoking the prompt. The prompt seems to come up regardless when i start visiting a website. Can someone help with this? Sounds more like a defect in Safari.
Posted
by
Post not yet marked as solved
1 Replies
331 Views
Safari version : 15.3 Os version : 12.2.1 This is after latest updates and manifest v3 is not supported. So i need to downgrade manifest version to 2. What can be the solution to run manifest v3 with current mac and safari version? Also, My safari is not getting updated after updating os, Im using intel processor. What can be done to update safari version to 15.4?
Posted
by
Post not yet marked as solved
0 Replies
242 Views
I have problems with interacting with elements, such as clinking on a button. Steps: Create a new SafariDriver Navigate to a page with a button element Find the button element Click on the button element RESULT: The click is not performed on the button element. This is not working from the recent update to safari 15.3 The only workaround is to click using JavaScript.
Posted
by
Post not yet marked as solved
0 Replies
412 Views
I am trying to make a safari extension that will redirect some specific URLs to some other URLs. background.js function redirect(event) { console.log("called ") const redirectURL = "https://apple.com/" chrome.tabs.update(event.tabId, { url: redirectURL }) } // This works and redirects everything to apple.com chrome.webNavigation.onBeforeNavigate.addListener(redirect) /* tabs.update doesn't work as soon as URL filter is added, but the same piece of code works in a chrome extension but not in safari OnBeforeNavigate is called on accessing girlcodeit.com as the console statement is printed on accessing girlcodeit.com but tab is not updated. */ chrome.webNavigation.onBeforeNavigate.addListener(redirect, { url: [ { urlMatches: "https://girlcodeit.com/*" }, { urlMatches: "http://girlcodeit.com/*" } ] }) manifest.json "manifest_version": 2, "name": "", "description": "", "version": "1.0", "background": { "scripts": [ "background.js" ] }, "permissions": [ "webNavigation", "tabs" ] } How do I redirect only specific URLs and not all URLs or is there something wrong with the above piece of code, but because it works on chrome, it could be a bug in safari?
Posted
by
Post not yet marked as solved
2 Replies
341 Views
Hi I'm new at developing, I want to learn how to call an api in xcode but deal with an error in the view controller.  the error tells 'cannot find xxxx in scope'. I know that I didn't define that xxxx anywhere but I don't know where should I put it. please help me by giving some example about calling an api in xcode or some information about how to call an api in xcode.
Posted
by
Post not yet marked as solved
1 Replies
201 Views
Hello guys. I used a Google Chrome and their dev tools and every time its worked perfect. Now I buy a new Mac and start using Safari Dev Tools... and i cannot use it anymore. Sometimes a want to just open link in page, that is in new tab, and I cannot, just see a blank start page with no content. Sometimes dev web inspector freezes and slow loading. Sometimes when I click some link, web redirects back and I need to click again.... Its very frustrating when develops web sites. Another bad think is, that when I have pages in groups and in one group I have something played (music, video, etc) when I click on another group, media stops playing. Why it is not work just like tabs in some category? So I need to return back to Chrome Tools, when everything's works on 150 percents. With regards Martin Jemelka
Posted
by
Post not yet marked as solved
0 Replies
178 Views
I have a Safari App Extension that uses an instance of WkWebView to run JavaScript code. This app extension runs flawlessly with Safari 13 & 14, but Safari 15 occasionally kills the WkWebView instance for no apparent reason. The only thing logged to the console is this message: (JavaScriptCore) Received an invalid message "<unknown message receiver>.<unknown message>" from the web process. SafariExtension: (WebKit) [com.apple.WebKit:Process] 0x10c2e9300 - WebProcessProxy didClose (web process crash) SafariExtension: (WebKit) [com.apple.WebKit:Process] 0x7ff1e7048020 - [pageProxyID=5, webPageID=6, PID=22131] WebPageProxy::processDidTerminate: (pid 22131), reason 3 I can't find any correlation between the JavaScript that's running and that error. The error seemingly occurs at random. Has anyone else experienced such a problem? Thanks
Posted
by
Post not yet marked as solved
0 Replies
230 Views
Websites are not scrollable (not responding to touch swipe up/down gesture) in bottom area (around bottom 5% marked on screen). I have noticed on that area i am unable to scroll webpage only if i have moved address bar the top of browser (marked on screen2). Issue appears only when webpage is long and in due to scrolling all bars are going to be hidden. Tested on XS, 13 mini - same effect, ios 15.3 and earlier. https://feedbackassistant.apple.com/feedback/9837732 cant upload images, so you may find here https://imgur.com/xXHM97x https://imgur.com/CZhsOEs
Posted
by
Post not yet marked as solved
0 Replies
268 Views
Hey Apple-Community, Safari is currently asking to autofill a password for the current domain, is it possible to force Safari asking for an explicit other one? Example User visits https://exaple.com now Apple shows password for the website https://exaple.com but the user has the same password on this website like on https://other.net so Safari should be forced to list up https://other.net passwords on https://exaple.com login form. Thanks for helping me out. Jorit Vásconez Gerlach
Post not yet marked as solved
0 Replies
216 Views
I'm working on a Safari Web Extension that is migrated from Chrome/Firefox. Using the Web Inspector Storage tab has some strangeness. Note there is one key/value pair showing test = test. I execute await browser.storage.local.clear(). But the display does not change. I execute await browser.storage.local.get('test') and I get undefined, but the display still shows test = test. I execute await browser.storage.local.set({test: 'test 123'}) and I get undefined. No change to the display. I execute await browser.storage.local.get('test') and I get "test 123". Display still says test = test. All of this leaves me wondering "What is that display showing? Is it not the local storage associated with the extension? And if not, how can I view the extension's local storage area?"
Posted
by
Post not yet marked as solved
1 Replies
249 Views
Hi there, I am a new apple user, I have a question I have and when I open it on safari, my website appears without responsiveness, can anyone guide me is there a safari issue or issue with my website. Website URL: https://cleanermachineinfo.com/
Posted
by
Post not yet marked as solved
0 Replies
259 Views
I am on MacOS 12.1 and on safari java script is enabled in the preferences still the sites that require java are not working. On the terminal: ~ % java -version java version "1.8.0_321" Java(TM) SE Runtime Environment (build 1.8.0_321-b07) Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)
Posted
by
Post not yet marked as solved
0 Replies
405 Views
I added CSP policy that works in all the browsers except in safari with multiple exceptions as shown in the [picture]( ) especially usersnap tool CSP policy I have used <add name="Content-Security-Policy" value="upgrade-insecure-requests; base-uri 'self'; frame-ancestors 'self'; form-action 'self'; object-src 'none'; default-src 'self' https: 'unsafe-eval';style-src https: 'unsafe-inline'; worker-src * 'self' blob: ;child-src 'self' blob://* blob:*; img-src * data: blob://* blob:*;script-src-elem 'self' https://static.ambita.com 'self' 'unsafe-eval' 'unsafe-inline' https://*.usersnap.com data: blob://* blob:*;frame-src * 'self' blob://* blob:*;"/> It would be great if you help us here
Posted
by
Post not yet marked as solved
1 Replies
266 Views
Hello, I am a new developer so sorry if the answer is obvious and I’m somehow missing it. The current script I have in index.html is this: document.getElementById('someID').addEventListener('click', async () => { chrome.tabs.query({ currentWindow: true, active: true }, (tabs) => { chrome.tabs.sendMessage(tabs[0].id, { key: 'value' }) }) And the code I have in script.js looks like: chrome.runtime.onMessage.addListener((message) => { message.key && script[message.key].run(message.args);}); This works perfectly fine in Chrome, but what commands would I use to do the same thing in Safari? Any assistance would be greatly appreciated, Thank you
Posted
by
Post marked as solved
1 Replies
403 Views
Hi! So im coding and I’m about to lauch the app via the simulator but I’t crashes and I get this error message. Thread 1: “-[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x130f0a530” And I've located the bug but I don’t understand it. The bug happens when I connect the collection view from the mainstory.board to the view controller. Specifically when I add the dataSource from the collection view to the view controller, how can I fix this, cause without this I just get a blanc screen on the sim? I'd happily share the project if that helps solving the issue!
Posted
by