JavaScript

RSS for tag

Discuss the JavaScript programing language.

Posts under JavaScript tag

200 Posts

Post

Replies

Boosts

Views

Activity

Web Speech Synthesis API: not all voices installed listed
I'm developing an application using the Web Speech API for speech synthesis. According to the API specification SpeechSynthesis.getVoices() should retrieve the voices available on the system. On my iPad Pro, 12,9 inch, 3rd generation, iOS 16 however this doesn't return all voices installed on the system. In system settings (Accessibility -> Spoken content -> Voices -> German) e.g. I see these voices: Anna Eloquence Markus Petra Siri Viktor Yannick However if for SpeechSynthesis.getVoices() I only get the voices within the group "Eloquence": Eddy Flo Grandma Grandpa Reed Rocko Sandy Shelley All other voices (Anna, Markus, etc.) are missing. Is this a bug or is it intended by Apple that it's impossible to use all voices? This is independent of the browser, it's the same for Safari, Chrome or Firefox. Use this in order to test which voices are available using the WebSpeech API: https://plnkr.co/edit/E2etsrUZVOVfrDwG
7
6
3.4k
Jan ’23
Swift to JavaScript communication
Hey, I would like to monitor whether my app is going to the background or comes back to the foreground. Then everytime when it stays in the background for more than 1min I would like to sent an information to my JS code and trigger some function there. I tried to set an observer through NotificationCenter to check app position (background/foreground) but then in the selector I am not able to make a connection between my Swift and JS code. I also tried with userContentController. Firstly send a message from JS and handle it using replyHandler but this is a one-time action and I couldn't call replyHandler every time the timer on the swift side will expire. Is there any way I can notify my JS about app being in the background for more than 1min without the need of constantly sending messeges from JS code?
0
0
891
Jan ’23
Iphone App written with Cordova and standard web technologies.
Can anyone give me a definitive answer to the following. I know a number of web technologies but not Swift or Xcode. I wish to write an app that makes use of Cordova and standard web technologies that will be accepted when submitted to the App Store. The one thing that I don't wish to do is spend the next four plus weeks developing it only to find it will be rejected. I don't really have time to expand my knowledge of Swift at this juncture. I have read so many contradicting rules so any guidance would be really appreciated. Many thanks.
2
0
2.5k
Jan ’23
Cant use node js
I am getting this issue while trying to load my application with node js. I think it's got to do with some some settings but im not sure. This is running under M1 chip imac. Feeling frustrated hope someone can help me out! architecture (have 'x86_64', need 'arm64e')), mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
3
0
1.6k
Dec ’22
onKeyDown/onKeyUp keyboard event doesn't fire on iOS 16.1 when tab/arrow key is pressed on external keyboard
I have an onKeyDown event handler in button but that doesn't get fired when any key is pressed on the external keyboard. When I press tab/shift+tab focus moves to the button. But any key press on the button is not triggering keyboard events. This is my code <button onKeyDown={(e) => {console.log(e);}}>Click here</button> Keyboard events are not getting fired for any of the html elements even with tabIndex=0.
0
0
1.1k
Dec ’22
Missing required column 'label' in json. at "HandPoseAssests.json"
I have created the .json file according to the https://developer.apple.com/documentation/createml/building-an-object-detector-data-source here is my .json file below     {         "imagefilename":"Five Fingers.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "Five Fingers"             }         ]     },     {         "imagefilename": "One Finger.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "One Finger"             }         ]     },     {         "imagefilename": "Two Finger.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "Two Finger"             }         ]     },     {         "imagefilename": "Four Finger.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "Four Finger"             }         ]     }     ] but it shows error as Missing required column 'label' in json. at "NameOfJsonFile.json" Were am I Wrong
2
0
1.5k
Dec ’22
Script connection error in mobile ios16 version
hello. We will send you an e-mail if you have any inquiries during web system maintenance. It only occurs on iPhone iOS 16 or later. The js files linked to the JSP file with are not properly connected, so the screen is broken and the button does not work. The whole js file is not loaded, but it is cut and loaded to see if an error occurs, but it works normally in versions prior to Android and IOS16. Please reply after review. thank you
0
0
747
Nov ’22
What are the requirements for an insurance app to pass the review ?
Hello! I work as mobile developer in a legal company that produces insurance softwares. We're now working on a mobile app that works with some other websites and systems, its objective is to let our customers have easy access to their personal information, check amounts, do payments and more.. Our app is close to the following existing apps: Aetna Health app Oscar Health We'd like to know what we should do in addition to development and tests. Based on Apple store review guidelines, we understand that we must add anything related to modeling, functional spec and demos. I'd like to know if we must provide our modeling docs, like some diagrams or details about main use cases, actors (including external systems), sequences? or its unnecessary? FYI: Our app is built with a cross-platform technology known as Expo and React Native (You can look on Google if this new to you), and its intended to work on iOS and Android both. We consider OS as a modeling entity and we have some customizations based on each OS. I feel confused, and really need help before we proceed to review test. Please help. Thanks in advance!
2
0
1k
Nov ’22
iOS 16 beta3, Canvas appears blurry
We found that canvas of the same size is more blurry in iOS 16 Beta 3. Here's the code: <!DOCTYPE html> <html lang="en"> <head> <title>Document</title> <style> #app { height: 586px; width: 1170px; } </style> </head> <body> <canvas height="586px" width="1170px" id="app"></canvas> <script> const el = document.getElementById('app'); const ctx = el.getContext('2d'); ctx.font = '80px Arial'; ctx.fillText('Hello World', 100, 100) </script> </body> </html> Oddly enough, if you set the height of the code above to 585 px(one pixel less), the text on the canvas becomes clear. This will only happen with iOS Beta 3. ref: https://bugs.webkit.org/show_bug.cgi?id=242847
18
21
3.2k
Nov ’22
Safari IOS 16.0, css scale property bug
Hi there, Working on my website, I was using new shorthand property named scale. When using this scale property on a div to scale: 20; my images disappears (behind?) until scale transition ends. Works fine on Chrome. When using transform: scale(20) everything works fine. Link: https://drive.google.com/drive/folders/1HB13sujiXKI9xsm3h8g8dlaw0bFsIYrr?usp=sharing HTML : <div class="circle"></div> Css : .circle{   transition-duration: 600ms;   position: absolute;   width: 50px;   height: 50px;   background-color: red;   border-radius: 50%;   left: -50px;   top: -50px; } .scale-circle{   transition-duration: 600ms; scale: 20; /* BUG */ transform: scale(20); /* No bug */ } JS : const nav_overlay = document.querySelector('.circle') nav_overlay.classList.toggle('scale-circle')
0
1
2.1k
Oct ’22
IndexDB AbortError on ASWebAuthenticationSession
When opening a session to log into my website, there is, if exists, information stored in IndexDB we are trying to access from a previous session. Ideally, information from living in Safari, but would settle for information in the parent app or instance. My understanding was information 'like cookies' was available, but documentation is seemlingly vague around this topic. I have struggled to find anything explaining the availability of IndexDB specifically, although it does work in one case (I'm about to experiment with it, so I just know of one now). Upon first loading of the page, a get call: const ids: string[]; const results = await this.db.entities.bulkGet(ids); In the logs, I see there is this error: _e: Error: Error name: AbortError message: The operation was aborted. AbortError: The operation was aborted. inner: DOMException: The operation was aborted. Immediately after, because there is supposed to be some result from the database, the site creates a new entity, and stores it with no issue. This information does not persist however, as opening a second session, the same operation happens due to the same error. We're using XState, which typically is able to catch this error and continue, sometimes does not catch the error, and the state stands still. So far, this behavior has only been experience on iOS with ASWebAuthenticationSession (not ephemeral). Any insight would be appreciated, even if it means abandoning this webview class for something more for this purpose.
0
0
909
Oct ’22
White Space at the Bottom on IOS Safari
When I am applying the CSS property "position: fixed" on the body a white space appears at the bottom of the screen. steps to reproduce the issue: open any page on ios safari hide the address bar by scrolling up apply css property position fixed on body You will see the extra space at the bottom of the screen. This area will be filled with address bar if the address bar is open.
1
2
4.6k
Oct ’22
I can’t open logism on my Mac book air
I deleted and reinstalled Java and logism multiple times. I contacted apple support and they recommended the safe mode, that still did not work. Please help I’ve been fighting with this for over a week and I have an assignment due this week with it.
Replies
0
Boosts
0
Views
682
Activity
Feb ’23
WKWebView: how to display a big HTML5 canvas?
Hello, Viewport is 1180x820 on iPad, even if screen resolution is 2360x1640. If I set up a canvas of 2360x1640, only a quarter is displayed on my WKWebView. And I have to display a 2360x1640 canvas. So I'm not able to display it in my WKWebView on my iPad. I'm sure I do something wrong. Could you please help me? Regards, Alex
Replies
0
Boosts
0
Views
756
Activity
Feb ’23
Web Speech Synthesis API: not all voices installed listed
I'm developing an application using the Web Speech API for speech synthesis. According to the API specification SpeechSynthesis.getVoices() should retrieve the voices available on the system. On my iPad Pro, 12,9 inch, 3rd generation, iOS 16 however this doesn't return all voices installed on the system. In system settings (Accessibility -> Spoken content -> Voices -> German) e.g. I see these voices: Anna Eloquence Markus Petra Siri Viktor Yannick However if for SpeechSynthesis.getVoices() I only get the voices within the group "Eloquence": Eddy Flo Grandma Grandpa Reed Rocko Sandy Shelley All other voices (Anna, Markus, etc.) are missing. Is this a bug or is it intended by Apple that it's impossible to use all voices? This is independent of the browser, it's the same for Safari, Chrome or Firefox. Use this in order to test which voices are available using the WebSpeech API: https://plnkr.co/edit/E2etsrUZVOVfrDwG
Replies
7
Boosts
6
Views
3.4k
Activity
Jan ’23
Electron Builder
is possible to send in apple store a software created with electron-builder? thanks
Replies
1
Boosts
0
Views
947
Activity
Jan ’23
Swift to JavaScript communication
Hey, I would like to monitor whether my app is going to the background or comes back to the foreground. Then everytime when it stays in the background for more than 1min I would like to sent an information to my JS code and trigger some function there. I tried to set an observer through NotificationCenter to check app position (background/foreground) but then in the selector I am not able to make a connection between my Swift and JS code. I also tried with userContentController. Firstly send a message from JS and handle it using replyHandler but this is a one-time action and I couldn't call replyHandler every time the timer on the swift side will expire. Is there any way I can notify my JS about app being in the background for more than 1min without the need of constantly sending messeges from JS code?
Replies
0
Boosts
0
Views
891
Activity
Jan ’23
Iphone App written with Cordova and standard web technologies.
Can anyone give me a definitive answer to the following. I know a number of web technologies but not Swift or Xcode. I wish to write an app that makes use of Cordova and standard web technologies that will be accepted when submitted to the App Store. The one thing that I don't wish to do is spend the next four plus weeks developing it only to find it will be rejected. I don't really have time to expand my knowledge of Swift at this juncture. I have read so many contradicting rules so any guidance would be really appreciated. Many thanks.
Replies
2
Boosts
0
Views
2.5k
Activity
Jan ’23
iOS 15.0 and iOS 16.0 - Focus doesn't move to links (<a> element) when pressing tab/shift+tab in external keyboard
While pressing tab/shift+tab using external keyboard focus doesn't move to tag elements even with tabIndex=0. This is my javascript code <a href="https://discussions.apple.com/" tabIndex={0}>Click here</a> Focus moves to all other html elements except link element.
Replies
1
Boosts
1
Views
1.5k
Activity
Jan ’23
Availability of letterSpacing <canvas> in Safari?
Do you have any idea when the "letterSpacing" property of CanvasRenderingContext2D API will be implemented in Safari? This feature is really useful for those who, like me, work with fonts on canvas. https://caniuse.com/mdn-api_canvasrenderingcontext2d_letterspacing
Replies
0
Boosts
0
Views
985
Activity
Jan ’23
Cant use node js
I am getting this issue while trying to load my application with node js. I think it's got to do with some some settings but im not sure. This is running under M1 chip imac. Feeling frustrated hope someone can help me out! architecture (have 'x86_64', need 'arm64e')), mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
Replies
3
Boosts
0
Views
1.6k
Activity
Dec ’22
Access iOS triple camera and micro camera in Javascript web application
I have a JavaScript web application which scans ID image using back camera. In iPhone 14, the image capture is always blurred because the camera is not focusing the object close to camera. Is there a way to access micro camera feed or to adjust focus? Or to get a camera feed that adjust focus automatically depending upon the object position?
Replies
0
Boosts
0
Views
698
Activity
Dec ’22
onKeyDown/onKeyUp keyboard event doesn't fire on iOS 16.1 when tab/arrow key is pressed on external keyboard
I have an onKeyDown event handler in button but that doesn't get fired when any key is pressed on the external keyboard. When I press tab/shift+tab focus moves to the button. But any key press on the button is not triggering keyboard events. This is my code <button onKeyDown={(e) => {console.log(e);}}>Click here</button> Keyboard events are not getting fired for any of the html elements even with tabIndex=0.
Replies
0
Boosts
0
Views
1.1k
Activity
Dec ’22
Missing required column 'label' in json. at "HandPoseAssests.json"
I have created the .json file according to the https://developer.apple.com/documentation/createml/building-an-object-detector-data-source here is my .json file below     {         "imagefilename":"Five Fingers.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "Five Fingers"             }         ]     },     {         "imagefilename": "One Finger.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "One Finger"             }         ]     },     {         "imagefilename": "Two Finger.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "Two Finger"             }         ]     },     {         "imagefilename": "Four Finger.HEIC",         "annotation": [             {                 "coordinates": {                     "y": 156.062,                     "x": 195.122,                     "height": 148.872,                     "width": 148.03                 },                 "label": "Four Finger"             }         ]     }     ] but it shows error as Missing required column 'label' in json. at "NameOfJsonFile.json" Were am I Wrong
Replies
2
Boosts
0
Views
1.5k
Activity
Dec ’22
I there a way to disable audioSession for particular website?
I want to disable a widget Now playing for a specific website. Can this be done with an injected script or with the standard macOS libraries?
Replies
0
Boosts
0
Views
842
Activity
Dec ’22
Script connection error in mobile ios16 version
hello. We will send you an e-mail if you have any inquiries during web system maintenance. It only occurs on iPhone iOS 16 or later. The js files linked to the JSP file with are not properly connected, so the screen is broken and the button does not work. The whole js file is not loaded, but it is cut and loaded to see if an error occurs, but it works normally in versions prior to Android and IOS16. Please reply after review. thank you
Replies
0
Boosts
0
Views
747
Activity
Nov ’22
What are the requirements for an insurance app to pass the review ?
Hello! I work as mobile developer in a legal company that produces insurance softwares. We're now working on a mobile app that works with some other websites and systems, its objective is to let our customers have easy access to their personal information, check amounts, do payments and more.. Our app is close to the following existing apps: Aetna Health app Oscar Health We'd like to know what we should do in addition to development and tests. Based on Apple store review guidelines, we understand that we must add anything related to modeling, functional spec and demos. I'd like to know if we must provide our modeling docs, like some diagrams or details about main use cases, actors (including external systems), sequences? or its unnecessary? FYI: Our app is built with a cross-platform technology known as Expo and React Native (You can look on Google if this new to you), and its intended to work on iOS and Android both. We consider OS as a modeling entity and we have some customizations based on each OS. I feel confused, and really need help before we proceed to review test. Please help. Thanks in advance!
Replies
2
Boosts
0
Views
1k
Activity
Nov ’22
iOS 16 beta3, Canvas appears blurry
We found that canvas of the same size is more blurry in iOS 16 Beta 3. Here's the code: <!DOCTYPE html> <html lang="en"> <head> <title>Document</title> <style> #app { height: 586px; width: 1170px; } </style> </head> <body> <canvas height="586px" width="1170px" id="app"></canvas> <script> const el = document.getElementById('app'); const ctx = el.getContext('2d'); ctx.font = '80px Arial'; ctx.fillText('Hello World', 100, 100) </script> </body> </html> Oddly enough, if you set the height of the code above to 585 px(one pixel less), the text on the canvas becomes clear. This will only happen with iOS Beta 3. ref: https://bugs.webkit.org/show_bug.cgi?id=242847
Replies
18
Boosts
21
Views
3.2k
Activity
Nov ’22
iPad Home Screen Web App no keyboard
I'm seeing an issue with a PWA when added to the home screen. The Keyboard will eventually stop opening. when clicking on an input field. this happens with bmw.com, instagram.com. Once it happens on one PWA, all PWA's are effected. Is this a known issue?
Replies
17
Boosts
6
Views
8.5k
Activity
Oct ’22
Safari IOS 16.0, css scale property bug
Hi there, Working on my website, I was using new shorthand property named scale. When using this scale property on a div to scale: 20; my images disappears (behind?) until scale transition ends. Works fine on Chrome. When using transform: scale(20) everything works fine. Link: https://drive.google.com/drive/folders/1HB13sujiXKI9xsm3h8g8dlaw0bFsIYrr?usp=sharing HTML : <div class="circle"></div> Css : .circle{   transition-duration: 600ms;   position: absolute;   width: 50px;   height: 50px;   background-color: red;   border-radius: 50%;   left: -50px;   top: -50px; } .scale-circle{   transition-duration: 600ms; scale: 20; /* BUG */ transform: scale(20); /* No bug */ } JS : const nav_overlay = document.querySelector('.circle') nav_overlay.classList.toggle('scale-circle')
Replies
0
Boosts
1
Views
2.1k
Activity
Oct ’22
IndexDB AbortError on ASWebAuthenticationSession
When opening a session to log into my website, there is, if exists, information stored in IndexDB we are trying to access from a previous session. Ideally, information from living in Safari, but would settle for information in the parent app or instance. My understanding was information 'like cookies' was available, but documentation is seemlingly vague around this topic. I have struggled to find anything explaining the availability of IndexDB specifically, although it does work in one case (I'm about to experiment with it, so I just know of one now). Upon first loading of the page, a get call: const ids: string[]; const results = await this.db.entities.bulkGet(ids); In the logs, I see there is this error: _e: Error: Error name: AbortError message: The operation was aborted. AbortError: The operation was aborted. inner: DOMException: The operation was aborted. Immediately after, because there is supposed to be some result from the database, the site creates a new entity, and stores it with no issue. This information does not persist however, as opening a second session, the same operation happens due to the same error. We're using XState, which typically is able to catch this error and continue, sometimes does not catch the error, and the state stands still. So far, this behavior has only been experience on iOS with ASWebAuthenticationSession (not ephemeral). Any insight would be appreciated, even if it means abandoning this webview class for something more for this purpose.
Replies
0
Boosts
0
Views
909
Activity
Oct ’22
White Space at the Bottom on IOS Safari
When I am applying the CSS property "position: fixed" on the body a white space appears at the bottom of the screen. steps to reproduce the issue: open any page on ios safari hide the address bar by scrolling up apply css property position fixed on body You will see the extra space at the bottom of the screen. This area will be filled with address bar if the address bar is open.
Replies
1
Boosts
2
Views
4.6k
Activity
Oct ’22