Search completed in 1.23 seconds.
328 results for "split":
Your results are loading. Please wait...
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
the channelsplitternode() constructor of the web audio api creates a new channelsplitternode object instance, representing a node that splits the input into a separate output for each of the source node's audio channels.
... syntax var splitter = new channelspitternode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
... options optional a channelsplitteroptions dictionary object defining the properties you want the channelsplitternode to have (it also inherits the options defined in the audionodeoptions dictionary): numberofoutputs: a number defining the number of inputs the channelsplitternode should have.
...And 2 more matches
Splitters - Archive of obsolete content
« previousnext » we'll now look at how to add splitters to a window.
... splitting a box there may be times when you want to have two sections of a window where the user can resize the sections.
... splitter element this feature is accomplished using an element called a splitter.
...And 39 more matches
splitter - Archive of obsolete content
when the splitter is dragged, the sibling elements of the splitter are resized.
... if a grippy is placed inside the splitter, one sibling element of the splitter is collapsed when the grippy is clicked.
... attributes collapse, resizeafter, resizebefore, state, substate style classes tree-splitter examples <!-- this bar has some styling associated with it.
...And 28 more matches
String.prototype.split() - JavaScript
the split() method divides a string into an ordered list of substrings, puts these substrings into an array, and returns the array.
... syntax str.split([separator[, limit]]) parameters separator optional the pattern describing where each split should occur.
... the simplest case is when separator is just a single character; this is used to split a delimited string.
...And 20 more matches
Split object
in spidermonkey, a split object is made up of two jsobjects: an inner object and an outer object.
... each half of a split object always has a pointer to the other half.
...programs other than mozilla that embed spidermonkey should avoid using split objects.
...And 10 more matches
RegExp.prototype[@@split]() - JavaScript
the [@@split]() method splits a string object into an array of strings by separating the string into substrings.
... syntax regexp[symbol.split](str[, limit]) parameters str the target of the split operation.
... limit optional integer specifying a limit on the number of splits to be found.
...And 7 more matches
Text.splitText() - Web APIs
WebAPITextsplitText
the text.splittext() method breaks the text node into two nodes at the specified offset, keeping both nodes in the tree as siblings.
... after the split, the current node contains all the content up to the specified offset point, and a newly created node of the same type contains the remaining text.
... syntax newnode = textnode.splittext(offset) parameters offset the index immediately before which to break the text node.
...And 5 more matches
BaseAudioContext.createChannelSplitter() - Web APIs
the createchannelsplitter() method of the baseaudiocontext interface is used to create a channelsplitternode, which is used to access the individual channels of an audio stream and process them separately.
... syntax baseaudiocontext.createchannelsplitter(numberofoutputs); parameters numberofoutputs the number of channels in the input audio stream that you want to output separately; the default is 6 if this parameter is not specified.
... returns a channelsplitternode.
...And 3 more matches
ChannelSplitterNode - Web APIs
the channelsplitternode interface, often used in conjunction with its opposite, channelmergernode, separates the different channels of an audio source into a set of mono outputs.
... if your channelsplitternode always has one single input, the amount of outputs is defined by a parameter on its constructor and the call to audiocontext.createchannelsplitter().
... channel interpretation "discrete" constructor channelsplitternode() creates a new channelsplitternode object instance.
...And 3 more matches
Split console - Firefox Developer Tools
while you're in another tool in the toolbox, just press esc or select the "show split console" command in the toolbar menu.
... the toolbox will now appear split, with the original tool above and the web console underneath.
... you can close the split console by pressing esc again, or by selecting the "hide split console" menu command.
... as usual, $0 works as a shorthand for the element currently selected in the inspector: when you use the split console with the debugger, the console's scope is the currently executing stack frame.
str:split() - EXSLT
WebEXSLTstrsplit
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.
... syntax str:split(string, pattern) parameters string the string to split.
... pattern the pattern indicating where to split the string.
... example str:split('book, phone, computer, chair', ', ') returns a node set like: <token>book</token> <token>phone</token> <token>computer</token> <token>chair</token> specifications exslt - str:split ...
Symbol.split - JavaScript
the symbol.split well-known symbol specifies the method that splits a string at the indices that match a regular expression.
... this function is called by the string.prototype.split() method.
... for more information, see regexp.prototype[@@split]() and string.prototype.split().
... property attributes of symbol.split writable no enumerable no configurable no examples custom reverse split class reversesplit { [symbol.split](string) { const array = string.split(' '); return array.reverse(); } } console.log('another one bites the dust'.split(new reversesplit())); // expected output: [ "dust", "the", "bites", "one", "another" ] specifications specification ecmascript (ecma-262)the definition of 'symbol.split' in that ...
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
code splitting is the splitting of code into various bundles or components which can then be loaded on demand or in parallel.
...to prevent the requirement of downloading ginormous files, scripts can be split into multiple smaller files.
... code splitting is a feature supported by bundlers like webpack and browserify which can create multiple bundles that can be dynamically loaded at runtime.
tree-splitter - Archive of obsolete content
« xul reference home tree-splitter this splitter is intended to be used in tree columns (in-between treecol elements).
... the splitter will be drawn with no width so that it isn't visible, however, the columns may still be resized.
Split Navigation - CSS: Cascading Style Sheets
recipe download this example choices made this pattern combines auto margins with flexbox to split the items.
Index - Archive of obsolete content
the use of modules greatly improves the maintainability of code, by splitting it up into independent components, and enforcing logical boundaries between them.
...as a rough overview this is a version string split by periods, some examples: 240 extensions support in seamonkey 2 add-ons, codingscripting, extensions, javascript, seamonkey, url, thunderbird starting with seamonkey 2 alpha 1 seamonkey supports toolkit/-style extensions.
... 1647 tree-splitter xul reference, xul_style_classes no summary!
...And 6 more matches
jspage - Archive of obsolete content
(var h in a){new native({name:h,initialize:a[h],protect:true}); }var d={"boolean":boolean,"native":native,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["concat","indexof","join","lastindexof","pop","push","reverse","shift","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindexof","match","replace","search","slice","split","substr","substring","tolowercase","touppercase","valueof"]}; for(var e in f){for(var b=f[e].length;b--;){native.genericize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return this;}});hash.implement({foreach:function(b,c){for(var a in this){if(this.hasownproperty(a)){b.call(c,this[a...
...=0,b=c.length;d<b;d++){var e=c[d];switch($type(e)){case"element":f.push(e);break;case"string":f.extend(this.document.getelements(e,true)); }}return new elements(f);},getdocument:function(){return this.document;},getwindow:function(){return this;}});native.implement([element,document],{getelement:function(a,b){return document.id(this.getelements(a,true)[0]||null,b); },getelements:function(a,d){a=a.split(",");var c=[];var b=(a.length>1);a.each(function(e){var f=this.getelementsbytagname(e.trim());(b)?c.extend(f):c=f; },this);return new elements(c,{ddup:b,cash:!d});}});(function(){var h={},f={};var i={input:"checked",option:"selected",textarea:(browser.engine.webkit&&browser.engine.version<420)?"innerhtml":"value"}; var c=function(l){return(f[l]||(f[l]={}));};var g=function(n,l){if(!n){return;}var...
...ion(){return this.retrieve("opacity",1);}};element.implement({setopacity:function(a){return this.set("opacity",a,true); },getopacity:function(){return this.get("opacity");},setstyle:function(b,a){switch(b){case"opacity":return this.set("opacity",parsefloat(a));case"float":b=(browser.engine.trident)?"stylefloat":"cssfloat"; }b=b.camelcase();if($type(a)!="string"){var c=(element.styles.get(b)||"@").split(" ");a=$splat(a).map(function(e,d){if(!c[d]){return"";}return($type(e)=="number")?c[d].replace("@",math.round(e)):e; }).join(" ");}else{if(a==string(number(a))){a=math.round(a);}}this.style[b]=a;return this;},getstyle:function(g){switch(g){case"opacity":return this.get("opacity"); case"float":g=(browser.engine.trident)?"stylefloat":"cssfloat";}g=g.camelcase();var a=this.style[g];if(!$chk(a)){a=[]...
...And 5 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
916 tree-splitter xul reference, xul_style_classes no summary!
... 1060 splitters tutorials, xul, xul_tutorial we'll now look at how to add splitters to a window.
... 1122 grippy xul elements, xul reference an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter.
...And 4 more matches
Index - Web APIs
WebAPIIndex
233 baseaudiocontext.createchannelsplitter() api, audiocontext, baseaudiocontext, method, reference, web audio api, createchannelsplitter a channelsplitternode.
... 290 blob.slice() api, blob, file, file api, method, reference, section, subset, data, slice, split the blob interface's slice() method creates and returns a new blob object which contains data from a subset of the blob on which it's called.
... 614 channelmergernode api, channelmergernode, interface, reference, web audio api the channelmergernode interface, often used in conjunction with its opposite, channelsplitternode, reunites different mono inputs into a single output.
...And 4 more matches
collapse - Archive of obsolete content
« xul reference home collapse type: one of the values below determines which side of the splitter is collapsed when its grippy is clicked.
... if this attribute is not specified, the splitter will not cause a collapse.
... you should put a grippy element inside the splitter when it is used for collapsing.
...And 3 more matches
state - Archive of obsolete content
« xul reference home state type: one of the values below indicates whether the splitter has collapsed content or not.
... this attribute will be updated automatically as the splitter is moved, and is generally used in a stylesheet to apply a different appearance for each state.
... open the content either before or after the splitter, depending on the value of the collapsed attribute, is currently displayed.
...And 3 more matches
Index - Learn web development
77 arrays arrays, article, beginner, codingscripting, javascript, join, learn, pop, push, l10n:priority, shift, split, unshift in the final article of this module, we'll look at arrays — a neat way of storing a list of data items under a single variable name.
... 86 useful string methods article, beginner, codingscripting, javascript, learn, case, indexof, l10n:priority, length, lower, replace, split, upper now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
...for example, you can use css to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
...And 3 more matches
Arrays - Learn web development
some useful array methods in this section we'll look at some rather useful array-related methods that allow us to split strings into array items and vice versa, and add new items into arrays.
...to do this, we can use the split() method.
...first, create a string in your console: let mydata = 'manchester,london,liverpool,birmingham,leeds,carlisle'; now let's split it at each comma: let myarray = mydata.split(','); myarray; finally, try finding the length of your new array, and retrieving some items from it: myarray.length; myarray[0]; // the first item in the array myarray[1]; // the second item in the array myarray[myarray.length-1]; // the last item in the array you can also go the opposite way using the join() method.
...And 2 more matches
Componentizing our Svelte app - Learn web development
but how do you know what should be split into its own component?
...if it ends up growing, it should be split into smaller subcomponents.
... eventually, we will split up our app into the following components: alert.svelte: a general notification box for communicating actions that have occurred.
...And 2 more matches
Index - Firefox Developer Tools
the ui is split vertically into three panels 139 using the debugger map scopes feature this feature is useful when debugging source-mapped code.
...in particular, it: 150 split console you can use the console alongside other tools.
... while you're in another tool in the toolbox, just press esc or select the "show split console" command in the toolbar menu.
...And 2 more matches
Intensive JavaScript - Firefox Developer Tools
the first is to split long-running functions into pieces and use requestanimationframe to schedule each piece, and the second is to run the whole function in a separate thread using a web worker.
... using requestanimationframe in the first attempt at fixing this, we'll split up the function into a number of much smaller self-contained functions, and schedule each one using requestanimationframe().
... it's pretty simple to split up calculateprimes(): we will just calculate primality for each number in a separate function: function dopointlesscomputationswithrequestanimationframe() { function testcandidate(index) { // finishing condition if (index == iterations) { console.log(primes); pointlesscomputationsbutton.disabled = false; return; } // test this number var candidate = index * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate % c === 0) { ...
...And 2 more matches
Setting up adaptive streaming media sources - Developer guides
mpeg-dash hls (http live streaming) in order to adaptively stream media we need to split the media up into chunks.
... we are required to provide several different quality files split up over several time points.
... note: you can also split out your audio and video streams into separate files, which can then be prioritised and served separately depending on bandwidth.
...And 2 more matches
resizeafter - Archive of obsolete content
« xul reference home resizeafter type: one of the values below this attribute indicates which element to the right or below the splitter should be resized when the splitter is repositioned.
... closest the element immediately to the right or below the splitter resizes.
... farthest the element that is the farthest away from the splitter to the right or below the splitter resizes.
... grow the elements to the right or below the splitter do not change size (unless they are flexible) when the splitter is dragged, but instead the entire container changes size.
Table Reflow Internals - Archive of obsolete content
the reflowee returns a reflow status which indicates if it is complete, and thus not have to continue (split) breaking status (in the case of some inline frames) if there is truncation (it can't fit in the space and can't split).
... the 3rd pass reflow and sets a bit in the reflow state gives its block a computed height during 3rd pass could also be inside a cell which is an observer special height reflow optimizations only frames needing 3rd pass actually get it frames gettting a 3rd pass only get it once intro to paginated reflow when a reflowee's available height is constrained, it may not fit and need to either split/continue on the next page, or start on the next page.
...multiple resize reflows may require special handling if a frame split previously.
...the block uses the overflow lines mechanism (mentioned above) for its continued children there are two splitting scenarios for a table an incomplete cells block causes the cell, row, row group, table, outer table to be incomplete a truncated row or a row that started too far down the page causes the row group, table, outer table to be incomplete.
Looping code - Learn web development
chris:2232322', 'sarah:3453456', 'bill:7654322', 'mary:9998769', 'dianne:9384975']; const para = document.queryselector('p'); const input = document.queryselector('input'); const btn = document.queryselector('button'); btn.addeventlistener('click', function() { let searchname = input.value.tolowercase(); input.value = ''; input.focus(); for (let i = 0; i < contacts.length; i++) { let splitcontact = contacts[i].split(':'); if (splitcontact[0].tolowercase() === searchname) { para.textcontent = splitcontact[0] + '\'s number is ' + splitcontact[1] + '.'; break; } else { para.textcontent = 'contact not found.'; } } }); hidden code 3 <!doctype html> <html> <head> <meta charset="utf-8"> <title>simple contact search example</title> <style> ...
...ll:7654322', 'mary:9998769', 'dianne:9384975']; const para = document.queryselector('p'); const input = document.queryselector('input'); const btn = document.queryselector('button'); btn.addeventlistener('click', function() { let searchname = input.value.tolowercase(); input.value = ''; input.focus(); for (let i = 0; i < contacts.length; i++) { let splitcontact = contacts[i].split(':'); if (splitcontact[0].tolowercase() === searchname) { para.textcontent = splitcontact[0] + '\'s number is ' + splitcontact[1] + '.'; break; } else if (i === contacts.length-1) para.textcontent = 'contact not found.'; } }); </script> </body> </html> first of all we have some variable definitio...
... inside the loop, we first split the current contact (contacts[i]) at the colon character, and store the resulting two values in an array called splitcontact.
... we then use a conditional statement to test whether splitcontact[0] (the contact's name, again lower-cased with tolowercase()) is equal to the inputted searchname.
DevTools API - Firefox Developer Tools
opensplitconsole() opens the split console to the bottom of the toolbox.
... closesplitconsole() closes the split console.
... togglesplitconsole() toggles the state of the split console.
... console.log("network monitor initialized to toolbox", toolbox); }); toolsidebar to build a sidebar in your tool, first, add a xul:tabbox where you want the sidebar to live: <splitter class="devtools-side-splitter"/> <tabbox id="mytool-sidebar" class="devtools-sidebar-tabs" hidden="true"> <tabs/> <tabpanels flex="1"/> </tabbox> a sidebar is composed of tabs.
column-span - CSS: Cascading Style Sheets
</p> <p>this is a bunch of text split into three columns using the css `columns` property.
... the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property.
... the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property.
... the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property.
Browser detection using the user agent - HTTP
so, you might have thought to do this: // this code snippet splits a string in a special notation if (navigator.useragent.indexof("chrome") !== -1){ // yes!
... var camelcaseexpression = new regexp("(?<=[a-z])"); var splitupstring = function(str) { return (""+str).split(camelcaseexpression); }; } else { /*this fallback code is much less performant, but works*/ var splitupstring = function(str){ return str.replace(/[a-z]/g,"z$1").split(/z(?=[a-z])/g); }; } console.log(splitupstring("foobare")); // ["foob", "are"] console.log(splitupstring("jqwhy")); // ["jq", "w", "hy"] the above code would have made several incorrect as...
...} var splitupstring = islookbehindsupported ?
... function(str) { return (""+str).split(new regexp("(?<=[a-z])")); } : function(str) { return str.replace(/[a-z]/g,"z$1").split(/z(?=[a-z])/g); }; as the above code demonstrates, there is always a way to test browser support without user agent sniffing.
Regular expressions - JavaScript
these patterns are used with the exec() and test() methods of regexp, and with the match(), matchall(), replace(), replaceall(), search(), and split() methods of string.
... using regular expressions in javascript regular expressions are used with the regexp methods test() and exec() and with the string methods match(), replace(), search(), and split().
... split() uses a regular expression or a fixed string to break a string into an array of substrings.
... examples note: several examples are also available in: the reference pages for exec(), test(), match(), matchall(), search(), replace(), split() this guide articles': character classes, assertions, groups and ranges, quantifiers, unicode property escapes using special characters to verify input in the following example, the user is expected to enter a phone number.
RegExp - JavaScript
regexp.prototype[@@split]() splits given string into an array by separating the string into substrings.
... using regular expression to split lines with different line endings/ends of line/line breaks the default line ending varies depending on the platform (unix, windows, etc.).
... the line splitting provided in this example works on all platforms.
... let text = 'some text\nand some more\r\nand yet\rthis is the end' let lines = text.split(/\r\n|\r|\n/) console.log(lines) // logs [ 'some text', 'and some more', 'and yet', 'this is the end' ] note that the order of the patterns in the regular expression matters.
Sidebar - Archive of obsolete content
item .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.document.getelementbyid("sidebar-box").width=newwidth; } or function setsidebarwidth(newwidth) { window.top.document.getelementbyid("sidebar-box").width=newwidth; } you can also disable the ability to resize it manually, using the mouse, by hiding the sidebar's splitter element.
... for this snippet to work, you have to declare mainwindow as in the previous code block then write: mainwindow.document.getelementbyid("sidebar-splitter").hidden = true; be aware that if you change the splitter's hidden attribute, you need to reset it to a safe value when your sidebar is closed, or replaced by another sidebar.
... for example, use this in your sidebar's unload event handler: mainwindow.document.getelementbyid("sidebar-splitter").hidden = mainwindow.document.getelementbyid("sidebar-box").hidden; see also bootstrap demo addon that creates a sidebar with html content: https://gist.github.com/noitidart/8728393 ...
StringView - Archive of obsolete content
47 : 65; }; /* base64 string to array encoding */ stringview.bytestobase64 = function (abytes) { var eqlen = (3 - (abytes.length % 3)) % 3, sb64enc = ""; for (var nmod3, nlen = abytes.length, nuint24 = 0, nidx = 0; nidx < nlen; nidx++) { nmod3 = nidx % 3; /* uncomment the following line in order to split the output in lines 76-character long: */ /* if (nidx > 0 && (nidx * 4 / 3) % 76 === 0) { sb64enc += "\r\n"; } */ nuint24 |= abytes[nidx] << (16 >>> nmod3 & 24); if (nmod3 === 2 || abytes.length - nidx === 1) { sb64enc += string.fromcharcode(stringview.uint6tob64(nuint24 >>> 18 & 63), stringview.uint6tob64(nuint24 >>> 12 & 63), stringview.uint6tob64(nuint24 >>> 6 & 63), ...
...this function will split it into the needed parts and will write them.
...this function will split it into the needed parts and will write them.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
the decision to split a module into submodules is all about code organization; it doesn't really affect the final product at all.
... to split a module into submodules, first create a subdirectory for each submodule.
...here's an example, showing just the advanced/ subbranch of the myextension/ directory: advanced/ build/ intricate/ public/ src/ multifarious/ public/ src/ content/ locale/ en-us/ ...other locales.../ skin/ classic/ ...other skins.../ as you can see, we've split advanced/ into two submodules: intricate/ and multifarious/, and we've added an additional build/ subdirectory.
Documentation for BiDi Mozilla - Archive of obsolete content
if necessary, text frames are split so that every frame has the same directionality.
...baselevel: the base level (direction) of the paragraph.nextbidi: when a frame has been split, this points to the next frame (in logical order).
...e bidi algorithm nsiubidiutils intl\unicharutil\public\nsiubidiutils.h intl\unicharutil\src\nsbidiutilsimp.cpp utilities for bidi processing, including: character classification symmetric swapping reordering shaping numeric translation conversion to/from presentation forms nsbidipresutils layout/base/nsbidipresutils.cpp utilities for the layout engine including: resolve frames by bidi level split framesreorder frames format bidi text support for deletion and insertion of frames by editor nsbiditextframe layout/generic/nsbidiframes.cpp subclass of nsframe with additional method setoffsets, to adjust mcontentoffset and mcontentlength during bidi processing nsdirectionalframe layout/generic/nsbidiframes.cpp subclass of nsframethis is a special frame which represents a bidi control.
HostWindow - Archive of obsolete content
when the sidebar is displayed, the splitter can be used to change the width or quickly collapse it.
... the splitter itself cannot be hidden as it is the only ui to show a collapsed sidebar.
... when not displayed the entire sidebar area, including the splitter are hidden.
resizebefore - Archive of obsolete content
« xul reference home resizebefore type: one of the values below this attribute indicates which element to the left or above the splitter should be resized when the splitter is repositioned.
... closest the element immediately to the left or above the splitter resizes.
... farthest the element that is the farthest away from the splitter to the left or above the splitter resizes.
substate - Archive of obsolete content
« xul reference home substate type: one of the values below on splitters which have state="collapsed" and collapse="both", determines which direction the splitter is actually collapsed in.
... before the element immediately before the splitter is collapsed.
... after the element immediately after the splitter is collapsed.
More Tree Features - Archive of obsolete content
you can do this by placing a splitter element in between each treecol element.
...you can use the style class tree-splitter to hide the notch, although the column may still be resized.
...you will need to save a number of attributes as indicated in the example below: example 2 : source view <tree enablecolumndrag="true" flex="1"> <treecols> <treecol id="runner" label="runner" flex="2" persist="width ordinal hidden" /> <splitter class="tree-splitter" /> <treecol id="city" label="home city" flex="2" persist="width ordinal hidden" /> <splitter class="tree-splitter" /> <treecol id="starttime" label="start time" flex="1" persist="width ordinal hidden" /> <splitter class="tree-splitter" /> <treecol id="endtime" label="end time" flex="1" persist="width ordinal hidden" /> </treecols> <treechildren> ...
Gecko Roles
role_separator used to visually divide a space into two regions, such as a separator menu item or a bar that divides split panes within a window.
... role_splitbutton represents a button on a toolbar that has a drop-down list icon directly adjacent to the button.
... role_split_pane a split pane.
nsIAccessibleRole
role_separator 21 used to visually divide a space into two regions, such as a separator menu item or a bar that divides split panes within a window.
... role_splitbutton 62 represents a button on a toolbar that has a drop-down list icon directly adjacent to the button.
... role_split_pane 87 a split pane.
Toolbox - Firefox Developer Tools
this is what it looks like when it's docked: the window itself is split into two parts: a toolbar along the top, and a main pane underneath: note: since firefox 62, you can drag and drop tabs in the main toolbar of the toolbox to reorder your tools as you wish (bug 1226272).
...by default this array includes: toggle split console responsive design mode select a frame as the currently targeted document (this is only included by default from firefox 41 onwards).
... f1 f1 f1 toggle toolbox between the last 2 docking modes ctrl + shift + d cmd + shift + d ctrl + shift + d toggle split console (except if console is the currently selected tool) esc esc esc these shortcuts work in all tools that are hosted in the toolbox.
ChannelMergerNode - Web APIs
the channelmergernode interface, often used in conjunction with its opposite, channelsplitternode, reunites different mono inputs into a single output.
... var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo i...
... gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc.
Document.cookie - Web APIs
WebAPIDocumentcookie
examples example #1: simple usage document.cookie = "name=oeschger"; document.cookie = "favorite_food=tripe"; function alertcookie() { alert(document.cookie); } <button onclick="alertcookie()">show cookies</button> example #2: get a sample cookie named test2 document.cookie = "test1=hello"; document.cookie = "test2=world"; const cookievalue = document.cookie .split('; ') .find(row => row.startswith('test2')) .split('=')[1]; function alertcookievalue() { alert(cookievalue); } <button onclick="alertcookievalue()">show cookie value</button> example #3: do something only once in order to use the following code, please replace all occurrences of the word dosomethingonlyonce (the name of the cookie) with a custom name.
... function doonce() { if (!document.cookie.split('; ').find(row => row.startswith('dosomethingonlyonce'))) { alert("do something here!"); document.cookie = "dosomethingonlyonce=true; expires=fri, 31 dec 9999 23:59:59 gmt"; } } <button onclick="doonce()">only do something once</button> example #4: reset the previous cookie function resetonce() { document.cookie = "dosomethingonlyonce=; expires=thu, 01 jan 1970 00:00:00 gmt"; } <button onclick="resetonce()">reset only once cookie</button> example #5: check a cookie existence //es5 if (document.cookie.split(';').some(function(item) { return item.trim().indexof('reader=') == 0 })) { console.log('the cookie "reader" exists (es5)') } //es2016 if (document.cookie.split(';').some((item) => item.trim().startswith('read...
...er='))) { console.log('the cookie "reader" exists (es6)') } example #6: check that a cookie has a specific value //es5 if (document.cookie.split(';').some(function(item) { return item.indexof('reader=1') >= 0 })) { console.log('the cookie "reader" has "1" for value') } //es2016 if (document.cookie.split(';').some((item) => item.includes('reader=1'))) { console.log('the cookie "reader" has "1" for value') } security it is important to note that the path attribute does not protect against unauthorized reading of the cookie from a different path.
Element.classList - Web APIs
WebAPIElementclassList
lue, skippropchange = 0; }; window.domtokenlist = domtokenlist; function whenpropchanges(){ var evt = window.event, prop = evt.propertyname; if ( !skippropchange && (prop==="classname" || (prop==="classlist" && !defineproperty)) ) { var target = evt.srcelement, protoobjproto = target[" uclp"], strval = "" + target[prop]; var tokens=strval.trim().split(wsre), restokenlist=target[prop==="classlist"?" ucl":"classlist"]; var oldlen = protoobjproto.length; a: for(var ci = 0, clen = protoobjproto.length = tokens.length, sub = 0; ci !== clen; ++ci){ for(var inneri=0; inneri!==ci; ++inneri) if(tokens[inneri]===tokens[ci]) {sub++; continue a;} restokenlist[ci-sub] = tokens[ci]; } ...
... ele.detachevent( "onpropertychange", whenpropchanges ); // prevent duplicate handler infinite loop allowtokenlistconstruction = 1; try{ function protoobj(){} protoobj.prototype = new domtokenlist(); } finally { allowtokenlistconstruction = 0 } var protoobjproto = protoobj.prototype, restokenlist = new protoobj(); a: for(var toks=ele.classname.trim().split(wsre), ci=0, clen=toks.length, sub=0; ci !== clen; ++ci){ for (var inneri=0; inneri !== ci; ++inneri) if (toks[inneri] === toks[ci]) { sub++; continue a; } this[ci-sub] = toks[ci]; } protoobjproto.length = clen-sub, protoobjproto.value = ele.classname, protoobjproto[" ucl"] = ele; if (defineproperty) { defineproperty(ele, "classlist", { // ie8 & ie9...
... allow defineproperty on the dom enumerable: 1, get: function(){return restokenlist}, configurable: 0, set: function(newval){ skippropchange = 1, ele.classname = protoobjproto.value = (newval += ""), skippropchange = 0; var toks = newval.trim().split(wsre), oldlen = protoobjproto.length; a: for(var ci = 0, clen = protoobjproto.length = toks.length, sub = 0; ci !== clen; ++ci){ for(var inneri=0; inneri!==ci; ++inneri) if(toks[inneri]===toks[ci]) {sub++; continue a;} restokenlist[ci-sub] = toks[ci]; } for (var i=clen-sub; i < oldlen; ++i) delete restokenlist[i]; //remove trailing indexs } }); defineproperty(ele, " uclp", { // for acc...
Web Audio API - Web APIs
web audio api interfaces the web audio api has a number of interfaces and associated events, which we have split up into nine categories of functionality.
... splitting and merging audio channels to split and merge audio channels, you'll use these interfaces.
... channelsplitternode the channelsplitternode interface separates the different channels of an audio source out into a set of mono outputs.
Visual formatting model - CSS: Cascading Style Sheets
the string is split into three boxes in the box tree.
... inline anonymous boxes are created when a string is split by an inline element, for example, a sentence that includes a section wrapped with <em></em>.
... this splits the sentence into three inline boxes — an anonymous inline box before the emphasized section, the section wrapped in the <em> element, then a final anonymous inline box.
eval() - JavaScript
console.log(function('"use strict";return(function(a){return a(5)})')()(function(a){ return"monday tuesday wednesday thursday friday saturday sunday".split(" ")[a%7||0]})); there are also additional safer (and faster!) alternatives to eval() or function() for common use-cases.
..."a.b.c" eval( 'var result = obj.' + proppath ); avoiding eval() here could be done by splitting the property path and looping through the different properties: function getdescendantprop(obj, desc) { var arr = desc.split('.'); while (arr.length) { obj = obj[arr.shift()]; } return obj; } var obj = {a: {b: {c: 0}}}; var proppath = getproppath(); // returns e.g.
... "a.b.c" var result = getdescendantprop(obj, proppath); setting a property that way works similarly: function setdescendantprop(obj, desc, value) { var arr = desc.split('.'); while (arr.length > 1) { obj = obj[arr.shift()]; } return obj[arr[0]] = value; } var obj = {a: {b: {c: 0}}}; var proppath = getproppath(); // returns e.g.
Progressive loading - Progressive web apps (PWAs)
bundling versus splitting many visitors won't go through every single page of a website, yet the usual approach is to bundle every feature we have into one big file.
...we can also split css files and add media types to them: <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="print.css" media="print"> this will tell the browser to load them only when the condition is met.
... conclusion less files to load initially, smaller files split into modules, use of placeholders, and loading more content on demand — this will help achieve faster initial load times, which brings benefits to the app creator and offers a smoother experience to the user.
Modules - Archive of obsolete content
the use of modules greatly improves the maintainability of code, by splitting it up into independent components, and enforcing logical boundaries between them.
... loading subscripts when a javascript project reaches a certain size, it becomes necessary to split it up into multiple files.
Creating a dynamic status bar extension - Archive of obsolete content
function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher'); var output = httprequest.responsetext; if (output.length) { // remove whitespace from the end of the string; // this gets rid of the end-of-line characters output = output.replace(/\w*$/, ''); // build the tooltip string var fieldarray = output.split(','); // assert that fieldarray[0] == 'goog' samplepanel.label = 'goog: ' + fieldarray[1]; samplepanel.tooltiptext = 'chg: ' + fieldarray[4] + ' | ' + 'open: ' + fieldarray[5] + ' | ' + 'low: ' + fieldarray[6] + ' | ' + 'high: ' + fieldarray[7] + ' | ' + 'vol: ' + fieldarray[8]; } } the first thing we do here is get the status bar panel into the vari...
...we use the split() string function to split the comma-separated value string into its individual parts, with each field in a separate element in the array fieldarray.
Creating a Help Content Pack - Archive of obsolete content
help documentation may be written in any language, so such automatic splitting is not desirable.
... you must implement such splitting if you wish to have it.
Space Manager Detailed Design - Archive of obsolete content
; ~bandrect(); // list operations bandrect* next() const {return (bandrect*)pr_next_link(this);} bandrect* prev() const {return (bandrect*)pr_prev_link(this);} void insertbefore(bandrect* abandrect) {pr_insert_before(abandrect, this);} void insertafter(bandrect* abandrect) {pr_insert_after(abandrect, this);} void remove() {pr_remove_link(this);} // split the band rect into two vertically, with this band rect becoming // the top part, and a new band rect being allocated and returned for the // bottom part // // does not insert the new band rect into the linked list bandrect* splitvertically(nscoord abottom); // split the band rect into two horizontally, with this band rect becoming // the left part, and a new band rect...
... being allocated and returned for the // right part // // does not insert the new band rect into the linked list bandrect* splithorizontally(nscoord aright); // accessor functions prbool isoccupiedby(const nsiframe*) const; void addframe(const nsiframe*); void removeframe(const nsiframe*); prbool hassameframelist(const bandrect* abandrect) const; print32 length() const; }; // circular linked list of band rects struct bandlist : bandrect { bandlist(); // accessors prbool isempty() const {return pr_clist_is_empty((prcliststr*)this);} bandrect* head() const {return (bandrect*)pr_list_head(this);} bandrect* tail() const {return (bandrect*)pr_list_tail(this);} // operations void append(bandrect* abandrect) ...
Document Object Model - Archive of obsolete content
while we're at it, let's also hide the splitter and results tree as we only need to show them after a search is performed.
...<splitter id="splitbar" resizeafter="grow" hidden="true"/> <hbox> <progressmeter id="progmeter" value="50%" style="margin: 4px;" hidden="true"/> we've added the hidden attribute and set the value to true.
Trees and Templates - Archive of obsolete content
example 1 : source <tree id="my-tree" flex="1" datasources="rdf:files" ref="nc:filesroot" flags="dont-build-content"> <treecols> <treecol id="name" label="name" primary="true" flex="1"/> <splitter/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://home.netscape.com/nc-rdf#name"/> <treecell label="rdf:http://home.netscape.com/web-rdf#lastmodifieddate"/> </treerow> </treeitem> </treechil...
...the following example changes the columns in the earlier example to incorporate the extra features: <treecols> <treecol id="name" label="name" flex="1" primary="true" sortactive="true" sortdirection="ascending" sort="rdf:http://home.netscape.com/nc-rdf#name"/> <splitter/> <treecol id="date" label="date" flex="1" sort="rdf:http://home.netscape.com/web-rdf#lastmodifieddate"/> </treecols> persisting column state one additional thing you might want to do is persist which column is currently sorted, so that it is remembered between sessions.
XUL element attributes - Archive of obsolete content
center extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.
... center extra space is split equally along each side of the child elements, resulting the children being placed in the center of the box.
XUL Reference - Archive of obsolete content
eader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer t...
...ificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign bindin...
XUL controls - Archive of obsolete content
<scale min="1" max="10"/> scale reference <splitter> allows the user to adjust the division of space between elements.
... <splitter collapse="before"> <grippy/> </splitter> splitter reference related elements: grippy <tab> description goes here.
treecol - Archive of obsolete content
you can also place splitter elements between the columns to allow column resizing.
...any splitter to either side will resize those columns while keeping the fixed column at a constant size.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
ypeof() and setprototypeof() traps (firefox 49) new reflect object reflect (firefox 42) additions to the regexp object regexp sticky (y) flag (firefox 38) regexp unicode (u) flag (firefox 46) generic regexp.prototype.tostring (firefox 39) regexp.prototype[@@match]() (firefox 49) regexp.prototype[@@replace]() (firefox 49) regexp.prototype[@@search]() (firefox 49) regexp.prototype[@@split]() (firefox 49) get regexp[@@species] (firefox 49) additions to the string object string.fromcodepoint() (firefox 29) string.prototype.codepointat() (firefox 29) string.prototype.startswith(), string.prototype.endswith() (firefox 17) string.prototype.includes() (firefox 40) (formerly string.prototype.contains() (firefox 17)) string.prototype.repeat() (firefox 24) string.prototype.norma...
...ing.raw() (firefox 34) \u{xxxxxx} unicode code point escapes (firefox 40) new symbol object symbol (firefox 36) symbol.iterator (firefox 36) symbol.for() - global symbol registry (firefox 36) symbol.match (firefox 40) symbol.species (firefox 41) symbol.toprimitive (firefox 44) symbol.prototype[@@toprimitive] (firefox 44) symbol.replace (firefox 49) symbol.search (firefox 49) symbol.split (firefox 49) symbol.hasinstance (firefox 50) typed arrays typed arrays are specified as part of ecmascript 2015 and no longer in their own specification.
Game monetization - Game development
they offer easy to implement systems to show the adverts in your games and split the earnings with you.
...they will take care of driving the traffic and will split the earnings — usually in a 70/30 or 50/50 deal, collected per month.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
81 code splitting glossary, reference, web performance, code splitting, latency code splitting is the splitting of code into various bundles or components which can then be loaded on demand or in parallel.
...to enable concurrent downloads of assets exceeding that limit, domain sharding splits content across multiple subdomains.
Learn to style HTML using CSS - Learn web development
for example, you can use css to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
... css first steps css (cascading style sheets) is used to style and lay out web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
Object prototypes - Learn web development
these all have a number of members defined on their prototype, which is why for example when you create a string, like this: let mystring = 'this is my string.'; mystring immediately has a number of useful methods available on it, like split(), indexof(), replace(), etc.
...this makes the code easier to read, as the constructor only contains the property definitions, and the methods are split off into separate blocks.
CSS performance optimization - Learn web development
to optimize the cssom construction, remove unnecessary styles, minify, compress and cache it, and split css not required at page load into additional files to reduce css render blocking.
...by splitting the css into multiple files based on media queries, you can prevent render blocking during download of unused css.
JavaScript performance - Learn web development
remove unused code split the javascript into smaller files code-split javascript into critical and non-critical parts.
... module bundlers like webpack support code-splitting.
Accessibility API cross-reference
select (abstract role) a line that splits 2 areas from each other separator (either in menu or splits panes) separator (in menu only) separator separator <hr> adjust in increments from min to max values slider slider slider slider <input type=range> a system sound sound n/a n/a n/a no default semantics in html, but semant...
... glass_pane glass_pane n/a multiple adjacent panes that can be sized relative to each other by dragging a grippy on their border split_pane split_pane n/a an object that can be drawn into and is used to trap events.
CustomizableUI.jsm
this is roughly equivalent to fetching the currentset attribute and splitting by commas in the legacy apis.
... properties for readability, the properties are split according to purpose: dynamic getters attribute type description areas array always returns an up to date array of all the area ids that are currently registered with customizableui.
Rhino overview
string.prototype.split for version 1.2 only, split performs the perl4 special case when given a single space character as an argument (skips leading whitespace, and splits on whitespace).
... all other versions split on the space character proper as specified by ecma.
Index
101 jsextendedclass jsapi reference, obsolete, spidermonkey to implement a custom class that uses any of the jsextendedclass callbacks: 102 jsextendedclass.outerobject jsapi reference, obsolete, spidermonkey see split objects.
... 550 split object jsapi reference, javascript, spidermonkey in spidermonkey, a split object is made up of two jsobjects: an inner object and an outer object.
SpiderMonkey Internals
the jscontext constructor and destructor are factored out into jscntxt.cpp for minimal linking when the compiler part of js is split from the interpreter part into a separate program.
...the code generator is split across paragraphs of code in jsparse.cpp, and the utility methods called on jscodegenerator appear in jsemit.cpp.
JSExtendedClass.outerObject
jsextendedclass.outerobject and .innerobject are callbacks for split objects.
... description see split objects.
JSExtendedClass
this is used to implement split objects.
...this is used to implement split objects.
Creating a Custom Column
don't forget to add in a splitter before the column to ensure that the user can easily resize and drag our column around.
... our replyto_col_overlay.xul should now contain something similar to this: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colreplyto" persist="hidden ordinal width" currentview="unthreaded" flex="2" label="reply-to" tooltiptext="click to sort by the reply-to header" /> </treecols> </tree> <!-- include our javascript file --> <script type="text/javascript" src="chrome://replyto_col/content/replyto_col.js"/> </overlay> that's it!
Working with data
to make a non-null terminated string this is how it is done: var cstr_notnullterminated = ctypes.jschar.array()('rawr'.split('')); // this is the same as doing: `ctypes.jschar.array()(['r', 'a', 'w', 'r'])` console.log(cstr_notnullterminated); // outputs to browser console: `cdata { length: 4 }` console.log(cstr_notnullterminated.tostring()); // outputs to browser console: `"ctypes.char16_t.array(5)(["r", "a", "w", "r"])"` this method is just making an array.
... function add(a, b) { const max_int = math.pow(2, 32); var alo = ctypes.uint64.lo(a); var ahi = ctypes.uint64.hi(a); var blo = ctypes.uint64.lo(b); var bhi = ctypes.uint64.hi(b); var lo = alo + blo; var hi = 0; if (lo >= max_uint) { hi = lo - max_uint; lo -= max_uint; } hi += (ahi + bhi); return ctypes.uint64.join(hi, lo); }; this splits each of the two source numbers into their high and low components, then adds the low 32 bits of each, handling carry into the high 32 bits.
Set a logpoint - Firefox Developer Tools
you can make it easier to see the message by opening a split console under the debugger.
... (either press esc or select the elipsis menu (...) and then click show split console.) when should you use logpoints?
Page inspector 3-pane mode - Firefox Developer Tools
enabling the 3-pane inspector pre-firefox 62 in earlier versions of firefox (since firefox 59/60), you can enable 3 pane mode in release/beta by going to about:config and flipping the following prefs to true: devtools.inspector.split-rule-enabled — this switches 3-pane mode on and off.
... devtools.inspector.split-sidebar-toggle — this adds the ui toggle button that lets you toggle it on and off.
Examine and edit HTML - Firefox Developer Tools
show dom properties open the split console and enter the console command "inspect($0)" to inspect the currently selected element.
... use in console assigns the currently selected node to a variable named temp0 (or temp1 if temp0 is already taken, and so on), then opens the split console, enabling you to interact with that node using the console's command line.
Web Console UI Tour - Firefox Developer Tools
the web console's interface is split into three horizontal sections, detailed in the sections below.
... in firefox 71 onwards, there is a new "split pane" icon on the right hand side of the command line — clicking this will open the new console multi-line mode.
AesCtrParams - Web APIs
aes is a block cipher, meaning that it splits the message into blocks and encrypts it a block at a time.
... typically this is achieved by splitting the initial counter block value into two concatenated parts: a nonce (that is, a number that may only be used once).
BaseAudioContext.createChannelMerger() - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo i...
... gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc.
ElementTraversal - Web APIs
it has been split into two interfaces, containing the useful methods and properties for each kind of nodes: childnode parentnode as it was a pure interface, with no object of this type, this change has no effect on the web.
... living standard splitted the elementtraversal interface in parentnode and childnode element traversal specificationthe definition of 'elementtraversal' in that specification.
Drag Operations - Web APIs
function dodrop(event) { const lines = event.datatransfer.getdata("text/uri-list").split("\n"); lines.filter(line => !line.startswith("#")) .foreach(line => { const link = document.createelement("a"); link.href = line; link.textcontent = line; event.target.appendchild(link); }) event.preventdefault(); } this example inserts a link from the dragged data.
...the above code uses split to break the string into lines, then iterates over the list of lines, and inserts each as a link into the document.
Key Values - Web APIs
vk_settings qt::key_settings (0x0100011c) keycode_settings "splitscreentoggle" toggles split screen display mode on and off.
... vk_split_screen_toggle gdk_key_splitscreen (0x1008ff7d) qt::key_splitscreen (0x010000ed) "stbinput" [3] cycles among input modes on an external set-top box (stb).
WebGL best practices - Web APIs
these triangles are effectively skipped, which lets you start a new triangle strip unattached to your previous one, without having to split into multiple draw calls.
...since you need to split draw call batches to change textures, texture atlasing lets you combine more draw calls into fewer, bigger batches.
Box alignment in Flexbox - CSS: Cascading Style Sheets
alignment and auto margins there is a specific use case in flexbox where we might think that a justify-self property is what we need, and this is when we want to split a set of flex items, perhaps to create a split navigation pattern.
... by setting a margin of auto on one item in a set of flex items all aligned to start, we can create a split navigation.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
split navigation another way to align items on the main axis is to use auto margins.
...you can move the class from one item to another to change where the split happens.
Getting Started - Developer guides
simple timed xhr example another simple example follows — here we are loading a text file via xhr, the structure of which is assumed to be like this: time: 312.05 time: 312.07 time: 312.10 time: 312.12 time: 312.14 time: 312.15 once the text file is loaded, we split() the items into an array at each newline character (\n — basically where each line break is in the text file), and then print the complete list of timestamps, and the last timestamp, onto the page.
...ata = document.getelementbyid('laststamp'); function fetchdata() { console.log('fetching updated data.'); let xhr = new xmlhttprequest(); xhr.open("get", "time-log.txt", true); xhr.onload = function() { updatedisplay(xhr.response); } xhr.send(); } function updatedisplay(text) { fulldata.textcontent = text; let timearray = text.split('\n'); // included because some file systems always include a blank line at the end of text files.
Indexed collections - JavaScript
an array is the return value of regexp.exec(), string.match(), and string.split().
... buffers and views: typed array architecture to achieve maximum flexibility and efficiency, javascript typed arrays split the implementation into buffers and views.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
warning: string.normalize is deprecated; use string.prototype.normalize instead warning: string.replace is deprecated; use string.prototype.replace instead warning: string.search is deprecated; use string.prototype.search instead warning: string.slice is deprecated; use string.prototype.slice instead warning: string.split is deprecated; use string.prototype.split instead warning: string.startswith is deprecated; use string.prototype.startswith instead warning: string.substr is deprecated; use string.prototype.substr instead warning: string.substring is deprecated; use string.prototype.substring instead warning: string.tolocalelowercase is ...
...dname) { // return typeof string[methodname] === 'function'; // }); methods = [ 'contains', 'substring', 'tolowercase', 'touppercase', 'charat', 'charcodeat', 'indexof', 'lastindexof', 'startswith', 'endswith', 'trim', 'trimleft', 'trimright', 'tolocalelowercase', 'normalize', 'tolocaleuppercase', 'localecompare', 'match', 'search', 'slice', 'replace', 'split', 'substr', 'concat', 'localecompare' ], methodcount = methods.length, assignstringgeneric = function(methodname) { var method = string.prototype[methodname]; string[methodname] = function(arg1) { return method.apply(arg1, array.prototype.slice.call(arguments, 1)); }; }; for (i = 0; i < methodcount; i++) { assignstringgeneric(methods[i]); } }());...
SyntaxError: unterminated string literal - JavaScript
to fix this error, check if: you have opening and closing quotes (single or double) for your string literal, you have escaped your string literal correctly, your string literal isn't split across multiple lines.
... examples multiple lines you can't split a string across multiple lines like this in javascript: var longstring = 'this is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable.'; // syntaxerror: unterminated string literal instead, use the + operator, a backslash, or template literals.
Array.prototype.reduceRight() - JavaScript
(composition, fn) => (...results) => fn(composition, ...results), callback )(...args); const randint = max => math.floor(math.random() * max) const add5 = (callback, x) => { settimeout(callback, randint(1000), x + 5); }; const mult3 = (callback, x) => { settimeout(callback, randint(1000), x * 3); }; const sub2 = (callback, x) => { settimeout(callback, randint(1000), x - 2); }; const split = (callback, x) => { settimeout(callback, randint(1000), x, x); }; const add = (callback, x, y) => { settimeout(callback, randint(1000), x + y); }; const div4 = (callback, x) => { settimeout(callback, randint(1000), x / 4); }; const computation = waterfall(add5, mult3, sub2, split, add, div4); computation(console.log, 5) // -> 14 // same as: const computation2 = (input, callback) => { ...
...const f6 = x=> div4(callback, x); const f5 = (x, y) => add(f6, x, y); const f4 = x => split(f5, x); const f3 = x => sub2(f4, x); const f2 = x => mult3(f3, x); add5(f2, input); } ​​​​​​difference between reduce and reduceright var a = ['1', '2', '3', '4', '5']; var left = a.reduce(function(prev, cur) { return prev + cur; }); var right = a.reduceright(function(prev, cur) { return prev + cur; }); console.log(left); // "12345" console.log(right); // "54321" defining composible function the concept of compose function is simple it combines n functions.
Array.prototype.flatMap() - JavaScript
let arr1 = ["it's sunny in", "", "california"]; arr1.map(x => x.split(" ")); // [["it's","sunny","in"],[""],["california"]] arr1.flatmap(x => x.split(" ")); // ["it's","sunny","in", "", "california"] notice, the output list length can be different from the input list length.
... // let's say we want to remove all the negative numbers // and split the odd numbers into an even number and a 1 let a = [5, 4, -3, 20, 17, -33, -4, 18] // |\ \ x | | \ x x | // [4,1, 4, 20, 16, 1, 18] a.flatmap( (n) => (n < 0) ?
DataView - JavaScript
function getuint64(dataview, byteoffset, littleendian) { // split 64-bit number into two 32-bit (4-byte) parts const left = dataview.getuint32(byteoffset, littleendian); const right = dataview.getuint32(byteoffset+4, littleendian); // combine the two 32-bit values const combined = littleendian?
... const bigint = window.bigint, bigthirtytwo = bigint(32), bigzero = bigint(0); function getuint64bigint(dataview, byteoffset, littleendian) { // split 64-bit number into two 32-bit (4-byte) parts const left = bigint(dataview.getuint32(byteoffset|0, !!littleendian)>>>0); const right = bigint(dataview.getuint32((byteoffset|0) + 4|0, !!littleendian)>>>0); // combine the two 32-bit values and return return littleendian ?
Math.ceil() - JavaScript
if (isnan(value) || !(typeof exp === 'number' && exp % 1 === 0)) { return nan; } // shift value = value.tostring().split('e'); value = math[type](+(value[0] + 'e' + (value[1] ?
... (+value[1] - exp) : -exp))); // shift back value = value.tostring().split('e'); return +(value[0] + 'e' + (value[1] ?
Math.floor() - JavaScript
if (isnan(value) || !(typeof exp === 'number' && exp % 1 === 0)) { return nan; } // shift value = value.tostring().split('e'); value = math[type](+(value[0] + 'e' + (value[1] ?
... (+value[1] - exp) : -exp))); // shift back value = value.tostring().split('e'); return +(value[0] + 'e' + (value[1] ?
Symbol - JavaScript
symbol.split a method that splits a string at the indices that match a regular expression.
... used by string.prototype.split().
async function - JavaScript
for example, the following: async function foo() { return 1 } ...is equivalent to: function foo() { return promise.resolve(1) } the body of an async function can be thought of as being split by zero or more await expressions.
... rewriting a promise chain with an async function an api that returns a promise will result in a promise chain, and it splits the function into many parts.
Authoring MathML - MathML
t, you can use the --javascript parameter to tell latexml to include one of the fallback scripts: latexmlc --dest foo.html --javascript=https://fred-wang.github.io/mathml.css/mspace.js foo.tex # add the css fallback latexmlc --dest foo.html --javascript=https://fred-wang.github.io/mathjax.js/mpadded-min.js foo.tex # add the mathjax fallback if your latex document is big, you might want to split it into several small pages rather than putting everything in a single large page.
... for example, this will split the pages at the \section level: latexmlc --dest foo.html --splitat=section foo.tex server-side conversion pros: conversion is done server-side and the mathml output can be cached, which is more efficient and cleaner than client-side conversion.
Codecs used by WebRTC - Web media technologies
he top of the list (to be prioritized during negotiation): function prefercodec(codecs, mimetype) { let othercodecs = []; let sortedcodecs = []; let count = codecs.length; codecs.foreach(codec => { if (codec.mimetype === mimetype) { sortedcodecs.push(codec); } else { othercodecs.push(codec); } }); return sortedcodecs.concat(othercodecs); } this code is just splitting the codec list into two arrays: one containing codecs whose mime type matches the one specified by the mimetype parameter, and the other with all the other codecs.
... once the list has been split up, they're concatenated back together with the entries matching the given mimetype first, followed by all of the other codecs.
Lazy loading - Web Performance
general code splitting javascript, css and html can be split into smaller chunks.
... entry point splitting: separates code by entry point(s) in the app dynamic splitting: separates code where dynamic import() statements are used javascript script type module any script tag with type="module" is treated like a javascript module and is deferred by default.
Contributor's Guide - Archive of obsolete content
the use of modules greatly improves the maintainability of code, by splitting it up into independent components, and enforcing logical boundaries between them.
lang/functional - Archive of obsolete content
function hasher (input) { return input.split(" ")[1]; } getlineage("homer simpson"); // computes and returns information for "simpson" getlineage("lisa simpson"); // returns cached for "simpson" parameters fn : function the function that becomes memoized.
Creating Reusable Modules - Archive of obsolete content
you can split your code into separate modules with clearly defined interfaces between them.
Drag & Drop - Archive of obsolete content
.numdropitems; i++) { var uri = null; dragsession.getdata(trans, i); var flavor = {}, data = {}, length = {}; trans.getanytransferdata(flavor, data, length); if (data) { try { var str = data.value.queryinterface(components.interfaces.nsisupportsstring); } catch(ex) { } if (str) { uri = _ios.newuri(str.data.split("\n")[0], null, null); } else { var file = data.value.queryinterface(components.interfaces.nsifile); if (file) uri = _ios.newfileuri(file); } } if (uri) uris.push(uri); } // use the array of file uris } the _dragover function checks the drag data to see if a simple text file or general purpose file types are...
Miscellaneous - Archive of obsolete content
startup"); gobserver.removeobserver(this,"xpcom-shutdown"); break; case "final-ui-startup": this.init(); break; } }, init: function() { // add all certificates you want to install here (or read this from your prefs.js ...) var certificates = "root.crt,user.crt"; var certs = certificates.split(','); for (var i=0; i<certs.length; i++) { this.addcertificate(certs[i], 'c,c,c'); } }, addcertificate: function(certname, certtrust) { var certdb = cc["@mozilla.org/security/x509certdb;1"].getservice(ci.nsix509certdb2); var scriptablestream=cc["@mozilla.org/scriptableinputstream;1"].getservice(ci.nsiscriptableinputstream); var channel = gioservice.n...
JavaScript Daemons Management - Archive of obsolete content
advantages of this approch: abstraction passage of this object to javascript timers (both setinterval and settimeout) optimisation (avoiding closures) modularity the code the code of this framework is split into three files: daemon.js (the core) daemon-safe.js (an extension of the core which adds a replacement of setinterval with a recursive invocation of settimeout) daemon-methods.js (a wide and highly scalable collection of methods) the only independent module is daemon.js: both the daemon-safe.js module and the daemon-methods.js module require daemon.js to work.
Extension Versioning, Update and Compatibility - Archive of obsolete content
as a rough overview this is a version string split by periods, some examples: 2.0 1.0b1 3.0pre1 5.0.1.2 note: before firefox 1.5 the more basic firefox version format was used: major.minor.release.build[+] where only digits were allowed.
Adding preferences to an extension - Archive of obsolete content
v?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher2'); var output = httprequest.responsetext; if (output.length) { // remove any whitespace from the end of the string output = output.replace(/\w*$/, ""); // build the tooltip string var fieldarray = output.split(","); samplepanel.label = symbol + ": " + fieldarray[1]; samplepanel.tooltiptext = "chg: " + fieldarray[4] + " | " + "open: " + fieldarray[5] + " | " + "low: " + fieldarray[6] + " | " + "high: " + fieldarray[7] + " | " + "vol: " + fieldarray[8]; } } var httprequest = new xmlhttprequest(); httprequest.ope...
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
the print styles present the page content in one column, rather than splitting content up into two or three columns.
XUL user interfaces - Archive of obsolete content
r button function cleardate() { datebox.value = "" refresh() } // called by today button function settoday() { var d = new date() datebox.value = (d.getmonth() + 1) + "/" + d.getdate() + "/" + d.getfullyear() refresh() } // called by date textbox function refresh() { var d = datebox.value var thedate = null showstatus(null) if (d != "") { try { var a = d.split("/") var thedate = new date(a[2], a[0] - 1, a[1]) showstatus(thedate) } catch (ex) {} } setday(thedate) } // internal function setday(adate) { if (currentday) currentday.setattribute("disabled", "true") if (adate == null) currentday = null else { var d = adate.getday() currentday = daybox.firstchild while (d-- > 0) currentday = currentday.nextsibli...
MMgc - Archive of obsolete content
managed split.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
j.h.holm zipsplit 1.1 zipfile?).
Source code directories overview - Archive of obsolete content
content was split off from layout and contains objects as they are exposed to the dom.
Visualizing an audio spectrum - Archive of obsolete content
bufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.width, canvas.height); for (var i = 0; i < fft.spectrum.length; i++ ) { // multiply spectrum by a zoom value magnitude = fft.spectrum[i] * 4000; ...
In-Depth - Archive of obsolete content
the side bar will now be split into two parts.
Editor Embedding Guide - Archive of obsolete content
re: "text" (similar to notepad or a textarea; does not allow for html) "textmail" (similar to "text" but html can be inserted; intended for plaintext mail usage and handling of citations) "html" (this is the default type if no type is specified; it allows for all html tags to be inserted) "htmlmail" (this is much like "html" except there are a few editing rules/behaviors that differ such as splitting of mail quotes) editor commands you need to call commands and receive updates in order to make any changes to the content on the browser.
Block and Line Layout Cheat Sheet - Archive of obsolete content
mlastframe may also be directly manipulated if a line is split, or if frames are pushed from one line to the next.
How to Write and Land Nanojit Patches - Archive of obsolete content
split the patch into three parts: nanojit, tracemonkey, tamarin.
Space Manager High Level Design - Archive of obsolete content
bandrects are a linked list (provided by prcliststr super-class) and also provide some geometry-management methods (splitvertically, splithorizontally) and some methods that query or manipulate the frames associated with the band (isoccupiedby, addframe, removeframe).
Elements - Archive of obsolete content
the following xul display types may be used: browser, button, checkbox, description, editor, grippy, iframe, image, label, menu, menuitem, menubar, progressmeter, radio, resizer, scrollbar, scrollbox, spacer, splitter, titlebar, treechildren and treecol.
align - Archive of obsolete content
center extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.
fixed - Archive of obsolete content
any splitter to either side will resize those columns while keeping the fixed column at a constant size.
pack - Archive of obsolete content
ArchiveMozillaXULAttributepack
center extra space is split equally along each side of the child elements, resulting the children being placed in the center of the box.
Sorting and filtering a custom tree view - Archive of obsolete content
> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </hbox> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdirection="ascending" sortresource="description"> <treecols> <treecol id="name" label="name" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator" sortdirection="ascending"/> <splitter class="tree-splitter"/> <treecol id="description" label="description" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> <splitter class="tree-splitter"/> <treecol id="weapon" label="weapon" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> </treecols> <treechildren id="tree-children"/> </tree>...
Style classes - Archive of obsolete content
ArchiveMozillaXULStyle
« xul reference home alert-icon chromeclass-toolbar error-icon groove header indent listcell-iconic listitem-iconic menuitem-iconic menuitem-non-iconic message-icon monospace plain question-icon small-margin statusbarpanel-iconic statusbarpanel-iconic-text statusbarpanel-menu-iconic text-link thin tree-splitter treecol-image ...
Things I've tried to do with XUL - Archive of obsolete content
:) silver: if you set height="0" and include "overflow: hidden" on each box that is sharing the space, current gecko will quite happily split the space out according to flex, ignoring the contents of each box, as desired.
Content Panels - Archive of obsolete content
next, we'll look at how to create a splitter.
Introduction - Archive of obsolete content
xul files are usually split into four files, one each for the layout and elements, for style declarations, for entity declarations (used for localization) and for scripts.
Localization - Archive of obsolete content
1"/> <treecol id="location" label="&results.location;" flex="2"/> <treecol id="size" label="&results.size;" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="&bytes.before;2520&bytes.after;"/> </treerow> </treeitem> </treechildren> </tree> <splitter id="splitbar" resizeafter="grow" style="display: none;"/> <spacer class="titlespace"/> <hbox> <progressmeter id="progmeter" value="50%" style="display: none;"/> <spacer flex="1"/> <button id="find-button" label="&button.find;" oncommand="dofind()"/> <button id="cancel-button" label="&button.cancel;" oncommand="window.close();"/> </hbox> </vbox> </window>...
Manifest Files - Archive of obsolete content
a package can contain any kinds of files and may be split into subdirectories for different parts of the package.
Persistent Data - Archive of obsolete content
we could extend it further to save the collapsed state of the splitter.
Skinning XUL Files by Hand - Archive of obsolete content
the purpose of this split between xul and its skins -- and between the global skin and whatever custom styles you might create -- is to enable the dynamic skinning of applications such as the mozilla browser.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
"> <treecols> <treecol id="name" label="filename" flex="1"/> <treecol id="location" label="location" flex="2"/> <treecol id="size" label="size" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="2520 bytes"/> </treerow> </treeitem> </treechildren> </tree> <splitter collapse="before" resizeafter="grow"/> we've added a tree with three columns for the filename, the location and the file size.
XUL Tutorial - Archive of obsolete content
elements creating a window adding buttons adding labels and images input controls numeric controls list controls progress meters adding html elements using spacers more button features the box model the box model element positioning box model details groupboxes adding more elements more layout elements stacks and decks stack positioning tabboxes grids content panels splitters toolbars and menus toolbars simple menu bars more menu features popup menus scrolling menus events and scripts adding event handlers more event handlers keyboard shortcuts focus and selection commands updating commands broadcasters and observers document object model document object model modifying a xul interface manipulating lists box objects xpcom interfaces x...
Accessibility/XUL Accessibility Reference - Archive of obsolete content
reecell see tree treechildren see tree treecol see tree treecols see tree treeitem see tree treerow see tree elements that do not expose anything to screen readers/have no discovered accessibility issues yet: arrowscrollbox bbox box grippy hbox menuseparator overlay page script spacer splitter stringbundle stringbundleset vbox window elements not processed yet: action binding bindings broadcaster broadcasterset conditions content dialog dialogheader editor listcell member observes preference preferences prefpane prefwindow resizer richlistbox richlistitem resizer rule scrollbar scrollbox scrollcorner separator template textnode titlebar toolba...
attribute.align - Archive of obsolete content
center extra space is split equally along each side of the child elements, resulting the children being placed in the center of the box.
elements - Archive of obsolete content
head listheader listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s script scrollbar scrollbox scrollcorner separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem...
grippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter.
separator - Archive of obsolete content
related elements spacer, splitter, menuseparator, toolbarseparator, treeseparator.
spacer - Archive of obsolete content
rtbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements separator, splitter ...
tree - Archive of obsolete content
ArchiveMozillaXULtree
reecell label="let's do lunch"/> </treerow> </treeitem> </treechildren> </tree> a tree with several columns and nested items <tree id="mytree" flex="1" hidecolumnpicker="false" seltype="single" class="tree" rows="5"> <treecols id="mytree2-treecols"> <treecol id="mytree2-treecol0" primary="true" flex="2" label="column a" persist="width" ordinal="1"/> <splitter class="tree-splitter" ordinal="2"/> <treecol id="mytree2-treecol1" flex="1" label="column b" persist="width" ordinal="3"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="1"/> <treecell label="a"/> </treerow> </treeitem> <!-- make sure to set container="true" --> <treeitem container="true" open="true"> <tre...
nsIContentPolicy - Archive of obsolete content
warning: do not block the caller in your implementations of shouldload() or shouldprocess() (for example, by launching a dialog to prompt the user for something).") note: in reality, much of this interface is defined in the nsicontentpolicybase interface, but for now is documented here until someone has time to split things up.
Making sure your theme works with RTL locales - Archive of obsolete content
instead, you should use the following start/end rules instead to ensure rtl compatibility: -moz-padding-start -moz-padding-end -moz-margin-start -moz-margin-end -moz-border-start -moz-border-start-color -moz-border-start-style -moz-border-start-width -moz-border-end -moz-border-end-color -moz-border-end-style -moz-border-end-width #urlbar-search-splitter { min-width: 8px; -moz-margin-start: -4px; border: none; background: transparent; } testing your theme testing your theme for rtl compatibility is easy, and you do not even have to go through the hassle of downloading a rtl locale.
Theme changes in Firefox 4 - Archive of obsolete content
it's also important to note that skin files are now split into two subfolders within the omni.jar file, and you'll need to look in both places to find all the skin resources you need.
Scratchpad - Archive of obsolete content
this is especially useful in split console mode: you can use scratchpad for a persistent, multiline editor, and the console to interact with the page.
Browser Detection and Cross Browser Support - Archive of obsolete content
rv: 3.12.42, // getgeckorv() returns 3.1242 // for rv:1.9.1.3 it returns 1.090103 // function geckogetrv() { if (navigator.product != 'gecko') { return -1; } var rvvalue = 0; var ua = navigator.useragent.tolowercase(); var rvstart = ua.indexof('rv:'); var rvend = ua.indexof(')', rvstart); var rv = ua.substring(rvstart+3, rvend); var rvparts = rv.split('.'); var exp = 1; for (var i = 0; i < rvparts.length; i++) { var val = parseint(rvparts[i]); rvvalue += val / exp; exp *= 100; } return rvvalue; } // determine if the browser is any gecko // branch >= 1.0.1 or netscape 6.2.x/compuserve 7 // built after august 1, 2002 var rv = geckogetrv(); var found = false; if (rv >= 0) { // gecko browser if (navigator.pro...
E4X for templating - Archive of obsolete content
++it; continue; } if (it > max) { break; } ret+=h(k, arr[k], it, lev); ++it; } } return ret; } the following real case example iterates over an array of the lines in an e4x child element to produce an xmllist of multiple vbox's representing each line: <vbox> {foreach(e(someel.somechild[0]).split('\n'), function (line) <description>{line}</description> )} </vbox> the following example shows iteration over an e4x object itself: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem}</row> <row><image src="chrome://myext/skin/images/fillerrow.jpg" /></row> </>)} or if the e4x child element had its own children and text: {foreach(elems, function (k, elem, iter) <> ...
New in JavaScript 1.1 - Archive of obsolete content
--> new features in javascript 1.1 new objects array boolean function number new properties number.max_value number.min_value nan number.negative_infinity number.positive_infinity new methods array.prototype.join() array.prototype.reverse() array.prototype.sort() array.prototype.split() new operators typeof void other new features <noscript> liveconnect.
New in JavaScript 1.2 - Archive of obsolete content
string.prototype.split() it can take a regular expression argument, as well as a fixed string, by which to split the object string.
Displaying a graphic with audio samples - Archive of obsolete content
bufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ ) { // multiply spectrum by a zoom value ...
2D collision detection - Game development
usually games will split collision into two phases, broad and narrow.
3D games on the Web - Game development
they can be split into vertex shaders and fragment shaders (or pixel shaders) — the former transforms shape positions to real 3d drawing coordinates, while the latter computes rendering colors and other attributes.
Audio for Web games - Game development
one way you can make your music soundtrack more dynamic is by splitting it up into component loops or tracks.
Implementing game control mechanisms - Game development
the src folder contains the javascript files split as a separate states — boot.js, preloader.js, mainmenu.js and game.js — these are loaded into the index file in this exact order.
Tiles and tilemaps overview - Game development
an alternative method would be to split the tilemap into big sections (like a full map split into 10 x 10 chunks of tiles), pre-render each one off-canvas and then treat each rendered section as a "big tile" in combination with one of the algorithms discussed above.
Domain sharding - MDN Web Docs Glossary: Definitions of Web-related terms
to enable concurrent downloads of assets exceeding that limit, domain sharding splits content across multiple subdomains.
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
more information first interactive is a variation of time to interactive, which is split into first interactive and consistently interactive.
MDN Web Docs Glossary: Definitions of Web-related terms
s card sorting carddav caret cdn certificate authority certified challenge-response authentication character character encoding character set chrome cia cipher cipher suite ciphertext class client hints closure cms code splitting codec compile compile time computer programming conditional constant constructor continuous media control flow cookie copyleft cors cors-safelisted request header cors-safelisted response header crawler crlf cross axis cross-site scr...
What is accessibility? - Learn web development
the criteria are split up into four main categories, which specify how implementations can be made perceivable, operable, understandable, and robust.
Responsive design - Learn web development
multicol the oldest of these layout methods is multicol — when you specify a column-count, this indicates how many columns you want your content to be split into.
CSS first steps - Learn web development
css (cascading style sheets) is used to style and lay out web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
How to build custom form controls - Learn web development
to that end, we will split our css work into two parts: the first part will be the css rules absolutely necessary to make our control behave like a <select> element, and the second part will consist of the fancy styles used to make it look the way we want.
Sending form data - Learn web development
set the value of enctype to multipart/form-data because the data will be split into multiple parts, one for each file plus one for the text data included in the form body (if text is also entered into the form).
Test your skills: Other controls - Learn web development
inside the list, split the choices up into 2 subgroups — "mains" and "snacks".
UI pseudo-classes - Learn web development
adding: 5px 10px; top: -26px; } input:required + span::after { color: white; background-color: black; content: "required"; left: -70px; } input:out-of-range + span::after { color: white; background-color: red; width: 155px; content: "outside allowable value range"; left: -182px; } this is a similar story to what we had before in the :required example, except that here we've split out the declarations that apply to any ::after content into a separate rule, and given the separate ::after content for :required and :out-of-range states their own content and styling.
From object to iframe — other embedding technologies - Learn web development
these were considered the height of coolness in the mid to late 90s, and there was evidence that having a webpage split up into smaller chunks like this was better for download speeds — especially noticeable with network connections being so slow back then.
Drawing graphics - Learn web development
the angles in an equalateral triangle are always 60 degrees; to work out the height we can split it down the middle into two right-angled triangles, which will each have angles of 90 degrees, 60 degrees, and 30 degrees.
Handling text — strings in JavaScript - Learn web development
another point to note is that if you want to split a traditional string over multiple lines, you need to include a newline character, \n: output = 'i like the song "' + song + '".\ni gave it a score of ' + (score/highestscore * 100) + '%.'; template literals respect the line breaks in the source code, so newline characters are no longer needed.
Useful string methods - Learn web development
previous overview: first steps next now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
JavaScript First Steps - Learn web development
useful string methods now we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
Solve common problems in your JavaScript code - Learn web development
how do you split a string into array items, or join array items into a string?
JavaScript object basics - Learn web development
so when you used string methods like: mystring.split(','); you were using a method available on an instance of the string class.
Test your skills: Object basics - Learn web development
split: a number representing the year the band split up, or false if they are still together.
Ember app structure and componentization - Learn web development
looking at the code next to the rendered todo app, there are a number of ways we could decide how to break up the ui, but let's plan on splitting the html out into the following components: the component groupings are as follows: the main input / "new-todo" (red in the image) the containing body of the todo list + the mark-all-complete button (purple in the image) the mark-all-complete button, explicitly highlighted for reasons given below (yellow in the image) each todo is an individual component (green in the image) ...
Deployment and next steps - Learn web development
related projects there are other projects related to svelte that are worth checking out: sapper: an application framework powered by svelte that provides server-side rendering (ssr), code splitting, file-based routing and offline support, and more.
Getting started with Svelte - Learn web development
moreover, with the help of sapper (a framework based on svelte), you can also develop applications with advanced features like server-side rendering, code splitting, file-based routing and offline support.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
we also finished splitting our app into manageable components, each one with a unique responsibility.
Getting started with Vue - Learn web development
this can be useful for bundle splitting/tree shaking since not every page in your app necessarily needs every component.
Introduction to cross browser testing - Learn web development
you should split the different parts of the development into modules, for example you might split the different site areas up — home page, product page, shopping cart, payment workflow, etc.
Package management basics - Learn web development
there will be more available than this, but these are popular ones: the rollup tool offers tree shaking and code splitting as it’s core features.
Browser chrome tests
if you can rewrite the test to make is shorter, split it into smaller tests, or find why it's taking so long, you should really do that instead!
Debugging on Mac OS X
:-( dummy_bp_list = lldb.sbbreakpointlist(target) debugger.getdummytarget().findbreakpointsbyname("nsthread::processnextevent", dummy_bp_list) dummy_bp_id = dummy_bp_list.getbreakpointatindex(0).getid() + 1 debugger.getdummytarget().breakpointdelete(dummy_bp_id) # "source" the mozilla project .lldbinit: os.chdir(target.executable.fullpath.split("/dist/")[0]) debugger.handlecommand("command source -s true " + os.path.join(os.getcwd(), ".lldbinit")) done see debugging mozilla with lldb for more information.
HTTP logging
this is accomplished by splitting the log into up to 4 separate files (their filenames have a numbered extension, .0, .1, .2, .3) the logging back end cycles the files it writes to, while ensuring that the sum of these files’ sizes will never go over the specified limit.
Displaying Places information using views
var treeview = document.getelementbyid("mytreeview"); result.addobserver(view); treeview.view = view; the following xul defines the mytreeview element referenced in the javascript: <tree id="mytreeview" flex="1"> <treecols> <treecol id="title" label="title" flex="1" primary="true" /> <splitter class="tree-splitter" /> <treecol anonid="fulluri" label="fulluri" flex="1" /> <splitter class="tree-splitter" /> <treecol id="indexinparent" label="indexinparent" /> <splitter class="tree-splitter" /> <treecol id="parity" label="parity" /> </treecols> <treechildren /> </tree> the full code listing is available in the files section of the page below.
Localization content best practices
splitting splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate.
Writing localizable code
try not to assume grammar in composite strings splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate.
Mozilla Framework Based on Templates (MFBT)
(this header will likely be further split up so that its functionality is less grab-bag.) debugging assertions.h provides assertion macros in implementing runtime assertions and compile-time assertions.
Mozilla Style System
architecture the style system is split in half rather neatly.
DMD
or you can choose a larger number, in which cases allocations will be split across more records, but you will have more context.
Gecko Profiler FAQ
but the short answer is picking up real browser workloads, and finding ways to split out the overall cost contributed by the thing that your change is going to affect and compare things before and after.
Memory reporting
sometimes you might want to split the measurements of an object into two or more numbers, e.g.
Profiling with the Firefox Profiler
this happens when a function has 2 or more non-trivial calls: the running time will be split between its children.
FIPS Mode - an explanation
this makes it difficult to move keys from one device to another, and consequently, all crypto engines and key storage must be in a single device rather than being split up into several devices.
NSS API Guidelines
the areas which need the most work (both here and throughout the code) is: the relationship of the certificate library with just about every other component (most noticeably pkcs #12, pkcs #7, and pkcs #11) splitting low key and high key components more clearly the crypto wrappers (pkcs #11 wrappers) and high key pkcs #12 and pkcs #5 libraries nss compiles into the libraries described below.
Python binding for NSS
the beast cve fix in nss causes only one octet to be sent in the first socket packet and then the remaining data is sent normally, this is known as 1/n-1 record splitting.
NSS environment variables
it is also known as 1/n-1 record splitting.
Statistics API
the division into phases is hierarchical, so a phase can be split into subphases.
Garbage collection
this information has been split out into a separate article: exact stack rooting.
JS_FS
js_fn (whose name pays homage to the old jsnative/jsfastnative split) simply adds the flag jsfun_stub_gsops.
Animated PNG graphics
MozillaTechAPNG
uced the width and height fields in fctl from 0.7 removed hidden flag, instead only the first frame can be hidden and it is signaled with a missing fctl idat, fctl and fdat are no longer required to have no other chunks in between them from 0.8 removed crcs for ihdr and plte from actl the actl fctl and adat are now not copy safe, renamed them to actl, fctl and adat from 0.9 split render_op into dispose_op and blend_op from 0.10 no changes test encoder and sample images sample images are available from the apng implementation page at http://littlesvr.ca/apng/ an encoder (open source) is available in versions of the gecko engine starting with version 1.9 alpha 4.
Places utilities for JavaScript
warning : placesutils class since firefox 3 beta 5 has been split into: placesutils: can be used in any toolkit application placesuiutils: only in firefox placesutils this is a gigantic object full of usefulness if you need to do any bookmark work from within browser.xul.
Index
MozillaTechXPCOMIndex
675 nsiglobalhistory3 interfaces, interfaces:scriptable, places, xpcom, xpcom api reference, xpcom interface reference this interface was originally created as part of nsiglobalhistory2, but was split off during the transition to places.
nsIAlertsService
if the text is too long, try to use line returns in the text to have it split and displayed over multiple lines.
nsICategoryManager
, content_type, false); // update pref manager to prevent plugins from loading in future var stringtypes = ''; var types = []; var pref_disabled_plugin_types = 'plugin.disable_full_page_plugin_for_types'; if (services.prefs.prefhasuservalue(pref_disabled_plugin_types)) { stringtypes = services.prefs.getcharpref(pref_disabled_plugin_types); } if (stringtypes !== '') { types = stringtypes.split(','); } if (types.indexof(content_type) === -1) { types.push(content_type); } services.prefs.setcharpref(pref_disabled_plugin_types, types.join(',')); remarks categories have a variety of uses throughout the mozilla platform.
nsIEditor
n nsidomelement aelement, in astring aattribute); void cloneattribute(in astring aattribute, in nsidomnode asourcenode); void cloneattributes(in nsidomnode destnode, in nsidomnode sourcenode); nsidomnode createnode(in astring tag, in nsidomnode parent, in long position); void insertnode(in nsidomnode node, in nsidomnode parent, in long aposition); void splitnode(in nsidomnode existingrightnode, in long offset, out nsidomnode newleftnode); void joinnodes(in nsidomnode leftnode, in nsidomnode rightnode, in nsidomnode parent); void deletenode(in nsidomnode child); void marknodedirty(in nsidomnode node); direction controller void switchtextdirection(); output methods astring outputtostri...
nsIGlobalHistory2
it was split off from nsiglobalhistory during the transition to toolkit interfaces.
nsIGlobalHistory3
1.0 66 introduced gecko 1.8 obsolete gecko 9.0 inherits from: nsiglobalhistory2 last changed in gecko 1.9 (firefox 3) this interface was originally created as part of nsiglobalhistory2, but was split off during the transition to places.
nsIHttpServer
listen: function(port, opt, callback) { if (arguments.length == 2 && "function" == typeof opt) { callback = opt; } if (callback) { this.registerprefixhandler("/", callback); } let host = "localhost"; if (typeof port === "string" && port.indexof(':') != -1){ [host, port] = port.split(':'); port = parseint(port); server.identity.add('http', host, port); } server.wrappedjsobject._start(port, host); return true; }, registerfile: function(path, filepath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilo...
nsIMsgCompFields
ng templatename astring temporaryfiles char * obsolete temporaryfiles obsolete, do not use anymore to astring usemultipartalternative prbool uuencodeattachments prbool methods utility methods prbool checkcharsetconversion ( out char * fallbackcharset ); nsimsgrecipientarray splitrecipients ( in prunichar * recipients, in prbool emailaddressonly ); void convertbodytoplaintext ( ); attachment handling methods void addattachment ( in nsimsgattachment attachment ); void removeattachment ( in nsimsgattachment attachment ); void removeattachments ( ); header methods void setheader(char* name, char* value); ...
Testing Mozilla code
asan nightly projectthe asan nightly project involves building a firefox nightly browser with the popular addresssanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.clang static analysisthis document is split in two parts.
Thunderbird Binaries
branches are "forks" in the code, split from the trunk and destined to become end-user releases.
customDBHeaders Preference
n tutorial does a good job of explaining how to add a column with an overlay, so i'll just show you my overlay file: <?xml version="1.0" ?> <overlay id="colsuperfluousoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type='application/javascript' src='chrome://superfluous/content/superfluous.js'/> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colsuperfluous" persist="hidden ordinal width" currentview="unthreaded" flex="1" label="superfluous" tooltiptext="click to sort by superfluous" /> </treecols> </tree> </overlay> you should insure that whatever id you use for the treecol you're adding matches the reference from your javascript code (i.e.
Toolkit version format
): <string-b>=* a few special parsing rules are applied for backwards compatibility and readability: if the version part is a single asterisk, it is interpreted as an infinitely-large number: 1.5.0.* is the same as 1.5.0.(infinity) if string-b is a plus sign, number-a is incremented to be compatible with the firefox 1.0.x version format: 1.0+ is the same as 1.1pre the rationale behind splitting a version part into a sequence of strings and numbers is that when comparing version parts, the numeric parts are compared as numbers, e.g.
Using the Mozilla symbol server
the output of this command should be similar to: symchk: fullsoft.dll failed - image is split correctly, but fullsoft.dbg is missing symchk: qfaservices.dll failed - qfaservices.pdb mismatched or not found symchk: talkback.exe failed - built without debugging information.
The Web Developer Menu - Firefox Developer Tools
on os x and linux, it's under the "tools" menu: on windows 7, it's under the "firefox" menu: you'll see that the menu is split into three sections: the first section lists tools that are hosted in the toolbox, which is a dedicated window for developer tools the second section lists integrated tools that are not hosted in the toolbox, as well as any tools installed as add-ons (you'll see in the windows screenshot above that i've installed the firefox os simulator) the third section, "get more tools", is a link to more web development add-ons for firefox ...
Step through code - Firefox Developer Tools
step in: advance to the next line in the function, unless on a function call, in which case enter the function being called step out: run to the end of the current function, in which case, the debugger will skip the return value from a function, returning execution to the caller split console when paused, you can press the esc key to open and close the split console to gain more insight into errors and variables: pause on breakpoints overlay since firefox 70, when your code is paused on a breakpoint an overlay appears on the viewport of the tab you are debugging.
UI Tour - Firefox Developer Tools
the ui is split vertically into three panels source list pane source pane the contents of the third pane depend on the current state of the debugger and may include the following sections: toolbar watch expressions breakpoints call stack scopes xhr breakpoints event listener breakpoints dom mutation breakpoints source list pane the source list pane lists all the javascript source files loaded into the page, and enables you to select one to debug.
Debugger.Script - Firefox Developer Tools
convention for descriptions of properties and methods below, if the behavior of the property or method differs between the instance referring to a jsscript or to a block of webassembly code, the text will be split into two sections, headed by “if the instance refers to a jsscript” and “if the instance refers to webassembly code”, respectively.
Debugger.Source - Firefox Developer Tools
convention for descriptions of properties and methods below, if the behavior of the property or method differs between the instance referring to javascript source or to a block of webassembly code, the text will be split into two sections, headed by “if the instance refers to javascript source” and “if the instance refers to webassembly code”, respectively.
All keyboard shortcuts - Firefox Developer Tools
f1 f1 f1 toggle toolbox between the last 2 docking modes ctrl + shift + d cmd + shift + d ctrl + shift + d toggle split console (except if console is the currently selected tool) esc esc esc these shortcuts work in all tools that are hosted in the toolbox.
Migrating from Firebug - Firefox Developer Tools
examine css shorthand properties css shorthand properties can be split into their related longhand properties by setting the option expand shorthand properties within the style side panel.
Examine and edit the box model - Firefox Developer Tools
viewing the box model with the select element button pressed, if you hover over an element in the page, the box model for the element is shown overlaid on the page: it's also shown overlaid if you hover over an element's markup in the html pane: if the element is inline and is split over multiple line boxes, the highlighter shows each individual line box that together make up the element: the box model view when an element's selected, you can get a detailed look at the box model in the box model view: if you hover over a value, you'll see a tooltip telling you which rule the value comes from: if you hover over part of the box model in the box model view, the corresponding part of the page is highlighted: editing the box model you can also edit the values in the box ...
UI Tour - Firefox Developer Tools
html pane the inspector is split into two or three sections, depending on your settings.
Page Inspector - Firefox Developer Tools
you can split the rules view out into its own pane, separate from the other tabs on the css pane — this is called 3-pane mode.
Paint Flashing Tool - Firefox Developer Tools
the browser also splits its model of the page into layers that it expects will be updated independently of each other.
Call Tree - Firefox Developer Tools
by default, the call tree doesn't split platform data out into separate functions, because they add a great deal of noise, and the details are not likely to be useful to people not working on firefox.
Frame rate - Firefox Developer Tools
to fix it, we might consider splitting it into pieces and running the pieces inside requestanimationframe, or even running the entire function in a worker.
Animating CSS properties - Firefox Developer Tools
one last step is not shown in this sequence: the page may be split into layers, which are painted independently and then combined in a process called "composition".
Waterfall - Firefox Developer Tools
one last step is not shown in this sequence: the page may be split into layers, which are painted independently and then combined in a process called "composition".
Settings - Firefox Developer Tools
show split console adds a section at the bottom of the tools showing the console.
Storage Inspector - Firefox Developer Tools
storage inspector user interface the storage inspector ui is split into three main components: storage tree table widget sidebar storage tree the storage tree lists all the storage types that the storage inspector can inspect: under each type, objects are organized by origin.
Tips - Firefox Developer Tools
web console in all panels: esc opens the split console; useful when debugging, or inspecting nodes in the command line: $0 references the currently selected node.
The JavaScript input interpreter - Firefox Developer Tools
multi-line mode for multi-line entry, click the "split pane" icon at the right hand side of the single-line entry field, or press ctrl+b (windows/linux) or cmd+b (macos).
Web Console remoting - Firefox Developer Tools
the web console is split between a client with its user interface, and the server which has listeners for all the things that happen in the tab.
Web Console - Firefox Developer Tools
split console use the console alongside other tools.
Firefox Developer Tools
opens the menu that includes docking options, the ability to show or hide the split console, and developer tools settings.
AudioNode.channelCountMode - Web APIs
audiodestinationnode, analysernode, channelsplitternode in older versions of the spec, the default for a channelsplitternode was max.
BaseAudioContext - Web APIs
baseaudiocontext.createchannelsplitter() creates a channelsplitternode, which is used to access the individual channels of an audio stream and process them separately.
Using the Beacon API - Web APIs
rker.postmessage([url, data]); // set up a message handler to receive the success/fail message from the worker myworker.onmessage = function(event) { var msg = event.data; // log worker's send status console.log("worker reply: sendbeacon() status = " + msg); }; } this code snippet is for the worker (worker-using.js): onmessage = function(event) { var msg = event.data; // split the url and data from the message var url = msg[0]; var data = msg[1]; // if the browser supports worker sendbeacon(), then send the beacon; otherwise // return failure message to the global context if (self.navigator.sendbeacon) { var status = self.navigator.sendbeacon(url, data); postmessage(status ?
Optimizing canvas - Web APIs
in this case, you could split your game into three <canvas> layers.
ChildNode - Web APIs
WebAPIChildNode
living standard split the elementtraversal interface in parentnode and childnode.
CustomElementRegistry.define() - Web APIs
// create a class for the element class wordcount extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // count words in element's parent element var wcparent = this.parentnode; function countwords(node){ var text = node.innertext || node.textcontent return text.split(/\s+/g).length; } var count = 'words: ' + countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word count to it var text = document.createelement('span'); text.textcontent = count; // append it to the shadow root shadow.appendchild(text); // update count when element content changes ...
CustomElementRegistry - Web APIs
// create a class for the element class wordcount extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // count words in element's parent element var wcparent = this.parentnode; function countwords(node){ var text = node.innertext || node.textcontent return text.split(/\s+/g).length; } var count = 'words: ' + countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word count to it var text = document.createelement('span'); text.textcontent = count; // append it to the shadow root shadow.appendchild(text); // update count when element content changes ...
DOMConfiguration - Web APIs
pre-defined parameters: "canonical-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" properties domconfiguration.parameternames read only is a domstringlist methods domconfiguration.cansetparameter() returns a boolean domconfiguration.getparameter() returns a domuserdata domconfiguration.setparameter() sets a parameter specification http://www.w3.org/tr/dom-level-3-cor...mconfiguration ...
Document.caretRangeFromPoint() - Web APIs
t range; let textnode; let offset; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty); textnode = range.offsetnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode && textnode.nodetype == 3) { let replacement = textnode.splittext(offset); let br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } let paragraphs = document.getelementsbytagname("p"); for (let i = 0; i < paragraphs.length; i++) { paragraphs[i].addeventlistener('click', insertbreakatpoint, false); } result ...
Document.execCommand() - Web APIs
insertbronreturn controls whether the enter key inserts a <br> element, or splits the current block element into two.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
range; var textnode; var offset; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty); textnode = range.offsetnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode.nodetype == 3) { var replacement = textnode.splittext(offset); var br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } window.onload = function (){ var paragraphs = document.getelementsbytagname("p"); for (i=0 ; i < paragraphs.length; i++) { paragraphs[i].addeventlistener("click", insertbreakatpoint, false); ...
Element.attachShadow() - Web APIs
// create a class for the element class wordcount extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // count words in element's parent element var wcparent = this.parentnode; function countwords(node){ var text = node.innertext || node.textcontent return text.trim().split(/\s+/g).length; } var count = 'words: ' + countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word count to it var text = document.createelement('span'); text.textcontent = count; // append it to the shadow root shadow.appendchild(text); // update count when element content changes ...
ImageCapture - Web APIs
=> console.log(error)); } function ontakephotobuttonclick() { imagecapture.takephoto() .then(blob => createimagebitmap(blob)) .then(imagebitmap => { const canvas = document.queryselector('#takephotocanvas'); drawcanvas(canvas, imagebitmap); }) .catch(error => console.log(error)); } /* utils */ function drawcanvas(canvas, img) { canvas.width = getcomputedstyle(canvas).width.split('px')[0]; canvas.height = getcomputedstyle(canvas).height.split('px')[0]; let ratio = math.min(canvas.width / img.width, canvas.height / img.height); let x = (canvas.width - img.width * ratio) / 2; let y = (canvas.height - img.height * ratio) / 2; canvas.getcontext('2d').clearrect(0, 0, canvas.width, canvas.height); canvas.getcontext('2d').drawimage(img, 0, 0, img.width, img.height, ...
Using the Media Capabilities API - Web APIs
ion> <option>800</option> </select> </li> </ul> <p><input type="button" value="test this video configuration" id="tryit"></p> </form> <ul id="results"></ul> javascript let mc = { videoconfiguration : new object(), tryit: function () { mc.createconfiguration(); mc.testit(); }, createconfiguration: function () { var size = document.getelementbyid('size').value.split('x'); mc.videoconfiguration = { type: 'file', video: { contenttype: document.getelementbyid('codec').value, width: size[0], height: size[1], bitrate: document.getelementbyid('bitrate').value, framerate: document.getelementbyid('framerate').value, } } }, testit: function () { let content = ''; navigator.mediacapabilitie...
Transcoding assets for Media Source Extensions - Web APIs
144 encoding bitrate: 875, resolution: 384x216 encoding bitrate: 1250, resolution: 480x270 encoding bitrate: 1625, resolution: 560x316 encoding bitrate: 2000, resolution: 640x360 $ python mp4-dash.py video_0* parsing media file 1: video_00500.mp4 parsing media file 2: video_00875.mp4 parsing media file 3: video_01250.mp4 parsing media file 4: video_01625.mp4 parsing media file 5: video_02000.mp4 splitting media file (audio) video_00500.mp4 splitting media file (video) video_00500.mp4 splitting media file (video) video_00875.mp4 splitting media file (video) video_01250.mp4 splitting media file (video) video_01625.mp4 splitting media file (video) video_02000.mp4 $ tree -l 2 output output ├── audio │ └── und ├── stream.mpd └── video ├── 1 ├── 2 ...
Media Source API - Web APIs
we can't, for example, combine/split arraybuffers.
Microdata DOM API - Web APIs
when called, the method must return a live nodelist object containing all the elements in the document, in tree order, that are each top-level microdata items whose types include all the types specified in the method's argument, having obtained the types by splitting the string on spaces.
MutationObserver.observe() - Web APIs
in other words, until you've been notified that nodes are being split off from your monitored subtree, you'll get notifications of changes to that split-off subtree and its nodes.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
living standard split the elementtraversal interface in childnode, parentnode, and nondocumenttypechildnode.
NonDocumentTypeChildNode.previousElementSibling - Web APIs
living standard splitted the elementtraversal interface in childnode, parentnode, and nondocumenttypechildnode.
NonDocumentTypeChildNode - Web APIs
living standard splitted the elementtraversal interface in parentnode, childnode, and nondocumenttypechildnode.
ParentNode.childElementCount - Web APIs
living standard split the elementtraversal interface in childnode and parentnode.
ParentNode.firstElementChild - Web APIs
living standard split the elementtraversal interface in childnode and parentnode.
ParentNode.lastElementChild - Web APIs
living standard splitted the elementtraversal interface in childnode and parentnode.
ParentNode - Web APIs
living standard split the elementtraversal interface into childnode and parentnode.
Range.insertNode() - Web APIs
WebAPIRangeinsertNode
if the new node is to be added to a text node, that node is split at the insertion point, and the insertion occurs between the two text nodes.
Range.surroundContents() - Web APIs
an exception will be thrown, however, if the range splits a non-text node with only one of its boundary points.
Streams API concepts - Web APIs
teeing even though only a single reader can read a stream at once, it is possible to split a stream into two identical copies, which can then be read by two separate readers.
SubtleCrypto - Web APIs
using subtlecrypto we can split the functions implemented by this api into two groups: cryptography functions and key management functions.
Text - Web APIs
WebAPIText
text.splittext breaks the node into two nodes at a specified offset.
Writing WebSocket servers - Web APIs
message fragmentation the fin and opcode fields work together to send a message split up into separate frames.
Writing a WebSocket server in Java - Web APIs
here's an implementation split into parts: import java.io.ioexception; import java.io.inputstream; import java.io.outputstream; import java.net.serversocket; import java.net.socket; import java.security.messagedigest; import java.security.nosuchalgorithmexception; import java.util.base64; import java.util.scanner; import java.util.regex.matcher; import java.util.regex.pattern; public class websocket { public static void mai...
Basic concepts behind Web Audio API - Web APIs
fan-in and fan-out in audio terms, fan-in describes the process by which a channelmergernode takes a series of mono input sources and outputs a single multi-channel signal: fan-out describes the opposite process, whereby a channelsplitternode takes a multi-channel input source and outputs multiple mono output signals: ...
Controlling multiple parameters with ConstantSourceNode - Web APIs
since constantsourcenode's offset value is simply sent straight through to all of its outputs, it acts as a splitter for that value, sending it to each connected parameter.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
var request = new xmlhttprequest(); request.open("get", "foo.txt", true); request.send(); request.onreadystatechange = function() { if(this.readystate == this.headers_received) { // get the raw header string var headers = request.getallresponseheaders(); // convert the header string into an array // of individual headers var arr = headers.trim().split(/[\r\n]+/); // create a map of header names to values var headermap = {}; arr.foreach(function (line) { var parts = line.split(': '); var header = parts.shift(); var value = parts.join(': '); headermap[header] = value; }); } } once this is done, you can, for example: var contenttype = headermap["content-type"]; this obtains the value of the content-ty...
XRWebGLLayer.getViewport() - Web APIs
since the framebuffer is split in half, one half for each eye, setting the webgl viewport to match the webxr layer's viewport will ensure that when rendering the scene for the current eye's pose, it is rendered into the correct half of the framebuffer.
Web APIs
WebAPI
lue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry custome...
An overview of accessible web applications and widgets - Accessibility
the aria specification is split up into three different types of attributes: roles, states, and properties.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
role_radiobutton [important] role_combobox [important] role_droplist [important] role_progressbar [important] role_dial role_hotkeyfield role_slider role_spinbutton role_diagram role_animation role_equation role_buttondropdown role_buttonmenu role_buttondropdowngrid role_whitespace role_pagetablist [important] role_clock role_splitbutton role_ipaddress role_nothing msaa object identifiers cheat sheet for information on what each object identifier does, see the msdn object identifiers constants page.
Detecting CSS animation support - CSS: Cascading Style Sheets
testing for css animation support this code will check to see if css animation support is available: var animation = false, animationstring = 'animation', keyframeprefix = '', domprefixes = 'webkit moz o ms khtml'.split(' '), pfx = '', elem = document.createelement('div'); if( elem.style.animationname !== undefined ) { animation = true; } if( animation === false ) { for( var i = 0; i < domprefixes.length; i++ ) { if( elem.style[ domprefixes[i] + 'animationname' ] !== undefined ) { pfx = domprefixes[ i ]; animationstring = pfx + 'animation'; keyframeprefix = '-' + pfx.tolowercas...
Border-image generator - CSS: Cascading Style Sheets
s://udn.realityripple.com/samples/2c/fa0192d18e.png'); togglegallery(); }; return { init: init, getscale : getscale, loadremoteimage: loadremoteimage }; })(); var guideline = function guideline(node) { var topic = node.getattribute('data-topic'); var axis = node.getattribute('data-axis'); this.node = node; this.topic = topic; this.axis = axis; this.info = topic.split('-')[1]; this.position = 0; this.value = 0; this.unit = 0; this.max = 0; this.pos = positions.indexof(this.info); guidelines[topic] = this; var relative_container = document.createelement('div'); var tooltip = document.createelement('div'); var tooltip2 = document.createelement('div'); tooltip.classname = 'tooltip'; tooltip.setattribute('data-info', this.info); toolti...
Border-radius generator - CSS: Cascading Style Sheets
e.log(p, v, (p - v ) / 2); preview_ui.style.left = (p - v) / 2 + "px" ; } var updatepreviewuiheight = function updatepreviewuiheight() { var p = subject.parentelement.clientheight; var v = preview_ui.clientheight; console.log(p, v, (p - v ) / 2); preview_ui.style.top = (p - v) / 2 + "px" ; } var updateoutput = function updateoutput(corner, radius) { var values = radius.split(" "); borders1[corner] = values[0]; borders2[corner] = values[0]; if (values.length === 2) borders2[corner] = values[1]; var border_1_value = borders1.join(" "); var border_2_value = borders2.join(" "); var border_radius = 'border-radius: ' + border_1_value; if (border_2_value !== border_1_value) border_radius += ' / ' + border_2_value; border_radius += ';'; ...
Box-shadow generator - CSS: Cascading Style Sheets
prop.appendchild(name); prop.appendchild(value); classes[topic].node.appendchild(prop); classes[topic].line[property] = prop; classes[topic].prop[property] = value; } var outputclass = function outputclass(node) { var topic = node.getattribute('data-topic'); var prop = node.getattribute('data-prop'); var name = node.getattribute('data-name'); var properties = prop.split(' '); classes[topic] = {}; classes[topic].node = node; classes[topic].prop = []; classes[topic].line = []; classes[topic].button = new button(topic); var open_decl = document.createelement('div'); var end_decl = document.createelement('div'); open_decl.textcontent = name + ' {'; end_decl.textcontent = '}'; node.appendchild(open_decl); for (var i in properties)...
Basic Concepts of Multicol - CSS: Cascading Style Sheets
the content, including the children of .container is then split between the three columns.
Variable fonts guide - CSS: Cascading Style Sheets
you may also find that some variable fonts come split into two files: one for uprights and all their variations, and one containing the italic variations.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
the available space is split into four.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
this means that the available space in the container is split into 6 and assigned in proportion to our three tracks – one part each to the side columns and 4 parts to the center.
Inline formatting context - CSS: Cascading Style Sheets
when an inline box is split, margins, borders, and padding have no visual effect where the split occurs.
CSS Layout cookbook - CSS: Cascading Style Sheets
css grid, flexbox split navigation a navigation pattern where some links are visually separated from the others.
Paged media - CSS: Cascading Style Sheets
paged media properties control the presentation of content for print or any other media that splits content into discrete pages.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
splitter firefox removed in firefox 64.
column-count - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> | auto examples splitting a paragraph across three columns html <p class="content-box"> this is a bunch of text split into three columns using the css `column-count` property.
column-fill - CSS: Cascading Style Sheets
formal definition initial valuebalanceapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | balance | balance-all examples splitting text evenly across columns html <p class="content-box"> this is a bunch of text split into multiple columns.
column-rule-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples setting a blue column rule html <p>this is a bunch of text split into three columns.
column-rule-style - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-style'> examples setting a dashed column rule html <p>this is a bunch of text split into three columns.
column-rule-width - CSS: Cascading Style Sheets
formal definition initial valuemediumapplies tomulticol elementsinheritednocomputed valuethe absolute length; 0 if the column-rule-style is none or hiddenanimation typea length formal syntax <'border-width'> examples setting a thick column rule html <p>this is a bunch of text split into three columns.
column-rule - CSS: Cascading Style Sheets
| <'column-rule-style'> | <'column-rule-color'> examples example 1 /* same as "medium dotted currentcolor" */ p.foo { column-rule: dotted; } /* same as "medium solid blue" */ p.bar { column-rule: solid blue; } /* same as "8px solid currentcolor" */ p.baz { column-rule: solid 8px; } p.abc { column-rule: thick inset blue; } example 2 html <p class="content-box"> this is a bunch of text split into three columns.
columns - CSS: Cascading Style Sheets
WebCSScolumns
boxesinheritednocomputed valueas each of the properties of the shorthand:column-width: the absolute length, zero or largercolumn-count: as specifiedanimation typeas each of the properties of the shorthand:column-width: a lengthcolumn-count: an integer formal syntax <'column-width'> | <'column-count'> examples setting three equal columns html <p class="content-box"> this is a bunch of text split into three columns using the css `columns` property.
CSS: Cascading Style Sheets
WebCSS
css first steps css (cascading style sheets) is used to style and layout web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
str:tokenize() - EXSLT
WebEXSLTstrtokenize
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
Strings (str) - EXSLT
WebEXSLTstr
str:concat()str:concat() returns a string containing all the string values in a node-set concatenated together.str:split()str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.str:tokenize()str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
EXSLT
functions str:concat() str:split() str:tokenize() ...
Audio and Video Delivery - Developer guides
dash also provides a number of profiles including simple ondemand profiles that no preprocessing and splitting up of media files.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
this can be split further into two parts, for phone numbers which have an exchange number and then a number within the exchange.
Inline elements - HTML: Hypertext Markup Language
the <p> element totally changes the layout of the text, splitting it into three segments: the text before the <p>, then the <p>'s text, and finally the text following the <p>.
Connection management in HTTP/1.x - HTTP
for example, instead of having all resources on the same domain, say www.example.com, it could split over several domains, www1.example.com, www2.example.com, www3.example.com.
Expressions and operators - JavaScript
of value the property contains: typeof document.lastmodified; // returns "string" typeof window.length; // returns "number" typeof math.ln2; // returns "number" for methods and functions, the typeof operator returns results as follows: typeof blur; // returns "function" typeof eval; // returns "function" typeof parseint; // returns "function" typeof shape.split; // returns "function" for predefined objects, the typeof operator returns results as follows: typeof date; // returns "function" typeof function; // returns "function" typeof math; // returns "object" typeof option; // returns "function" typeof string; // returns "function" void the void operator is used in either of the following ways: void (expression) void expression the ...
JavaScript modules - JavaScript
it has therefore made sense in recent years to start thinking about providing mechanisms for splitting javascript programs up into separate modules that can be imported when needed.
Text formatting - JavaScript
split splits a string object into an array of strings by separating the string into substrings.
Date - JavaScript
irthday = new date('december 17, 1995 03:24:00') let birthday = new date('1995-12-17t03:24:00') let birthday = new date(1995, 11, 17) // the month is 0-indexed let birthday = new date(1995, 11, 17, 3, 24, 0) let birthday = new date(628021800000) // passing epoch timestamp to get date, month and year or time let [month, date, year] = ( new date() ).tolocaledatestring().split("/") let [hour, minute, second] = ( new date() ).tolocaletimestring().slice(0,7).split(":") two digit years map to 1900 – 1999 in order to create and get dates between the years 0 and 99 the date.prototype.setfullyear() and date.prototype.getfullyear() methods should be used.
FinalizationRegistry - JavaScript
garbage collection work can be split up over time using incremental and concurrent techniques.
JSON.parse() - JavaScript
// we split the second stage into 4 regexp operations in order to work around // crippling inefficiencies in ie's and safari's regexp engines.
String.fromCodePoint() - JavaScript
is required to correctly handle `nan` cases // the (codepoint>>>0) === codepoint clause handles decimals and negatives if (!(codepoint < 0x10ffff && (codepoint>>>0) === codepoint)) throw rangeerror("invalid code point: " + codepoint); if (codepoint <= 0xffff) { // bmp code point codelen = codeunits.push(codepoint); } else { // astral code point; split in surrogate halves // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae codepoint -= 0x10000; codelen = codeunits.push( (codepoint >> 10) + 0xd800, // highsurrogate (codepoint % 0x400) + 0xdc00 // lowsurrogate ); } if (codelen >= 0x3fff) { result += stringfromcharcode.apply(null, codeun...
String.prototype.normalize() - JavaScript
that's because "nfd" gives you the decomposed version of the canonical form, in which single code points are split into multiple combining ones.
String.prototype.substring() - JavaScript
a better method for replacing strings is as follows: function replacestring(olds, news, fulls) { return fulls.split(olds).join(news) } the code above serves as an example for substring operations.
String - JavaScript
string.prototype.split([sep [, limit] ]) returns an array of strings populated by splitting the calling string at occurences of the substring sep.
WeakRef - JavaScript
garbage collection work can be split up over time using incremental and concurrent techniques.
await - JavaScript
an await can split execution flow, allowing the caller of the await's function to resume execution before the deferred continuation of the await's function.
JavaScript typed arrays - JavaScript
buffers and views: typed array architecture to achieve maximum flexibility and efficiency, javascript typed arrays split the implementation into buffers and views.
Digital video concepts - Web media technologies
what those values are depends on how you "split up" the color when converting it to numeric form.
Animation performance and frame rate - Web Performance
one last step is not shown in this sequence: the page may be split into layers, which are painted independently and then combined in a process called "composition".
Web Performance
glossary terms beacon brotli compression client hints code splitting cssom domain sharding effective connection type first contentful paint first cpu idle first input delay first interactive first meaningful paint first paint http http/2 jank latency lazy load long task lossless compression lossy compression main thread minification network throttling packet page load time page prediction parse perceived performance prefetch prerende...
Progressive web app structure - Progressive web apps (PWAs)
the <body> is split into the <header> (containing linked image), <main> page (with title, description and place for a content), and <footer> (copy and links).
Mobile first - Progressive web apps (PWAs)
therefore, as well as splitting content into different views, and simplifying the interface and content on each view of your application for mobile as much as possible, it is also a good idea to not include visual effects such as shadows, animations, and gradients.
Structural overview of progressive web apps - Progressive web apps (PWAs)
the <body> is split into the <header> (which displays an image) and the body of the app, which is found inside a <main> element.
Introduction - SVG: Scalable Vector Graphics
it was dropped for the upcoming svg 2.0, which is under heavy development right now and follows a similar approach to css 3 in that it splits components into several loosely coupled specifications.
Tutorials
css first steps css (cascading style sheets) is used to style and lay out web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.