並び順

ブックマーク数

期間指定

  • から
  • まで

201 - 240 件 / 251件

新着順 人気順

DOMの検索結果201 - 240 件 / 251件

  • GitHub - Pernosco/DOMRec: DOM Recorder

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

      GitHub - Pernosco/DOMRec: DOM Recorder
    • DOMDOMタイムス#6: 鏡の国のDOMラッパー、あるいはブラウザ内部のDOMとJSのDOMの結びつきについての覚書

      DOMDOMタイムス、今日はDOMの内部実装の話。話を単純にするため、V8の実装を念頭において進めていくよ。 ふだんJavaScriptで操作しているDOMのオブジェクトは、ブラウザ内部で管理されているDOMのオブジェクトとは別のものだよという話。 これだけ聞くと当たり前かもしれないけど、周辺をふかぼりして考えてみるとけっこう面白かったわけです👶 DOMの実体、そしてDOM wrapper さっそくだけどDOMの実体はブラウザ内部、例えばchromiumならC++の世界に存在していることに思いを馳せてほしいのです。 考えてみればchromiumの場合、ページを構築するのはBlinkというレンダリングエンジンなわけで、C++で実装されたBlinkがHTMLやらCSSやら場合によってはscriptまで含めた材料からDOMを構成してくれています。 BlinkがC++の世界、というかブラウザ内部

        DOMDOMタイムス#6: 鏡の国のDOMラッパー、あるいはブラウザ内部のDOMとJSのDOMの結びつきについての覚書
      • Release v1.3.0 · lit/lit

        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

          Release v1.3.0 · lit/lit
        • Web の仕様を眺めるシリーズ Soft Navigations Performance Entry | Offers Tech Blog

          Offers を運営している株式会社 overflow の あほむ でございます。 本記事は Chrome Platform Status からなんとなく Proposed/In Development etc なステータスのフィーチャーを取り上げて、そのプロポーザルを眺めてみるシリーズです。前回は form-sizing field-sizing CSS property でした。 SPA 的な画面遷移を性能計測したい 今回は Soft Navigations Performance Entry を眺めてみます。本当に眺めるだけで深入りしないので概要のみのライトな記事とご認識ください。 SPA 的な画面遷移とはつまり History.pushState や History.replaceState を用いた JavaScript 駆動なナビゲーションを指します。このような遷移を指してここ

            Web の仕様を眺めるシリーズ Soft Navigations Performance Entry | Offers Tech Blog
          • アクセシブルなWebモーダルを作る


            Instacart Instacart 1Web React-Modal使    
              アクセシブルなWebモーダルを作る
            • 【JavaScript】DOM の変化を監視する MutationObserver – webfrontend.ninja

              MutationObserver の使い方 まずは MutationObserver の使い方を簡単に紹介します。次のサンプルは span 要素のテキストの変更を検知して、変更前のテキストと変更後のテキストをコンソールに出力します。 // MutationObserver オブジェクトを生成 const observer = new MutationObserver((mutations) => { const rec = mutations[0]; // MutationRecord オブジェクト const before = rec.removedNodes[0].data; // 変更前のテキスト const after = rec.addedNodes[0].data; // 変更後のテキスト console.log('「' + before + '」が「' + after + '

                【JavaScript】DOM の変化を監視する MutationObserver – webfrontend.ninja
              • Declarative Shadow DOM

                We’re pleased to announce that support for the declarative shadow DOM API has been added and enabled by default in Safari Technology Preview 162. To recap, shadow DOM is a part of Web Components, a set of specifications that were initially proposed by Google to enable the creation of reusable widgets and components on the web. Since then these specifications have been integrated into the DOM and H

                • codeamigo

                  New Project 🐷 Porkybank: Track your daily budgetLearn to Code Like a DeveloperCodeamigo is an AI powered coding assistant that helps you learn to code like a developer. Today's developers didn't learn binary before learning Python, why should you learn how to code without the most modern tools?PSA: I will no longer be maintaining Codeamigo. I am working on a new project called Porkybank. It's a t

                    codeamigo
                  • JScriptでXMLを操作するスクリプトをNode.js+xmldomに移植する|TechRacho by BPS株式会社


                    Glx64x JScript+MSXML便 XMLWindowsJavaScriptDOM WineWinecscript.exejscript.dll(SpiderMonkey)Windows JScript UTF-8 使WindowsLinuxWine JScriptNode.js+xmldom
                      JScriptでXMLを操作するスクリプトをNode.js+xmldomに移植する|TechRacho by BPS株式会社
                    • PHPでスクレイピング。phpQueryとphp-simple-html-dom-parserの比較と設置方法

                        PHPでスクレイピング。phpQueryとphp-simple-html-dom-parserの比較と設置方法
                      • Release Version 23.2.0 · jsdom/jsdom

                        This release switches our CSS selector engine from nwsapi to @asamuzakjp/dom-selector. The new engine is more actively maintained, and supports many new selectors: see the package's documentation for the full list. It also works better with shadow trees. There is a potential of a performance regression due to this change. In our stress test benchmark, which runs most of these 273 selectors against

                          Release Version 23.2.0 · jsdom/jsdom
                        • 1669945 - Sanitizer bypass if the sanitized markup is assigned to srcdoc

                          I've found a bug in Firefox sanitizer that can be exploited if the result of sanitizeToString is used in a sink that doesn't parse the HTML using fragment parsing algorithm (examples being: iframe.srcdoc, data:text/html,markup etc.) Proof of concept Here's the proof-of-concept: <iframe id=ifr></iframe> <script> const bypass = `<svg><font color><title><u rel="</title><img src onerror=alert(document

                          • 【JavaScript】DOMの基本 - Qiita

                            はじめに Javascriptを学ぶ上で欠かせないDOMについて、基礎的な部分を固めたいのでまとめました。 学習サイトやなんやらでJavaScriptの文法的な基礎を学んだ後、次は?みたいな人(わたし)が多いと思います。 そんな方のステップアップに繋がるのがDOMなのかなーと思ってるので、DOM操作に慣れていければいいなと。 目次 DOMとは DOMで何ができるようになるのか 要素の取得をする 要素取得のメソッド 要素にアクセスして変更を加える クラスを操作する DOMとは 「Document Object Model」の略です。 HTMLはHTML文章と呼ばれることもあり、文章=Document。 つまりHTML(XMLなども)オブジェクトとして扱い、それを操作するためのモデルです。 その操作をすることを DOM API や DOM と呼びます。 DOMで何ができるようになるのか Jav

                              【JavaScript】DOMの基本 - Qiita
                            • Your Ultimate Guide to Understanding DOM Events

                              Listening to and responding to events is a foundational skill for building software for the web. The Document Object Model, or DOM for short, has a powerful built-in event system. And yet, many of us have a pretty basic understanding of the DOM event system and only scratch the surface of the available power. This lack of understanding leads to bugs in our applications and writing lots of code to

                                Your Ultimate Guide to Understanding DOM Events
                              • Chrome 拡張を使って今開いているタブの DOM を操作する - Qiita

                                Content Scripts を使う。 ボタン押下とかショートカットキーとかそういうイベントで操作したいなら、 Background から content script のイベントハンドラを呼ぶことになる。 以下、 選択したテキストを<samp>要素でラップする例。 chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) { if (request.text == "code-block") { const selection = window.getSelection().toString().replace(/\n/g, "<br/>"); const insertContent = `<samp>${selection}</samp>`; document.execCommand("

                                  Chrome 拡張を使って今開いているタブの DOM を操作する - Qiita
                                • The WHATWG Blog — Newline normalizations in form submission

                                  If you work with form submissions, you might have noticed that form values containing newlines are normalized to CRLF, no matter whether the DOM value had LF or CR instead: <form action="./post" method="post" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="hidden" value="a&#x0D;b&#x0A;c&#x0D;&#x0A;d" /> <input type="submit" /> </form> <script> // Checking that the DOM has t

                                  • Making of: The Sanitizer API (Nullcon 2022)

                                    Making of: The Sanitizer API Frederik Braun Staff Security Engineer at Mozilla @freddyb 1 Questions? Comments? ✉️ freddyb@mozilla.com

                                      Making of: The Sanitizer API (Nullcon 2022)
                                    • 【JavaScript】insertAdjacentHTMLでHTML要素を追加する【挿入位置指定】

                                      text 「text」にはHTMLやXMLとして挿入することができる文字列を指定します。 下記はinsertAdjacentHTMLのpositionに各値を指定して実行した際の挿入場所を表したものです。コメントの位置に「text」に記述したHTML要素が挿入されます。 <!-- beforebegin --> <div> <!-- afterbegin --> intotheprogram <!-- beforeend --> </div> <!-- afterend --> insertAdjacentHTMLでHTML要素を追加する では、実際に各「position」にHTML要素を追加してみます。下記のHTML要素に対して、段落のタグを追加します。 <div id="box"> <h1>Title</h1> </div> 各「position」を指定した際の実行結果も記載しておりま

                                        【JavaScript】insertAdjacentHTMLでHTML要素を追加する【挿入位置指定】
                                      • Difference between getElementByID and querySelector

                                        Assume you have a valid HTML element in DOM. I assumed the following snippets to be the same. let id = "037e3778-e157-4715-bff5-e466230fe7a3" const byId = document.getElementById(id) console.log(byId) // works const bySelectorConcat = document.querySelector("#" + id) console.log(bySelectorConcat) // Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#037e3778-e157-4715-bff5-e

                                          Difference between getElementByID and querySelector
                                        • TreeWalker - Web API | MDN

                                          TreeWalker オブジェクトは、文書のサブツリーのノードおよびその位置を表します。 TreeWalker は document オブジェクトの Document.createTreeWalker() (en-US) メソッドを使用して作成可能です。 このインターフェイスが継承するプロパティはありません。 TreeWalker.root 読取専用 TreeWalker を作成したときに指定したルートノードを表す Node を返します。 TreeWalker.whatToShow (en-US) 読取専用 提供しなければならない Node の型を表す定数で構成されるビットマスクである unsigned long を返します。一致しないノードはスキップされますが、その子は関連があれば含まれます。使用できる値は以下のとおりです。 定数 数値 説明

                                            TreeWalker - Web API | MDN
                                          • 高負荷時もなめらかなマウスの移動軌跡を取得する : (*x).b=z->a+y/c

                                            ◆ mousemove の代わりに pointermove を使うと PointerEvent を受け取れる ◆ PointerEvent の getCoalescedEvents() を使ってイベントを取得すると 高負荷時に mousemove で取れなかった座標のイベントも取得できる ◆ getPredictedEvents() を使うとほんの少し未来の座標を予測できる 知名度が低い?せいで探すのに苦戦したマウスの移動の履歴を取得する必要がありました 普通にやると mousemove イベントにリスナを設定してイベントが起きたときの座標を取得します ただ この方法って負荷が高いときには飛び飛びになったりで あまり正確じゃないんですよね 以前それをうまくやる方法を使ったことがあったはず なのですが何というメソッドを使ったかを全然覚えてなくて苦戦しました ググればすぐに出ると思ったのに そ

                                              高負荷時もなめらかなマウスの移動軌跡を取得する : (*x).b=z->a+y/c
                                            • Vanilla JSの108の一般的なDOMタスク:HTML DOMプロジェクト

                                              Spring BootによるAPIバックエンド構築実践ガイド 第2版 何千人もの開発者が、InfoQのミニブック「Practical Guide to Building an API Back End with Spring Boot」から、Spring Bootを使ったREST API構築の基礎を学んだ。この本では、出版時に新しくリリースされたバージョンである Spring Boot 2 を使用している。しかし、Spring Boot3が最近リリースされ、重要な変...

                                                Vanilla JSの108の一般的なDOMタスク:HTML DOMプロジェクト
                                              • "macrotask" isn't a thing by jakearchibald · Pull Request #74 · WICG/scheduling-apis

                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                  "macrotask" isn't a thing by jakearchibald · Pull Request #74 · WICG/scheduling-apis
                                                • Web Performance: Minimising DOM Reflow/Layout Thrashing

                                                  This article has been updated! Please follow this link for the most up-to-date content. In this article, I will be listing a few ways by which a DOM reflow / layout shift event might occur, why it’s bad, how to track these events and how to minimise its occurrences mitigating its effects.

                                                    Web Performance: Minimising DOM Reflow/Layout Thrashing
                                                  • Chrome Platform Status

                                                    • GitHub - ged-odoo/blockdom: A fast virtual dom library

                                                      Probably the fastest virtual dom library in the world! IMPORTANT: blockdom is just a proof of concept and a place to experiment some ideas. This is not intended to be used in a real application, no real support will be given! However, it is designed to be the rendering engine of the Owl framework! blockdom is a very fast virtual dom library. Its main selling point is that it does not represent DOM

                                                        GitHub - ged-odoo/blockdom: A fast virtual dom library
                                                      • https://bugs.chromium.org/p/chromium/issues/detail?id=1065085

                                                        • Learn | Next.js

                                                          SetupFirst, let’s make sure that your development environment is ready. If you don’t have Node.js installed, install it from here. You’ll need Node.js version 18 or higher.You’ll be using your own text editor and terminal app for this tutorial.If you are on Windows, we recommend downloading Git for Windows and use Git Bash that comes with it, which supports the UNIX-specific commands in this tutor

                                                            Learn | Next.js
                                                          • GitHub - dumijay/CalDOM: An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.

                                                            An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM. Instead of pulling you into a library-specific magical world, CalDOM let you fully access the DOM directly while keeping the reactivity 💥. So you could take full advantage of native APIs & mix it with other libraries to gain superior performance & flexibility in the development process. A 2-in-1 virtu

                                                              GitHub - dumijay/CalDOM: An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
                                                            • Latest topics > Virtual DOMでなく生のDocumentFragmentを与えてDOMを差分更新したいって話 - outsider reflex

                                                              Latest topics > Virtual DOMでなく生のDocumentFragmentを与えてDOMを差分更新したいって話 宣伝。日経LinuxにてLinuxの基礎?を紹介する漫画「シス管系女子」を連載させていただいています。 以下の特設サイトにて、単行本まんがでわかるLinux シス管系女子の試し読みが可能! « 安眠を手に入れるために工作と裁縫した Main 「もっと考えろよ」「想像力なさすぎだろ」みたいな言い方を僕はしたくないなっていう話 » Virtual DOMでなく生のDocumentFragmentを与えてDOMを差分更新したいって話 - Mar 09, 2020 この記事はQiitaとのクロスポストです。 概要 FirefoxのアドオンやChromeの拡張機能向けに、名前空間をまたいでDOMに変更を差分適用したい場面で使える、Virtual DOMでないReal

                                                              • 【JavaScript】Mutation ObserverでDOMを監視する - Qiita


                                                                Mutation Observer DOMWeb API Mutation Observer使   idsample // idsample const targetNode = document.getElementById('sample');
                                                                  【JavaScript】Mutation ObserverでDOMを監視する - Qiita
                                                                • 【DOM操作(前編)】JavaScriptのaddEventListenerについて、「・・したら」をまとめてみた - Qiita

                                                                  【DOM操作(前編)】JavaScriptのaddEventListenerについて、「・・したら」をまとめてみたJavaScriptes6初学者向けdom操作 今回はJavaScriptのDOM操作の 「addEventListener」 についてまとめてみました。 DOM操作初心者の方のご参考になれば嬉しいです。 基本的なDOM操作(addEventListener)の流れ ①まずは要素の取得。 ②取得した要素にaddEventListenerで処理を追加する → このaddEventListenerの第一引数と第二引数が重要です ③処理の"きっかけ(第一引数)"を記述 →⭐️今回のメインはこの③になります。 ④"処理を関数内(第二引数)"に記述 →→※こちらは次回(後編)で紹介します... ※慣れている方は①②は飛ばしてOK ①要素を取得する DOM操作をする上でまずはHTMLに記述

                                                                    【DOM操作(前編)】JavaScriptのaddEventListenerについて、「・・したら」をまとめてみた - Qiita
                                                                  • HTML/JavaScriptでページ最上部からの位置を取得する方法

                                                                    こんにちは、kz_moritaです。 最近はVue.js / Nuxt.js あたりで Web フロントを書いたりしています。 今回は、ページの最上部からある特定のDOMの位置座標を取得するのにちょっとつまづいたため、そのことについてまとめておきます。 試した方法 以下の二種類の方法を試しました。 HTMLElement.offsetTop Element.getBoundingClientRect().top + window.pageYOffset 結論から言うと、ページの最上部からの位置を取得する仕様は2つ目の方法で実現することができました。 HTMLElement.offetTop HTMLElement.offsetTopの仕様は以下のサイトに詳しく書いています。 https://developer.mozilla.org/ja/docs/Web/API/HTMLElement/

                                                                      HTML/JavaScriptでページ最上部からの位置を取得する方法
                                                                    • JavaScriptでDOMレンジを扱う

                                                                      CodeZine編集部では、現場で活躍するデベロッパーをスターにするためのカンファレンス「Developers Summit」や、エンジニアの生きざまをブーストするためのイベント「Developers Boost」など、さまざまなカンファレンスを企画・運営しています。

                                                                        JavaScriptでDOMレンジを扱う
                                                                      • worker-dom/web_compat_table.md at main · ampproject/worker-dom

                                                                        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                          worker-dom/web_compat_table.md at main · ampproject/worker-dom
                                                                        • GitHub - WebReflection/linkedom: A triple-linked lists based DOM implementation.

                                                                          import {DOMParser, parseHTML} from 'linkedom'; // Standard way: text/html, text/xml, image/svg+xml, etc... // const document = (new DOMParser).parseFromString(html, 'text/html'); // Simplified way for HTML const { // note, these are *not* globals window, document, customElements, HTMLElement, Event, CustomEvent // other exports .. } = parseHTML(` <!doctype html> <html lang="en"> <head> <title>Hell

                                                                            GitHub - WebReflection/linkedom: A triple-linked lists based DOM implementation.
                                                                          • GitHub - MachinisteWeb/vanilla-js-dom: Vanilla JS is a fast, lightweight, cross-platform framework for building incredible, powerful JavaScript applications.

                                                                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                              GitHub - MachinisteWeb/vanilla-js-dom: Vanilla JS is a fast, lightweight, cross-platform framework for building incredible, powerful JavaScript applications.
                                                                            • GitHub - cloudflare/html-rewriter-wasm: WebAssembly version of HTMLRewriter

                                                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                                GitHub - cloudflare/html-rewriter-wasm: WebAssembly version of HTMLRewriter
                                                                              • GitHub - taoqf/node-html-parser: A very fast HTML parser, generating a simplified DOM, with basic element query support.

                                                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                                  GitHub - taoqf/node-html-parser: A very fast HTML parser, generating a simplified DOM, with basic element query support.
                                                                                • Sakito on Twitter: "Next.jsのドキュメントにReactやDOMについて図解で解説があるんだけど、これ前はなかった気がする。 From JavaScript to React https://t.co/V2qggLyavY https://t.co/xdtwm4xoSA"

                                                                                  Next.jsのドキュメントにReactやDOMについて図解で解説があるんだけど、これ前はなかった気がする。 From JavaScript to React https://t.co/V2qggLyavY https://t.co/xdtwm4xoSA

                                                                                    Sakito on Twitter: "Next.jsのドキュメントにReactやDOMについて図解で解説があるんだけど、これ前はなかった気がする。 From JavaScript to React https://t.co/V2qggLyavY https://t.co/xdtwm4xoSA"