Search completed in 4.10 seconds.
100 results for "payload":
Your results are loading. Please wait...
413 Payload Too Large - HTTP
WebHTTPStatus413
the http 413 payload too large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a retry-after header field.
... status 413 payload too large specifications specification title rfc 7231, section 6.5.11: 413 payload too large hypertext transfer protocol (http/1.1): semantics and content ...
Writing WebSocket servers - Web APIs
format each data frame (from the client to the server or vice-versa) follows this same format: frame format: ​​ 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |f|r|r|r| opcode|m| payload len | extended payload length | |i|s|s|s| (4) |a| (7) | (16/64) | |n|v|v|v| |s| | (if payload len==126/127) | | |1|2|3| |k| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | extended payload length continued, if payload len == 127 | +...
... - - - - - - - - - - - - - - - +-------------------------------+ | |masking-key, if mask set to 1 | +-------------------------------+-------------------------------+ | masking-key (continued) | payload data | +-------------------------------- - - - - - - - - - - - - - - - + : payload data continued ...
... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | payload data continued ...
...And 11 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
it is important to not use "extra" blank lines within a cue, for example between the timings line and the cue payload.
... webvtt cues a cue is a single subtitle block that has a single start time, end time, and textual payload.
... the cue payload text.
...And 9 more matches
Communicating using "port" - Archive of obsolete content
thus, to emit a message from a content script: self.port.emit("mycontentscriptmessage", mycontentscriptmessagepayload); to receive a message from the add-on code: self.port.on("myaddonmessage", function(myaddonmessagepayload) { // handle the message }); compare this to the technique used to receive built-in messages in the content script.
... it may be called with any number of parameters, but is most likely to be called with a name for the message and an optional payload.
... the payload can be any value that is serializable to json.
...And 6 more matches
Codecs used by WebRTC - Web media technologies
other notes the network payload format for sharing vp8 using rtp (such as when using webrtc) is described in rfc 7741: rtp payload format for vp8 video.
...this is useful to note, since in rfc 6184 ("rtp payload format for h.264 video"), profile-level-id is entirely optional.
... other notes the payload format used for avc in webrtc is described in rfc 6184: rtp payload format for h.264 video.
...And 6 more matches
port - Archive of obsolete content
it may be called with any number of parameters, but is most likely to be called with a name for the message and an optional payload.
... the payload can be any value that is serializable to json.
... from the content script to the main add-on code: // content-script.js var mymessagepayload = "some data"; self.port.emit("mymessage", mymessagepayload); from the main add-on code to the content script: // main.js var mymessagepayload = "some data"; worker.port.emit("mymessage", mymessagepayload); on() the port.on() function registers a function as a listener for a particular message sent from the other side using port.emit().
...And 5 more matches
Index - Web APIs
WebAPIIndex
1300 fetch basic concepts api, fetch, fetch api, xmlhttprequest, concepts, guard, request at the heart of fetch are the interface abstractions of http requests, responses, headers, and body payloads, along with a global fetch method for initiating asynchronous resource requests.
...if the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content-codings.
... 3035 performanceresourcetiming.encodedbodysize api, property, reference, web performance the encodedbodysize read-only property represents the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
...And 4 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
it is all explained in the service worker cookbook — see the push payload demo.
... fetch('./register', { method: 'post', headers: { 'content-type': 'application/json' }, body: json.stringify({ subscription: subscription }), }); then the globaleventhandlers.onclick function on the subscribe button is defined: document.getelementbyid('doit').onclick = function() { const payload = document.getelementbyid('notification-payload').value; const delay = document.getelementbyid('notification-delay').value; const ttl = document.getelementbyid('notification-ttl').value; fetch('./sendnotification', { method: 'post', headers: { 'content-type': 'application/json' }, body: json.stringify({ subscription: subscriptio...
...n, payload: payload, delay: delay, ttl: ttl, }), }); }; when the button is clicked, fetch asks the server to send the notification with the given parameters: payload is the text that to be shown in the notification, delay defines a delay in seconds until the notification will be shown, and ttl is the time-to-live setting that keeps the notification available on the server for a specified amount of time, also defined in seconds.
...And 4 more matches
Using DTMF with WebRTC - Web APIs
instead, they're sent out-of-band, as rtp payloads.
...webrtc currently ignores these payloads; this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, browsers may choose to play the corresponding tone to the local user as part of their user experience, since users are typically used to hearing their phone play the tones audibly.
...when you wish to transmit dtmf signals, you first need to decide which track to send them on, since dtmf is sent as a series of out-of-band payloads on the rtcrtpsender responsible for transmitting that track's data to the other peer.
...And 2 more matches
HTTP Index - HTTP
WebHTTPIndex
189 transfer-encoding http, reference, header the transfer-encoding header specifies the form of encoding used to safely transfer the payload body to the user.
... 214 put http, http method, reference, request method the http put request method creates a new resource or replaces a representation of the target resource with the request payload.
... 224 203 non-authoritative information http, http status code, reference, status code, successful response the http 203 non-authoritative information response status indicates that the request was successful but the enclosed payload has been modified by a transforming proxy from that of the origin server's 200 (ok) response .
...And 2 more matches
Communicating With Other Scripts - Archive of obsolete content
", true, true, greeting); document.documentelement.dispatchevent(event); } finally, the page script "page-script.js" listens for the message and logs the greeting to the web console: window.addeventlistener("addon-message", function(event) { console.log(event.detail.greeting); }, false); after firefox 30: clone the message object this technique depends on being able to share the message payload between the content script scope and the page script scope.
... from firefox 30 this sharing requires an extra step: the content script needs to explicitly clone the message payload into the page script's scope using the global cloneinto() function: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcustomevent, false); function sendcustomevent() { var greeting = {"greeting" : "hello world"}; var cloned = cloneinto(greeting, document.defaultview); var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, cloned); document.documentelement.dispatchevent(event); } messaging from page script to content script sending messages using custom dom events from the page script to the content script is just the same, but in reverse.
... this example, "main.js" creates a page-mod to target the page we are interested in: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" creates and dispatches a custom dom event, using initcustomevent()'s detail parameter to supply the payload: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">send message</button> </body> </html> finally, the c...
...ontent script "listen.js" listens for the new event and retrieves the payload from its detail attribute: window.addeventlistener("addon-message", function(event) { console.log(json.stringify(event.detail)); }, false); ...
Interacting with page scripts - Archive of obsolete content
rue, detail: greeting }); document.documentelement.dispatchevent(event); } finally, the page script "page-script.js" listens for the message and logs the greeting to the web console: window.addeventlistener("addon-message", function(event) { console.log(event.detail.greeting); }, false); after firefox 30: clone the message object this technique depends on being able to share the message payload between the content script scope and the page script scope.
... from firefox 30 this sharing requires an extra step: the content script needs to explicitly clone the message payload into the page script's scope using the global cloneinto() function: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcustomevent, false); function sendcustomevent() { var greeting = {"greeting" : "hello world"}; var cloned = cloneinto(greeting, document.defaultview); var event = new customevent("addon-message", { bubbles: true, detail: cloned }); document.documentelement.dispatchevent(event); } page script to content script sending messages using custom dom events from the page script to the content script is just the same, but in reverse.
... this example, "main.js" creates a page-mod to target the page we are interested in: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" creates and dispatches a custom dom event, using initcustomevent()'s detail parameter to supply the payload: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">send message</button> </body> </html> finally, the c...
...ontent script "listen.js" listens for the new event and retrieves the payload from its detail attribute: window.addeventlistener("addon-message", function(event) { console.log(json.stringify(event.detail)); }, false); ...
panel - Archive of obsolete content
the message payload is the text the user // entered.
...// the message payload is the contents of the edit box.
...the message payload is the text the user // entered.
...// the message payload is the contents of the edit box.
Writing a WebSocket server in C# - Web APIs
full list of opcodes the second byte, which currently has a value of 131, is another bitfield that breaks down as such: mask (bit 0) payload length (bit 1:7) 1 0x83=0000011 mask bit: defines whether the "payload data" is masked.
... if set to 1, a masking key is present in masking-key, and this is used to unmask the "payload data".
... payload length: if this value is between 0 and 125, then it is the length of message.
... the remaining bytes are the encoded message payload.
Communicating using "postMessage" - Archive of obsolete content
handling message events in the content script to send a message from a content script, you use the postmessage function of the global self object: self.postmessage(contentscriptmessage); this takes a single parameter, the message payload, which may be any json-serializable value.
...the handler function is passed the message payload.
...now we have to embed the event type in the message payload, and implement a switch function in the receiver to dispatch the message: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.postmessage({" + " kind: 'mouseover'," + " element: event.target.tostring()" + " });" + "}, false);" + "window...
ui/frame - Archive of obsolete content
the data property of the event is the message payload.
... data, which represents the event's payload.
... if the payload was a json object, you can access it like an object: // frame.js var label = window.document.getelementbyid("linky"); label.addeventlistener("click", function() { window.parent.postmessage({ "type" : "ping", "reason" : "they clicked me" }, "*"); }, true); // main.js var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong); function pong(e) { if (e.data.type == "ping") { console.log(e.data.reason); e.source.postmessage("pong", e.origin); } } ...
Index - Archive of obsolete content
at each layer, the logical units are typically composed of a header and a payload.
... the payload consists of the information passed down from the previous layer, while the header contains layer-specific information such as addresses.
... at the application layer, the payload is the actual application data.
Code snippets - Archive of obsolete content
/ delete server: deletepath(""); corrupt a single engine on the server let engine = "bookmarks"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); components.utils.import("resource://services-sync/util.js"); let r = new resource(weave.service.storageurl + "meta/global"); let g = r.get(); let envelope = json.parse(g); let payload = json.parse(envelope.payload); payload.engines[engine].syncid = weave.utils.makeguid(); // or any other guid you like.
... payload.engines[engine].version = 0; // or any other version number you like.
... envelope.payload = json.stringify(payload); r.put(json.stringify(envelope)); generate new keys // clients always wipe the server when they generate new keys.
TCP/IP Security - Archive of obsolete content
at each layer, the logical units are typically composed of a header and a payload.
... the payload consists of the information passed down from the previous layer, while the header contains layer-specific information such as addresses.
... at the application layer, the payload is the actual application data.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
312 packet glossary, network packet, packet, reference, tcp, web performance, payload a packet, or network packet, is a formatted chunk of data sent over a network.
...the user data is known as the payload.
... the control information is the information for delivering the payload.
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
the user data is known as the payload.
... the control information is the information for delivering the payload.
... user data - payload payload is the data that is carried on behalf of an application.
NDEFRecord - Web APIs
ndefrecord.mediatype read only represents the mime type of the ndef record payload.
... ndefrecord.data read only represents the payload of the record.
... ndefrecord.encoding read only represents the encoding name used for encoding the payload in the case it is textual data.
PerformanceResourceTiming.encodedBodySize - Web APIs
the encodedbodysize read-only property represents the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
... if the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content-codings.
... syntax resource.encodedbodysize; return value a number representing the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
USBEndpoint - Web APIs
usbendpoint.type returns the type of this endpoint, one of: "bulk" - provides reliable data transfer for large payloads.
... "interrupt" - provides reliable data transfer for small payloads.
... "isochronous" - provides unreliable data transfer for payloads that must be delivered periodically.
Network Error Logging - HTTP
defaults to 0, so that no successful network requests will be reported if the key is not present in the json payload.
...defaults to 1, so that all failed network requests will be reported if the key is not present in the json payload.
... the reporting group referenced above is defined in the usual manner within the report-to header, for example: report-to: { "group": "nel", "max_age": 31556952, "endpoints": [ { "url": "https://example.com/csp-reports" } ] } error reports in these examples, the entire reporting api payload is shown.
self - Archive of obsolete content
postmessage() send a message from a content script to a listener in the main add-on code: self.postmessage(contentscriptmessage); this takes a single parameter, the message payload, which may be any json-serializable value.
...the handler function is passed the message payload.
Display a Popup - Archive of obsolete content
the message payload is the text the user // entered.
...// the message payload is the contents of the edit box.
Communicating with frame scripts
the example below sends a message named "my-e10s-extension-message", with a data payload containing details and tag properties, and exposes the event.target object as a cpow: // frame script addeventlistener("click", function (event) { sendasyncmessage("my-addon@me.org:my-e10s-extension-message", { details : "they clicked", tag : event.target.tagname }, { target : event.target }); }, false); to receive messages from content, a chrome script needs to add a messa...
...the listener will be passed a message object whose data property is the message payload: // frame script function handlemessagefromchrome(message) { var payload = message.data.details; // "some more details" } addmessagelistener("my-addon@me.org:message-from-chrome", handlemessagefromchrome); message-manager-disconnect if you're using a message manager to communicate with a script that may be running in a different process, you can listen for the message-manager-disconnec...
SpiderMonkey Internals
other values are encoded as a value and a type tag: on x86, arm, and similar 32-bit platforms, we use what we call "nunboxing", in which non-double values are a 32-bit type tag and a 32-bit payload, which is normally either a pointer or a signed 32-bit integer.
...instead, we use "punboxing", which has 17 bits of tag and 47 bits of payload.
Index
MozillaTechXPCOMIndex
863 nsipushservice interfaces, interfaces:scriptable, push, xpcom, xpcom interface reference push lets a remote server send payloads to a web site, add-on, or component running in the browser.
...a subscription also has a public key and secret; these are used to encrypt message payloads.
nsIPushService
inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) push lets a remote server send payloads to a web site, add-on, or component running in the browser.
... topic subject data description push api counterpart push-message nsipushmessage if the message has a payload; null for blank messages.
nsIPushSubscription
a subscription also has a public key and secret; these are used to encrypt message payloads.
...the remote server can use these keys to encrypt and authenticate message payloads.
nsISyncMessageSender
the message payload.
... the message payload.
DevTools API - Firefox Developer Tools
the main differences between the two modules are that the first parameter for add-on sdk events is the first payload argument instead of the event name and the once method does not return a promise.
...if the event contains multiple payload arguments, the rest are discarded and can only be received by providing the listener function to this method.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
the data property of the ndefrecord interface is dataview providing access to the payload data of the record.
... syntax ndefrecord.data value a dataview that contains encoded payload data of the record.
NDEFRecord.mediaType - Web APIs
the mediatype property ofthe ndefrecord interface is usvstring containing the mime type of the record payload.
... syntax ndefrecord.mediatype value a usvstring, corresponding to a mime type of the record payload.
PerformanceResourceTiming.transferSize - Web APIs
the size includes the response header fields plus the response payload body (as defined by rfc7230).
...the size includes the response header fields plus the response payload body (rfc7230).
PerformanceResourceTiming - Web APIs
the size includes the response header fields plus the response payload body.
... performanceresourcetiming.encodedbodysizeread only a number representing the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
RTCIceCandidatePairStats - Web APIs
bytesreceieved optional the total number of payload bytes received (that is, the total number of bytes received minus any headers, padding, or other administrative overhead) on this candidate pair so far.
... bytessent optional the total number of payload bytes sent (that is, the total number of bytes sent minus any headers, padding, or other administrative overhead) so far on this candidate pair.
RTCRtpCodecParameters - Web APIs
properties payloadtype optional the rtp payload type used to identify this codec.
...most codecs have specific values or ranges of values they permit; see the iana payload format media type registry for details.
Using the Resource Timing API - Web APIs
the transfersize property returns the size (in octets) of the fetched resource including the response header fields plus the response payload body.
... the encodedbodysize property returns the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
Resource Timing API - Web APIs
the transfersize property returns the size (in octets) of the fetched resource including the response header fields plus the response payload body.
... the encodedbodysize property returns the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
Using WebRTC data channels - Web APIs
this will become an issue when browsers properly support the current standard for supporting larger messages—the end-of-record (eor) flag that indicates when a message is the last one in a series that should be treated as a single payload.
...with eor support in place, rtcdatachannel payloads can be much larger (officially up to 256kib, but firefox's implementation caps them at a whopping 1gib).
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
t-length: 55 origin: https://foo.example pragma: no-cache cache-control: no-cache <person><name>arun</name></person> http/1.1 200 ok date: mon, 01 dec 2008 01:15:40 gmt server: apache/2 access-control-allow-origin: https://foo.example vary: accept-encoding, origin content-encoding: gzip content-length: 235 keep-alive: timeout=2, max=99 connection: keep-alive content-type: text/plain [some xml payload] lines 1 - 10 above represent the preflight request with the options method.
...1 dec 2008 01:34:52 gmt server: apache/2 access-control-allow-origin: https://foo.example access-control-allow-credentials: true cache-control: no-cache pragma: no-cache set-cookie: pageaccess=3; expires=wed, 31-dec-2008 01:34:53 gmt vary: accept-encoding, origin content-encoding: gzip content-length: 106 keep-alive: timeout=2, max=100 connection: keep-alive content-type: text/plain [text/plain payload] although line 10 contains the cookie destined for the content on http://bar.other, if bar.other did not respond with an access-control-allow-credentials: true (line 17) the response would be ignored and not made available to web content.
HTTP Messages - HTTP
WebHTTPMessages
the start-line and http headers of the http message are collectively known as the head of the requests, whereas its payload is known as the body.
...not all responses have one: responses with a status code that sufficiently answers the request without the need for corresponding payload (like 201 created or 204 no content) usually don't.
PATCH - HTTP
WebHTTPMethodsPATCH
in the example below a 204 response code is used, because the response does not carry a payload body.
... a 200 response could have contained a payload body.
Cross-domain Content Scripts - Archive of obsolete content
cross-domain iframes the following "main.js" creates a page-worker which loads a local html file called "page.html", attaches a content script called "page.js" to the page, waits for messages from the script, and logs the payload.
Content Scripts - Archive of obsolete content
so to emit a message from a content script: self.port.emit("mycontentscriptmessage", mycontentscriptmessagepayload); to receive a message from the add-on code: self.port.on("myaddonmessage", function(myaddonmessagepayload) { // handle the message }); note that the global self object is completely different from the self module, which provides an api for an add-on to access its data files and id.
remote/parent - Archive of obsolete content
t.emit("id", processid); }); // main.js const { processes, remoterequire } = require("sdk/remote/parent"); // load "remote.js" into every current and future process remoterequire("./remote.js", module); // for every current and future process processes.forevery(process => { // ask for the process id process.port.emit("fetchid"); // first argument is always the process, then the message payload process.port.once("id", (process, id) => { console.log("child process is remote:" + process.isremote); console.log("child process id:" + id); }); }); content frame manipulation this demonstrates telling every current frame to link to a specific anchor element: // remote.js const { frames } = require("sdk/remote/child"); // listeners receive the frame the event was for as the first...
Modifying Web Pages Based on URL - Archive of obsolete content
the content script now needs to look like this: // "self" is a global object in content scripts // listen for a message, and replace the document's // contents with the message payload.
Setting Up a Development Environment - Archive of obsolete content
it allows you to cancel them and even replace payload data before it is sent.
Nanojit - Archive of obsolete content
lins *rec_ins = out.insskip(sizeof(guardrecord) + sizeof(sideexit)); guardrecord *guard = (guardrecord *) rec_ins->payload(); memset(guard, 0, sizeof(*guard)); sideexit *exit = (sideexit *)(guard + 1); guard->exit = exit; guard->exit->target = f; f->lastins = out.insguard(lir_loop, out.insimm(1), rec_ins); // compile the fragment.
The Business Benefits of Web Standards - Archive of obsolete content
the payload might be slightly higher for the first page.
Getting started with Ember - Learn web development
this language also enables lighter asset payloads due to compiling the templates into a "byte code" that can be parsed faster than javascript.
HTTP Cache
the response payload) to write to the cache entry, it must open the output stream on it before it calls metadataready.
QA phase
accepted payload.
64-bit Compatibility
if you use these bits to squirrel away a payload, they must be adjusted before attempting to dereference the pointer.
Running Parsemark
the intent is to run a dozen or so large-payload js sites globbed up from across the web.
nsIMessageBroadcaster
the message payload.
nsIMessageListener
data a structured clone of the message payload: the second argument passed into the message-sending function.
nsIMessageSender
the message payload.
URLs - Plugins
the notifydata parameter contains private plug-in data that can be used to associate the request with the subsequent npp_urlnotify call (which returns this value) and/or to pass a pointer to some request-related payload.
Inspecting web sockets - Firefox Developer Tools
supported ws protocols the inspector currently supports the following web socket protocols: plain json socket.io sockjs signalr wamp the payload based on those protocols is parsed and displayed as an expandable tree for easy inspection, although you can of course still see the raw data (as sent over the wire) as well.
Network request details - Firefox Developer Tools
html preview if the response is html, a preview of the rendered html appears inside the response tab, above the response payload.
CloseEvent - Web APIs
1007 invalid frame payload data the endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-utf-8 data within a text message).
DataTransfer.dropEffect - Web APIs
er(event);">drop zone</div> css content div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript content function dragstart_handler(ev) { console.log("dragstart: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); ev.preventdefault(); // get the id of the target and add the moved element to the...
DataTransfer.effectAllowed - Web APIs
"width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); ev.preventdefault(); // get the id of the target and add the moved element to the target...
DataTransfer.items - Web APIs
<!doctype html> <html lang=en> <title>examples of datatransfer.{types,items} properties</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.ap...
DataTransfer.types - Web APIs
<!doctype html> <html lang=en> <title>examples of datatransfer.{types,items} properties</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.ap...
DataTransferItemList.DataTransferItem() - Web APIs
javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
DataTransferItemList.add() - Web APIs
e the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
DataTransferItemList.clear() - Web APIs
the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
DataTransferItemList.length - Web APIs
javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
DataTransferItemList.remove() - Web APIs
javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
Fetch basic concepts - Web APIs
in a nutshell at the heart of fetch are the interface abstractions of http requests, responses, headers, and body payloads, along with a global fetch method for initiating asynchronous resource requests.
NDEFRecord.encoding - Web APIs
the encoding property ofthe ndefrecord interface is usvstring containing the name of the encoding used to encode ndef payload if it contains textual data.
NDEFRecord.toRecords() - Web APIs
the torecords() method of the ndefrecord interface of web nfc api parses record payload ndefrecord.data besed on ndefrecord.recordtype and returns the result.
PerformanceResourceTiming.decodedBodySize - Web APIs
if the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content-codings.
PushManager.supportedContentEncodings - Web APIs
the supportedcontentencodings read-only property of the pushmanager interface returns an array of supported content codings that can be used to encrypt the payload of a push message.
PushManager - Web APIs
properties pushmanager.supportedcontentencodings returns an array of supported content codings that can be used to encrypt the payload of a push message.
RTCIceCandidatePairStats.bytesReceived - Web APIs
the rtcicecandidatepairstats property bytesreceived indicates the total number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been received to date on the connection described by the candidate pair.
RTCIceCandidatePairStats.bytesSent - Web APIs
the rtcicecandidatepairstats property bytessent indicates the total number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been sent so far on the connection described by the candidate pair.
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
syntax var fecpacketsdiscarded = rtcinboundrtpstreamstats.fecpacketsdiscarded; value an unsigned integer value indicating how many fec packets have been received whose error correction payload has been discarded.
RTCInboundRtpStreamStats - Web APIs
fecpacketsdiscarded an integer value indicating the number of rtp forward error correction (fec) packets which have been received for this source, for which the error correction payload was discarded.
RTCRtpEncodingParameters - Web APIs
codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning rtcrtpparameters object's codecs parameter.
RTCRtpSendParameters.encodings - Web APIs
codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning rtcrtpparameters object's codecs parameter.
RTCRtpSender - Web APIs
properties rtcrtpsender.dtmf read only an rtcdtmfsender which can be used to send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtpsender object.
Request - Web APIs
WebAPIRequest
this request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example: fetch(request) .then(response => response.blob()) .then(blob => { image.src = url.createobjecturl(blob); }); in the following snippet, we create a new request using the request() constructor with some initial data and body content for an api request which need a body payload: const request = new request('https://example.com', {method: 'post', body: '{"foo": "bar"}'}); const url = request.url; const method = request.method; const credentials = request.credentials; const bodyused = request.bodyused; note: the body type can only be a blob, buffersource, formdata, urlsearchparams, usvstring or readablestream type, so for adding a json object to the payload you need ...
ServiceWorkerGlobalScope.onpush - Web APIs
the data payload of the push message is available in the event object's data property (pushevent.data, which contains a pushmessagedata object.) self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; va...
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
let payload = new uint8array([r, g, b]); await usbdevice.controltransferout({ requesttype: 'vendor', recipient: 'device', request: 1, value: 0, index: 0, }, payload); } } specifications specification status comment webusbthe definition of 'opened' in that specification.
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
note: the message payload is available in the message event's data property.
Configuring servers for Ogg media - HTTP
setting payload to auto tells the browser to automatically begin downloading the media as soon as the page is loaded, under the assumption that the user will play it.
Content-Encoding - HTTP
sometimes, using additional compression doesn't reduce payload size and can even make the payload longer.
Transfer-Encoding - HTTP
the transfer-encoding header specifies the form of encoding used to safely transfer the payload body to the user.
PUT - HTTP
WebHTTPMethodsPUT
the http put request method creates a new resource or replaces a representation of the target resource with the request payload.
HTTP request methods - HTTP
WebHTTPMethods
put the put method replaces all current representations of the target resource with the request payload.
203 Non-Authoritative Information - HTTP
WebHTTPStatus203
the http 203 non-authoritative information response status indicates that the request was successful but the enclosed payload has been modified by a transforming proxy from that of the origin server's 200 (ok) response .
415 Unsupported Media Type - HTTP
WebHTTPStatus415
the http 415 unsupported media type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format.
HTTP response status codes - HTTP
WebHTTPStatus
413 payload too large request entity is larger than limits defined by server; the server might close the connection or return an retry-after header field.
Types of attacks - Web security
dom-based xss attacks the payload is executed as a result of modifying the dom environment (in the victim’s browser) used by the original client-side script.