並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 23 件 / 23件

新着順 人気順

call function inside settimeout javascriptの検索結果1 - 23 件 / 23件

  • 実装例から見る React のテストの書き方 - Cybozu Inside Out | サイボウズエンジニアのブログ

    2024/04/17: 更新 内容を更新した記事を書きましたので、よかったらこちらも併せて、ご覧ください。 zenn.dev こんにちは!フロントエンドエキスパートチームの@nus3_です。 kintone のフロントエンド刷新プロジェクト(フロリア)では、品質を保ったまま開発を加速させるためにフロントエンドのテストを積極的に行っています。 今回はそんなフロントエンドのテストの実装例をいくつか紹介します。この記事がフロントエンドのテストを行う上での参考になれば幸いです。 テストに使用する主なパッケージ コンポーネントのテスト 補足: Testing Library の記法をチェックしてくれるeslint-plugin-testing-library カスタムフックのテスト 補足: React v18 では @testing-library/react の renderHook を使う 参考

      実装例から見る React のテストの書き方 - Cybozu Inside Out | サイボウズエンジニアのブログ
    • Bringing Javascript to WebAssembly for Shopify Functions - Shopify

      Bringing Javascript to WebAssembly for Shopify FunctionsWhile we’re working on getting our Shopify Functions infrastructure ready for the public beta, we thought we’d use this opportunity to shine some light on how we brought JavaScript to WebAssembly, how we made everything fit within our very tight Shopify Function constraints, and what our plans for the future look like. At Winter Editions 2023

        Bringing Javascript to WebAssembly for Shopify Functions - Shopify
      • Announcing TypeScript 5.4 - TypeScript

        Today we’re excited to announce the release of TypeScript 5.4! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

          Announcing TypeScript 5.4 - TypeScript
        • Wasm core dumps and debugging Rust in Cloudflare Workers

          Wasm core dumps and debugging Rust in Cloudflare Workers2023-08-14 A clear sign of maturing for any new programming language or environment is how easy and efficient debugging them is. Programming, like any other complex task, involves various challenges and potential pitfalls. Logic errors, off-by-ones, null pointer dereferences, and memory leaks are some examples of things that can make software

            Wasm core dumps and debugging Rust in Cloudflare Workers
          • Patterns for Memory Efficient DOM Manipulation with Modern Vanilla JavaScript – Frontend Masters Blog

            Patterns for Memory Efficient DOM Manipulation with Modern Vanilla JavaScript I’ll discuss best practices to avoid excess memory usage when managing updating the DOM to make your apps blazingly fast™️. DOM: Document Object Model – A Brief Overview When you render HTML, the live view of those rendered elements in the browser is called the DOM. This is what you’ll see in your developer tools “Elemen

              Patterns for Memory Efficient DOM Manipulation with Modern Vanilla JavaScript – Frontend Masters Blog
            • AbortController is your friend

              AbortController is your friend One of my favorite new features of JS is the humble AbortController, and its AbortSignal. It enables some new development patterns, which I'll cover below, but first: the canonical demo. It's to use AbortController to provide a fetch() you can abort early: Sorry, your browser doesn't support an inline demo. And here's a simplified version of the demo's code: fetchBut

                AbortController is your friend
              • New Architecture is here · React Native

                React Native 0.76 with the New Architecture by default is now available on npm! In the 0.76 release blog post, we shared a list of significant changes included in this version. In this post, we provide an overview of the New Architecture and how it shapes the future of React Native. The New Architecture adds full support for modern React features, including Suspense, Transitions, automatic batchin

                  New Architecture is here · React Native
                • Explicit Resource Management: Exploring JavaScript's and TypeScript's new feature | iliazeus

                  One of my favorite new features of JavaScript and TypeScript is explicit resource management. It brings new syntax, using foobar = ..., that enables RAII, reducing boilerplate when managing the lifecycle of various resources. In this article, I will explore this feature as implemented in TypeScript 5.2.0 with the disposablestack polyfill. I will mention both sync and async resources, DisposableSta

                  • jott - js_gc_in_wasm

                    # JavaScript Garbage Collection with WebAssembly is Possible Today *by [@bwasti](https://twitter.com/bwasti)* **** tl;dr - Using [WeakRefs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef), you can pretty easily implement automatic memory management for objects exposed from WebAssembly with JavaScript's garbage collector. *(Keep in mind "automatic memory ma

                    • Introducing TanStack Start Middleware – Frontend Masters Blog

                      TanStack Start is one of the most exciting full-stack web development frameworks I’ve seen. I’ve written about it before. In essence, TanStack Start takes TanStack Router, a superb, strongly-typed client-side JavaScript framework, and adds server-side support. This serves two purposes: it gives you a place to execute server-side code, like database access; and it enables server-side rendering, or

                        Introducing TanStack Start Middleware – Frontend Masters Blog
                      • Browser-Powered Desync Attacks: A New Frontier in HTTP Request Smuggling

                        This request triggered an extremely suspicious intermittent 400 Bad Request response from various websites that were running AWS Application Load Balancer (ALB) as their front-end. Investigation revealed that ALB was mysteriously adding a 'Transfer-Encoding: chunked' header while downgrading the request to HTTP/1.1 for forwarding to the back-end, without making any alterations to the message body:

                          Browser-Powered Desync Attacks: A New Frontier in HTTP Request Smuggling
                        • CTA Modal: How To Build A Web Component — Smashing Magazine

                          In this article, Nathan Smith explains how to create modal dialog windows with rich interaction that will only require authoring HTML in order to be used. They are based on Web Components that are currently supported by every major browser. I have a confession to make — I am not overly fond of modal dialogs (or just “modals” for short). “Hate” would be too strong a word to use, but let’s say that

                            CTA Modal: How To Build A Web Component — Smashing Magazine
                          • An overview of Node.js: architecture, APIs, event loop, concurrency

                            Warning: This blog post is outdated. Instead, read chapter “An overview of Node.js: architecture, APIs, event loop, concurrency” in “Shell scripting with Node.js”. This blog post gives an overview of how Node.js works: What its architecture looks like. How its APIs are structured. A few highlights of its global variables and built-in modules. How it runs JavaScript in a single thread via an event

                            • JavaScript vs JavaScript. Fight!

                              With software development, we are often presented with alternative choices for libraries and tools that appear to accomplish the same sort of things. Each one will advertise its key advantages, and we attempt to weigh the pros and cons. Sometimes, the differentiators have less to do with what we are accomplishing and everything with how we accomplish it. In those cases, it isn't always as clear wh

                                JavaScript vs JavaScript. Fight!
                              • The seventh way to call a JavaScript function without parentheses

                                The seventh way to call a JavaScript function without parentheses Published: 12 September 2022 at 13:00 UTC Updated: 18 September 2022 at 17:20 UTC I thought I knew all the ways to call functions without parentheses: alert`1337` throw onerror=alert,1337 Function`x${'alert\x281337\x29'}x``` 'alert\x281337\x29'instanceof{[Symbol['hasInstance']]:eval} valueOf=alert;window+'' x=new DOMMatrix;matrix=al

                                  The seventh way to call a JavaScript function without parentheses
                                • React & Javascript Optimization Techniques

                                  Photo by Clément Hélardot on UnsplashWhen we begin a project, we tend to focus on things like scalability, usability, availability, security, and others. But, as the application grows, we may observe a decline in its speed and performance. It is often only at this point that we recognize the need for optimization. In this article, we will present some of the most common techniques for optimizing c

                                    React & Javascript Optimization Techniques
                                  • JavaScript Interview Questions

                                    Here is a list of common JavaScript interview questions with detailed answers to help you prepare for the interview as a JavaScript developer. JavaScript continues to be a cornerstone of web development, powering dynamic and interactive experiences across the web. As the language evolves, so does the complexity and scope of interview questions for JavaScript developers. Whether you’re a fresher de

                                      JavaScript Interview Questions
                                    • Scheduling Internals

                                      A sneak peek to what's coming! I remember when I first learned that you can write a server handling millions of clients running on just a single thread, my mind was simply blown away 🤯 I used Node.js while knowing it is single threaded, I used async / await in Python, and I used threads, but never asked myself "How is any of this possible?". This post is written to spread the genius of concurrenc

                                        Scheduling Internals
                                      • Some mistakes Rust doesn't catch

                                        Thanks to my sponsors: Mike English, Anson VanDoren, Malik Bougacha, Antoine Rouaze, Brooke Tilley, Em Sharnoff, kuerbsikakteen, Nicolas Riebesel, Matt Jadczak, Bob Ippolito, Corey Alexander, Simon Menke, Carson Page, Jelle Besseling, Taneli Kaivola, you got maiL, Sean Bryant, Manuel Hutter, Ben Mitchell, Matt Heise and 253 more I still get excited about programming languages. But these days, it’s

                                          Some mistakes Rust doesn't catch
                                        • The most accurate way to schedule a function in a web browser

                                          TL;DRThe setTimeout function is okay, but overall, for a 250ms theoretical timeout, the real/effective timeout value ranges from 251ms to 1.66+s.As of October 2020, the most accurate way of scheduling a function/callback is using the setTimeout function in a Web Worker, in a cross-origin iframe.The requestAnimationFrame function is the least accurate and requires to be inside the viewport, otherwi

                                            The most accurate way to schedule a function in a web browser
                                          • March 2024 (version 1.88)

                                            Update 1.88.1: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the March 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Apply custom editor labels - Distinguish between editors with same file names. Locked scrolling -

                                              March 2024 (version 1.88)
                                            • Understanding React Server Components | Tony Alicea

                                              React Server Components have lifted server-rendering to be a truly first-class citizen of the React ecosystem. They allow developers to render some components on the server, while attempting to abstract away the divide between the client and server. Devs can interleave Client and Server Components in their code as if all the code was running in one place. Yet, abstractions always come at a cost. W

                                                Understanding React Server Components | Tony Alicea
                                              • Account hijacking using "dirty dancing" in sign-in OAuth-flows

                                                Account hijacking using “dirty dancing” in sign-in OAuth-flows Combining response-type switching, invalid state and redirect-uri quirks using OAuth, with third-party javascript-inclusions has multiple vulnerable scenarios where authorization codes or tokens could leak to an attacker. This could be used in attacks for single-click account takeovers. Frans Rosén, Security Advisor at Detectify goes t

                                                  Account hijacking using "dirty dancing" in sign-in OAuth-flows
                                                1