id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
Mmdn_fetch_File/819540cc6ee31eac647f_27_0.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. [ Learn more about bidirectional Unicode characters ](https://github.co/hiddenchars)
Mmdn_fetch_File/applyjavascriptinter_6_0.txt
* [ Actions Automate any workflow ](https://github.com/features/actions) * [ Packages Host and manage packages ](https://github.com/features/packages) * [ Security Find and fix vulnerabilities ](https://github.com/features/security) * [ Codespaces Instant dev environments ](https://github.com/features/codespace...
Mmdn_fetch_File/applyjavascriptinter_27_0.txt
# Provide feedback
Mmdn_fetch_File/819540cc6ee31eac647f_29_0.txt
| const createConfetti = ( ) => { ---|--- | const confettiBtn = document . querySelector ( ".confettiButton" ) | const words = document . querySelector ( "p" ) | if ( words ) { | confettiBtn . textContent = "Click me for confetti!" | confettiBtn . style . backgroundColor = "aqua...
Mmdn_fetch_File/javascriptlabelhtml_44_0.txt
Additional navigation options
Mmdn_fetch_File/ab2c48cca03af052912b_33_0.txt
| module . exports = { ---|--- | button : 'button' | } ;
Mmdn_fetch_File/Mmdn_fetch_3_3.txt
https://www.mozilla.org/en-US/careers/listings/?team=ProdOps) * [ Advertise with us ](/en-US/advertising) ## Support * [ Product help ](https://support.mozilla.org/products/mdn-plus) * [ Report an issue ](/en-US/docs/MDN/Community/Issues) ## Our communities * [ MDN Community ](/en-US/community) * [ MDN ...
Mmdn_fetch_File/Mmdn_file_6_2.txt
"EiB", "ZiB", "YiB", ]; const exponent = Math.min( Math.floor(Math.log(numberOfBytes) / Math.log(1024)), units.length - 1, ); const approx = numberOfBytes / 1024 ** exponent; const out...
Mmdn_fetch_File/Mmdn_file_1_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/ab2c48cca03af052912b_13_0.txt
* [ Star 0 ](/login?return_to=https%3A%2F%2Fgist.github.com%2Fnecolas%2Fab2c48cca03af052912bc2f1f633fb56) You must be signed in to star a gist * [ Fork 0 ](/login?return_to=https%3A%2F%2Fgist.github.com%2Fnecolas%2Fab2c48cca03af052912bc2f1f633fb56) You must be signed in to fork a gist
Mmdn_fetch_File/applyjavascriptinter_42_0.txt
* [ Notifications ](/login?return_to=%2Fmdn%2Flearning-area) * [ Fork 26.6k ](/login?return_to=%2Fmdn%2Flearning-area) * [ Star 6.7k ](/login?return_to=%2Fmdn%2Flearning-area)
Mmdn_fetch_File/applyjavascriptinter_25_0.txt
Clear
Mmdn_fetch_File/ab2c48cca03af052912b_25_0.txt
**button.js**
Mmdn_fetch_File/applyjavascriptinter_90_0.txt
## Footer
Mmdn_fetch_File/applyjavascriptinter_89_0.txt
</ html >
Mmdn_fetch_File/applyjavascriptinter_88_0.txt
</ body >
Mmdn_fetch_File/javascriptlabelhtml_12_0.txt
By Solution
Mmdn_fetch_File/Mmdn_file_6_3.txt
ple, we're turning the element with the ID ` dropbox ` into our drop zone. This is done by adding listeners for the [ ` dragenter ` ](/en- US/docs/Web/API/HTMLElement/dragenter_event "dragenter") , [ ` dragover ` ](/en-US/docs/Web/API/HTMLElement/dragover_event "dragover") , and [ ` drop ` ](/en-US/docs/Web/API/HTMLEle...
Mmdn_fetch_File/applyjavascriptinter_65_0.txt
* Blame
Mmdn_fetch_File/javascriptlabelhtml_37_0.txt
[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fmdn%2Flearning- area%2Fblob%2Fmain%2Fjavascript%2Fintroduction-to-js-1%2Fwhat-is- js%2Fjavascript-label.html)
Mmdn_fetch_File/Mmdn_file_2_2.txt
MDN * [ About ](/en-US/about) * [ Blog ](/en-US/blog/) * [ Careers ](https://www.mozilla.org/en-US/careers/listings/?team=ProdOps) * [ Advertise with us ](/en-US/advertising) ## Support * [ Product help ](https://support.mozilla.org/products/mdn-plus) * [ Report an issue ](/en-US/docs/MDN/Community/Is...
Mmdn_fetch_File/Mmdn_file_6_5.txt
I/File) in the [ ` FileList ` ](/en-US/docs/Web/API/FileList) represented by ` files ` : 1. Create a new list item ( [ ` <li> ` ](/en-US/docs/Web/HTML/Element/li) ) element and insert it into the list. 2. Create a new image ( [ ` <img> ` ](/en-US/docs/Web/HTML/Element/img) ) element. 3. Set the image's s...
Mmdn_fetch_File/javascriptlabelhtml_7_0.txt
Explore
Mmdn_fetch_File/ab2c48cca03af052912b_24_0.txt
[ Raw ](/necolas/ab2c48cca03af052912bc2f1f633fb56/raw/4a8ed2936cf9165f4869b300bd3f861fcea3ddb0/button.js)
Mmdn_fetch_File/Mmdn_fetch_3_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/819540cc6ee31eac647f_32_0.txt
[ ](https://github.com "GitHub") © 2024 GitHub, Inc.
Mmdn_fetch_File/ab2c48cca03af052912b_19_0.txt
Embed
Mmdn_fetch_File/applyjavascriptinter_47_0.txt
main
Mmdn_fetch_File/819540cc6ee31eac647f_0_0.txt
Skip to content
Mmdn_fetch_File/javascriptlabelhtml_5_0.txt
* Product
Mmdn_fetch_File/javascriptlabelhtml_45_0.txt
* [ Code ](/mdn/learning-area) * [ Issues ](/mdn/learning-area/issues) * [ Pull requests ](/mdn/learning-area/pulls) * [ Actions ](/mdn/learning-area/actions) * [ Security ](/mdn/learning-area/security) * [ Insights ](/mdn/learning-area/pulse)
Mmdn_fetch_File/819540cc6ee31eac647f_5_0.txt
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
Mmdn_fetch_File/Mmdn_fetch_7_2.txt
PI/AbortSignal) interfaces. js const controller = new AbortController(); const signal = controller.signal; const url = "video.mp4"; const downloadBtn = document.querySelector("#download"); const abortBtn = document.querySelector("#abort"); downloadBtn.addEventListener("clic...
Mmdn_fetch_File/819540cc6ee31eac647f_31_0.txt
## Footer
Mmdn_fetch_File/javascriptlabelhtml_0_0.txt
Skip to content
Mmdn_fetch_File/javascriptlabelhtml_13_0.txt
* [ CI/CD & Automation ](https://github.com/solutions/ci-cd) * [ DevOps ](https://github.com/solutions/devops) * [ DevSecOps ](https://resources.github.com/devops/fundamentals/devsecops)
Mmdn_fetch_File/applyjavascriptinter_32_0.txt
## Use saved searches to filter your results more quickly
Mmdn_fetch_File/applyjavascriptinter_0_0.txt
Skip to content
Mmdn_fetch_File/javascriptlabelhtml_34_0.txt
Query
Mmdn_fetch_File/Mmdn_fetch_7_3.txt
lt); } catch (error) { console.error("Error:", error); } } const photos = document.querySelector('input[type="file"][multiple]'); const formData = new FormData(); formData.append("title", "My Vegas Vacation"); for (const [i, photo] of Array.from(photos.files).entri...
Mmdn_fetch_File/ab2c48cca03af052912b_21_0.txt
Clone this repository at &lt;script src=&quot;https://gist.github.com/necolas/ab2c48cca03af052912bc2f1f633fb56.js&quot;&gt;&lt;/script&gt;
Mmdn_fetch_File/applyjavascriptinter_9_0.txt
* Solutions
Mmdn_fetch_File/Mmdn_file_3_3.txt
[ Careers ](https://www.mozilla.org/en-US/careers/listings/?team=ProdOps) * [ Advertise with us ](/en-US/advertising) ## Support * [ Product help ](https://support.mozilla.org/products/mdn-plus) * [ Report an issue ](/en-US/docs/MDN/Community/Issues) ## Our communities * [ MDN Community ](/en-US/community...
Mmdn_fetch_File/applyjavascriptinter_51_0.txt
Blame
Mmdn_fetch_File/ab2c48cca03af052912b_29_0.txt
[ Raw ](/necolas/ab2c48cca03af052912bc2f1f633fb56/raw/4a8ed2936cf9165f4869b300bd3f861fcea3ddb0/testIDs.js)
Mmdn_fetch_File/Mmdn_fetch_1_1.txt
ieving, setting, adding to, and removing headers from the list of the request's headers. A ` Headers ` object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like [ ` append() ` ](/en-US/docs/Web/API/Headers/append "append\(\)...
Mmdn_fetch_File/819540cc6ee31eac647f_12_0.txt
* [ Download ZIP ](/Reine0017/819540cc6ee31eac647fd42503500d78/archive/9bfd7b0076ea342f320389799497242206bc7ba2.zip)
Mmdn_fetch_File/819540cc6ee31eac647f_6_0.txt
{{ message }}
Mmdn_fetch_File/ab2c48cca03af052912b_42_0.txt
### Footer navigation
Mmdn_fetch_File/Mmdn_file_5_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/Mmdn_fetch_5_3.txt
equest \(Opens in a new tab\)") • [ Report a problem with this content ](https://github.com/mdn/content/issues/new?template=page-report.yml&mdn- url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen- US%2Fdocs%2FWeb%2FAPI%2FRequest&metadata=%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EPag...
Mmdn_fetch_File/ab2c48cca03af052912b_1_0.txt
[ ](/)
Mmdn_fetch_File/Mmdn_fetch_6_3.txt
Invalid header value. The header object must contain exactly two elements. | const headers = [ ['Content-Type', 'text/html', 'extra'], ['Accept'], ]; fetch('https://example.com/', { headers }); Invalid URL or scheme, or using a scheme that fetch does not support...
Mmdn_fetch_File/applyjavascriptinter_12_0.txt
By Solution
Mmdn_fetch_File/Mmdn_fetch_0_2.txt
ors. Content available under [ a Creative Commons license ](/en- US/docs/MDN/Writing_guidelines/Attrib_copyright_license) .
Mmdn_fetch_File/Mmdn_file_6_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/applyjavascriptinter_26_0.txt
[ Search syntax tips ](https://docs.github.com/search-github/github-code- search/understanding-github-code-search-syntax)
Mmdn_fetch_File/ab2c48cca03af052912b_36_0.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. [ Learn more about bidirectional Unicode characters ](https://github.co/hiddenchars)
Mmdn_fetch_File/ab2c48cca03af052912b_28_0.txt
| import styles from './styles.css' ; ---|--- | import testIDs from './testIDs' ; | | export render = ( text ) => ( | < button className = { styles . button } data-test-id = { testsIDs . button } > | < span className = { styles . icon } > < / span > | { text } | < / butto...
Mmdn_fetch_File/applyjavascriptinter_74_0.txt
< script >
Mmdn_fetch_File/applyjavascriptinter_57_0.txt
26 lines (24 loc) · 711 Bytes
Mmdn_fetch_File/ab2c48cca03af052912b_34_0.txt
[ Raw ](/necolas/ab2c48cca03af052912bc2f1f633fb56/raw/4a8ed2936cf9165f4869b300bd3f861fcea3ddb0/webdriver- button-test.js)
Mmdn_fetch_File/javascriptlabelhtml_27_0.txt
# Provide feedback
Mmdn_fetch_File/javascriptlabelhtml_26_0.txt
[ Search syntax tips ](https://docs.github.com/search-github/github-code- search/understanding-github-code-search-syntax)
Mmdn_fetch_File/819540cc6ee31eac647f_14_0.txt
* Embed
Mmdn_fetch_File/Mmdn_fetch_2_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/819540cc6ee31eac647f_1_0.txt
[ ](/)
Mmdn_fetch_File/Mmdn_fetch_4_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/applyjavascriptinter_37_0.txt
[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fmdn%2Flearning- area%2Fblob%2Fmain%2Fjavascript%2Fintroduction-to-js-1%2Fwhat-is-js%2Fapply- javascript-internal.html)
Mmdn_fetch_File/ab2c48cca03af052912b_9_0.txt
# [ necolas ](/necolas) / **[ button.js ](/necolas/ab2c48cca03af052912bc2f1f633fb56) **
Mmdn_fetch_File/applyjavascriptinter_39_0.txt
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
Mmdn_fetch_File/javascriptlabelhtml_23_0.txt
# Search code, repositories, users, issues, pull requests...
Mmdn_fetch_File/applyjavascriptinter_69_0.txt
< html lang =" en-US " >
Mmdn_fetch_File/applyjavascriptinter_77_0.txt
const para = document . createElement ( 'p' ) ;
Mmdn_fetch_File/ab2c48cca03af052912b_0_0.txt
Skip to content
Mmdn_fetch_File/ab2c48cca03af052912b_10_0.txt
Last active April 22, 2016 18:03
Mmdn_fetch_File/applyjavascriptinter_79_0.txt
document . body . appendChild ( para ) ;
Mmdn_fetch_File/applyjavascriptinter_24_0.txt
Search
Mmdn_fetch_File/applyjavascriptinter_10_0.txt
For
Mmdn_fetch_File/applyjavascriptinter_31_0.txt
# Saved searches
Mmdn_fetch_File/javascriptlabelhtml_35_0.txt
To see all available qualifiers, see our [ documentation ](https://docs.github.com/search-github/github-code-search/understanding- github-code-search-syntax) .
Mmdn_fetch_File/applyjavascriptinter_81_0.txt
for ( const button of buttons ) {
Mmdn_fetch_File/applyjavascriptinter_62_0.txt
Top
Mmdn_fetch_File/Mmdn_fetch_3_2.txt
/text) Returns a promise that resolves with a text representation of the response body. ## Examples ### Fetching an image In our [ basic fetch example ](https://github.com/mdn/dom- examples/tree/main/fetch/basic-fetch) ( [ run example live ](https://mdn.github.io/dom-examples/fetch/basic-fetch/) ) we use a ...
Mmdn_fetch_File/Mmdn_file_6_8.txt
) * [ Learn Web Development ](/en-US/docs/Learn) * [ MDN Plus ](/en-US/plus) * [ Hacks Blog ](https://hacks.mozilla.org/) [ Mozilla logo ](https://www.mozilla.org/) * [ Website Privacy Notice ](https://www.mozilla.org/privacy/websites/) * [ Cookies ](https://www.mozilla.org/privacy/websites/#cookies) * [...
Mmdn_fetch_File/javascriptlabelhtml_39_0.txt
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
Mmdn_fetch_File/applyjavascriptinter_40_0.txt
{{ message }}
Mmdn_fetch_File/Mmdn_file_2_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_fetch_File/applyjavascriptinter_86_0.txt
< body >
Mmdn_fetch_File/javascriptlabelhtml_49_0.txt
* [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service) * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement) * [ Security ](https://github.com/security) * [ Status ](https://www.githubstatus.com/) * [ Docs ](https://docs.github.com/) * [ Contact ](ht...
Mmdn_fetch_File/applyjavascriptinter_44_0.txt
Additional navigation options
Mmdn_fetch_File/applyjavascriptinter_13_0.txt
* [ CI/CD & Automation ](https://github.com/solutions/ci-cd) * [ DevOps ](https://github.com/solutions/devops) * [ DevSecOps ](https://resources.github.com/devops/fundamentals/devsecops)
Mmdn_fetch_File/applyjavascriptinter_58_0.txt
main
Mmdn_fetch_File/Mmdn_fetch_1_2.txt
lues of the key/value pairs contained in this object. **Note:** To be clear, the difference between [ ` Headers.set() ` ](/en- US/docs/Web/API/Headers/set) and [ ` Headers.append() ` ](/en- US/docs/Web/API/Headers/append) is that if the specified header does already exist and does accept multiple values, [ ` Headers.s...
Mmdn_fetch_File/javascriptlabelhtml_40_0.txt
{{ message }}
Mmdn_fetch_File/819540cc6ee31eac647f_21_0.txt
Clone this repository at &lt;script src=&quot;https://gist.github.com/Reine0017/819540cc6ee31eac647fd42503500d78.js&quot;&gt;&lt;/script&gt;
Mmdn_fetch_File/819540cc6ee31eac647f_8_0.txt
[ ![@Reine0017](https://avatars.githubusercontent.com/u/26247692?s=64&v=4) ](/Reine0017)
Mmdn_fetch_File/applyjavascriptinter_2_0.txt
Toggle navigation
Mmdn_fetch_File/Mmdn_file_5_2.txt
nished, the ` result ` attribute contains the contents of the file as a text string. An optional encoding name can be specified. ## Events Listen to these events using [ ` addEventListener() ` ](/en- US/docs/Web/API/EventTarget/addEventListener "addEventListener\(\)") or by assigning an event listener to the ` oneve...
Mmdn_fetch_File/applyjavascriptinter_7_0.txt
Explore