Search completed in 1.49 seconds.
832 results for "wrap":
Your results are loading. Please wait...
SubtleCrypto.unwrapKey() - Web APIs
the unwrapkey() method of the subtlecrypto interface "unwraps" a key.
... this means that it takes as its input a key that has been exported and then encrypted (also called "wrapped").
... but because unwrapkey() also decrypts the key to be imported, you also need to pass in the key that must be used to decrypt it.
...And 44 more matches
SubtleCrypto.wrapKey() - Web APIs
the wrapkey() method of the subtlecrypto interface "wraps" a key.
...wrapping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
... but because wrapkey() also encrypts the key to be imported, you also need to pass in the key that must be used to encrypt it.
...And 25 more matches
XPConnect wrappers
this document is a high-level overview of xpconnect wrapper objects (for the more technical description see xpconnect security membranes).
... for practical advice on dealing with wrappers, see safely accessing content dom from chrome.
... developers in the know understand that wrappers play a large role in xpconnect, and that we have a lot of them.
...And 18 more matches
JSExtendedClass.wrappedObject
this article covers features introduced in spidermonkey 1.8 callback for objects that wrap other objects.
... syntax typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which the object is being unwrapped.
... obj jsobject * the object to unwrap.
...And 14 more matches
wrappedJSObject
wrappedjsobject is a property sometimes available on xpconnect wrappers.
... when available, it lets you access the javascript object hidden by the wrapper.
... there are two kinds of xpconnect wrappers that support the wrappedjsobject property: xpcnativewrappers which are used to protect the chrome code working with content objects.
...And 13 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
there is however the ability to wrap flex items onto new lines, creating new rows if flex-direction is row and new columns if flex-direction is column.
... making things wrap the initial value of the flex-wrap property is nowrap.
...if you want to cause them to wrap once they become too wide you must add the flex-wrap property with a value of wrap, or use the shorthand flex-flow with values of row wrap or column wrap.
...And 10 more matches
overflow-wrap - CSS: Cascading Style Sheets
the overflow-wrap css property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
... note: in contrast to word-break, overflow-wrap will only create a break if an entire word cannot be placed on its own line without overflowing.
... the property was originally a nonstandard and unprefixed microsoft extension called word-wrap, and was implemented by most browsers with the same name.
...And 8 more matches
FC_UnwrapKey
name fc_unwrapkey - unwrap a key syntax ck_rv fc_unwrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hunwrappingkey, ck_byte_ptr pwrappedkey, ck_ulong uswrappedkeylen, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
...hunwrappingkey [in] handle of the ket to use for unwrapping.
... pwrappedkey [in] pointer to the wrapped key.
...And 7 more matches
-ms-wrap-flow - Archive of obsolete content
the -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact inline content within block-level elements.
... start inline flow content can wrap on the start edge of the exclusion area but must leave empty the area after the end edge of the exclusion area.
... end inline flow content can wrap after the end edge of the exclusion area but must leave empty the area before the start edge of the exclusion area.
...And 6 more matches
Cross Process Object Wrappers
this document describes cross process object wrappers (cpows), which enable chrome code to synchronously access content in multiprocess firefox.
...as a migration aid, the messaging framework enables frame scripts to make content objects available to chrome through a wrapper called a cross process object wrapper, also known as a cpow.
...the optional third parameter to each of these functions is an object whose properties are objects to wrap.
...And 6 more matches
mozIStorageStatementWrapper
the mozistoragestatementwrapper interface is a storage statement wrapper.
...you can then wrap that statement with a wrapper, which implements nsixpcscriptable and provides scriptable helpers letting you execute the statement as a function, access bind variables by name as properties, etc.
... storage/public/mozistoragestatementwrapper.idlscriptable please add a summary to this article.
...And 6 more matches
-ms-wrap-through - Archive of obsolete content
the -ms-wrap-through css property is a microsoft extension that specifies how content should wrap around an exclusion element.
... initial valuewrapapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values wrap the exclusion element inherits its parent node's wrapping context.
... its descendant inline content wraps around exclusions defined outside the element.
...And 5 more matches
Widget Wrappers
widget wrappers are objects that provide information about a widget.
... there are 'group' wrappers which provide information about the widget across all windows, and 'single' wrappers which provide information about a specific instance in a specific window.
... group wrapper methods forwindow() a method to obtain a single window wrapper for a widget, in the window awindow passed as the only argument.
...And 5 more matches
FC_WrapKey
name fc_wrapkey - wrap a key syntax ck_rv fc_wrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hwrappingkey, ck_object_handle hkey, ck_byte_ptr pwrappedkey, ck_ulong_ptr puswrappedkeylen ); parameters hsession [in] session handle.
...hwrappingkey [in] pointer to the public key template.
...pwrappedkey [out] pointer to the location to receive the wrapped key or null.
...And 5 more matches
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
the flex-wrap css property sets whether flex items are forced onto one line or can wrap onto multiple lines.
... if wrapping is allowed, it sets the direction that lines are stacked.
... syntax flex-wrap: nowrap; /* default value */ flex-wrap: wrap; flex-wrap: wrap-reverse; /* global values */ flex-wrap: inherit; flex-wrap: initial; flex-wrap: unset; the flex-wrap property is specified as a single keyword chosen from the list of values below.
...And 5 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
this section describes how to use the javascript wrapper for drag and drop.
... the javascript drag and drop wrapper the javascript wrapper to drag and drop simplifies the process by handling all of the xpcom interfaces for you.
...this function is necessary so that the wrapper can determine the best flavour to pass to the other functions.
...And 2 more matches
Wrapper - MDN Web Docs Glossary: Definitions of Web-related terms
in programming languages such as javascript, a wrapper is a function that is intended to call one or more other functions, sometimes purely for convenience, and sometimes adapting them to do a slightly different task in the process.
... for example, sdk libraries for aws are examples of wrappers.
... learn more general knowledge wrapper function on wikipedia ...
Grid wrapper - CSS: Cascading Style Sheets
the grid wrapper pattern is useful for aligning grid content within a central wrapper, while also allowing items to break out and align to the edge of the containing element or page when desired.
... requirements items placed on the grid should be able to align to a horizontally-centered max-width wrapper and/or the outer edges of the grid.
...using a numeric unit (pixels, ems, rems) will create a fixed maximum size for the central wrapper, whereas using percentage values or viewport units will mean this wrapper grows or shrinks in response to its context.
wrap - Archive of obsolete content
ArchiveMozillaXULAttributewrap
« xul reference home wrap type: string set this attribute to the value off to disable word wrapping in the textbox.
... if this attribute is not specified, word wrapping is enabled.
-ms-wrap-margin - Archive of obsolete content
the -ms-wrap-margin css property is a microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes.
... remarks offsets created by the -ms-wrap-margin property are offset from the outside of the exclusion.
Components.utils.isXrayWrapper
syntax boolean components.utils.isxraywrapper(obj); parameters obj the object to check.
...example var isxray = components.utils.isxraywrapper(gbrowser.contentwindow); // true var waived = components.utils.waivexrays(gbrowser.contentwindow); isxray = components.utils.isxraywrapper(waived); // false ...
nsIAuthPromptWrapper
the nsiauthpromptwrapper interface is an override of nsiauthprompt which performs some action on the data going through nsiauthprompt methods.
... embedding/components/windowwatcher/public/nsiauthpromptwrapper.idlscriptable please add a summary to this article.
wraparound - Archive of obsolete content
« xul reference home wraparound type: boolean if true, the value of the number box will wrap around when the maximum or minimum value is exceeded.
wrapAround - Archive of obsolete content
« xul reference wraparound type: boolean gets and sets the value of the wraparound attribute.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
<prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end...
nsIXPConnect
void clearallwrappednativesecuritypolicies(); nsixpconnectjsobjectholder createsandbox(in jscontextptr cx, in nsiprincipal principal); native code only!
... void flagsystemfilenameprefix(in string afilenameprefix, in prbool awantnativewrappers); void garbagecollect(); [noscript,notxpcom] void getcaller(out jscontextptr ajscontext, out jsobjectptr aobject); jsval getcowforobject(in jscontextptr ajscontext, in jsobjectptr aparent, in jsobjectptr awrappedobj); native code only!
... obsolete since gecko 2.0 void getdefaultsecuritymanager(out nsixpcsecuritymanager amanager, out pruint16 flags); nsixpcfunctionthistranslator getfunctionthistranslator(in nsiidref aiid); jsobjectptr getjsobjectofwrapper(in jscontextptr ajscontext, in jsobjectptr ajsobj); [noscript, notxpcom] nsisupports getnativeofwrapper(in jscontextptr ajscontext, in jsobjectptr ajsobj); void getsecuritymanagerforjscontext(in jscontextptr ajscontext, out nsixpcsecuritymanager amanager, out pruint16 flags); nsixpconnectwrappednative getwrappednativeofjsobject(in jscontextptr ajscontext, in jsobjectptr ajsobj); nsixpconnectwrappednative getwrappednativeofnativeobject(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in ...
...And 59 more matches
nss tech note5
ot, may not be optimal */ prepare the key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if generating the key - see section generate a symmetric key <big>prepare the parameter for crypto context.
...ot, may not be optimal */ prepare the key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, digestmech, pk11_originunwrap, cka_digest, &keyitem, null); if generating the key - see section generate a symmetric key.
...pare the key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.type = sibuffer; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, hmacmech, pk11_originunwrap, cka_sign, &keyitem, null); if generating the key - see section generate a symmetric key.
...And 41 more matches
LiveConnect Overview - Archive of obsolete content
working with wrappers in javascript, a wrapper is an object of the target language data type that encloses an object of the source language.
... when programming in javascript, you can use a wrapper object to access methods and fields of the java object; calling a method or accessing a property on the wrapper results in a call on the java object.
... on the java side, javascript objects are wrapped in an instance of the class netscape.javascript.jsobject and passed to java.
...And 31 more matches
NSS Sample Code Sample1
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrapping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
... as an alternative to token symmetric keys as a way to store large numbers of symmetric keys wrapping symmetric keys using an rsa key from another server unwrapping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair.
...the primary host wraps the newly generated key using the // rsa key and stores the wrapped key data in a local file.
...And 25 more matches
WebIDL bindings
adding webidl bindings to a class to add a webidl binding for interface myinterface to a class mozilla::dom::myinterface that's supposed to implement that interface, you need to do the following: if your interface doesn't inherit from any other interfaces, inherit from nswrappercache and hook up the class to the cycle collector so it will trace the wrapper cache properly.
...if you also inherit from nsisupports, make sure the nsisupports comes before the nswrappercache in your list of parent classes.
...if you do, change to using // ns_impl_cycle_collection_wrappercache.
...And 23 more matches
Enc Dec MAC Output Public Key as CSR
/* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define default_key_bits 1024 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac---...
... (-0x2000) #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif #endif /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -s -r -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'g' for generating rsa keypair for wrapping\n\n", "g"); fprintf(stderr, "%-20s specify 'e' for encrypt operation\n\n", "e"); fprintf(stderr, "%-20s specify 'd' for decrypt operation\n\n", "d"); fprintf(stderr, "%-20s specify db directory path\n\n", "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p "); fprintf(stderr, "%-20s s...
...eader\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return encrypt; case 'd': return decrypt; default: return unknown; } } /* * wrap the symkey using public key */ secstatus wrapkey(pk11symkey* key, seckeypublickey *pubkey, secitem **wrappedkey) { secstatus rv; secitem *data = (secitem *)port_zalloc(sizeof(secitem)); if (!data) { pr_fprintf(pr_stderr, "error while allocating memory\n"); rv = secfailure; goto cleanup; } data->len = seckey_publickeystrength(pubkey); data->data =...
...And 18 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
in this example, i have a containing div with a class of wrapper and, inside are five child elements.
... <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> i make the .wrapper a grid container.
... .wrapper { display: grid; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } all the direct children are now grid items.
...And 18 more matches
Floats - Learn web development
the background of floats the float property was introduced to allow web developers to implement simple layouts involving an image floating inside a column of text, with the text wrapping around the left or right of it.
...any content that comes below the floated element in the normal layout flow will now wrap around it, filling up the space to the right-hand side of it as far up as the top of the floated element.
... floating the content to the right has exactly the same effect, but in reverse — the floated element will stick to the right, and the content will wrap around it to the left.
...And 17 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
i have also set the flex-wrap property to wrap, so that if the space in the container becomes too narrow to maintain the flex basis, items will wrap onto a new row.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { width: 500px; display: flex; flex-wrap: wrap; } .wrapper > div { flex: 1 1 150px; } in the image, you can see that two items have wrapped onto a new line.
...this is because when you wrap flex items, each new row (or column when working by column) becomes a new flex container.
...And 17 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three...
...to cause all created rows to be 100 pixels tall for example you would use: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; ...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four <br>this cell <br>has extra <br>content.
...And 16 more matches
Avoiding leaks in JavaScript XPCOM components
it allows javascript code to access xpcom objects (i.e., it wraps native xpcom objects for javascript) and it allows javascript code to implement xpcom interfaces (i.e., it wraps javascript objects for xpcom).
...(the implementation is slightly more complicated, but only to optimize for speed and reduce creation and destruction of wrapper objects.) the wrapper object is reference counted, and as long as it exists, it makes the javascript object that it wraps be one of the roots used by the javascript garbage collector's mark phase.
... one might think that the wrappers of native xpcom objects (to allow them to be used from javascript) would just work the other way around.
...And 15 more matches
Multiprocess on Windows
interceptors are, essentially, wrapper objects which implement the same interfaces as the object that they are wrapping.
...our callback implementation forwards the method call to the main thread in order to invoke the method on the wrapped object.
... the interceptor is also aware that any outparams, which contain interfaces, must also be wrapped with interceptors of their own.
...And 14 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
i can use the align-items property on the grid container, to align the items using one of the following values: auto normal start end center stretch baseline first baseline last baseline * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(8, 1fr); grid-gap: 10px; grid-auto-rows: 100px; grid-template-areas: "a a a a b b b b" ...
... "a a a a b b b b" "c c c c d d d d" "c c c c d d d d"; align-items: start; } .item1 { grid-area: a; } .item2 { grid-area: b; } .item3 { grid-area: c; } .item4 { grid-area: d; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> </div> keep in mind that once you set align-items: start, the height of each child <div> will be determined by the contents of the <div>.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(8, 1fr); grid-gap: 10px; grid-auto-rows: 100px; grid-template-areas: "a a a a b b b b" ...
...And 13 more matches
Index
MozillaTechXPCOMIndex
the result is structured cloned back to the original context, unless it is native (for example, if it returns a dom node, this is not structured cloned, because the original context will see that through an xraywrapper already), so it's guaranteed to behave predictably.
... 42 components.utils.isxraywrapper when privileged javascript in gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways.
... 43 components.utils.makeobjectpropsnormal add-ons, developing mozilla, extensions, javascript, needstechnicalreview, xpcom:language bindings, xpconnect ensures that the specified object's methods are all in the object's scope, and aren't cross-component wrappers.
...And 12 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } when defining the grid, i name my lines inside square brackets.
... .wrapper { display: grid; grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end] 1fr [main-end]; grid-template-rows: [main-start] 100px [content-start] 100px [content-end] 100px [main-end]; } once the lines have names, we can use the name to place the item rather than the line number.
...box1 { grid-column-start: main-start; grid-row-start: main-start; grid-row-end: main-end; } .box2 { grid-column-start: content-end; grid-row-start: main-start; grid-row-end: content-end; } .box3 { grid-column-start: content-start; grid-row-start: main-start; } .box4 { grid-column-start: content-start; grid-column-end: main-end; grid-row-start: content-end; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> </div> everything else about line-based placement still works in the same way and you can mix named lines and line numbers.
...And 12 more matches
lang/functional - Archive of obsolete content
{ method } = require("sdk/lang/functional"); let mynumber = { times: method(times), add: method(add), number: 0 }; function times (target, x) { return target.number *= x; } function add (target, x) { return target.number += x; } console.log(mynumber.number); // 0 mynumber.add(10); // 10 mynumber.times(2); // 20 mynumber.add(3); // 23 parameters lambda : function the function to be wrapped and returned.
... returns function : the wrapped lambda.
... defer(fn) takes a function and returns a wrapped version of the function.
...And 11 more matches
Venkman Internals - Archive of obsolete content
scriptwrapper newsgroup, 2002, rgrinda here is a bit more information about how venkman tracks files and functions...
... a scriptwrapper is a pure js object defined only inside venkman.
... as you pointed out, there is a 1:1 relationship between scriptwrappers and functions.
...And 10 more matches
nsIXPCScriptable
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void precreate(in nsisupports nativeobj, in jscontextptr cx, in jsobjectptr globalobj, out jsobjectptr parentobj); void create(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); void postcreate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool addproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool delproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in...
... jsvalptr vp); prbool getproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool setproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool enumerate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool newenumerate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 enum_op, in jsvalptr statep, out jsid idp); prbool newresolve(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32 flags, out jsobjectptr objp); prbool convert(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 type, in jsvalptr...
... vp); void finalize(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool checkaccess(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32 mode, in jsvalptr vp); prbool call(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 argc, in jsvalptr argv, in jsvalptr vp); prbool construct(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 argc, in jsvalptr argv, in jsvalptr vp); prbool hasinstance(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval val, out prbool bp); void trace(in nsixpconnectwrappednative wrapper, in jstracerptr trc, in jsobjectptr obj); prbool equality(in nsixpconnectwrapped...
...And 10 more matches
Script security
when code from compartment a tries to access an object in compartment b, gecko gives it a cross-compartment wrapper.
...therefore there's no need for any security checks, there are no wrappers, and there is no performance overhead for the common case of objects in a single window interacting with each other.
... whenever cross-compartment access happens, the wrappers enable us to implement the appropriate security policy.
...And 9 more matches
NSS API Guidelines
the layering section explains how the nss code is layered, and how higher-level functions wrap low-level functions.
...pkcs #11 is only exported through the wrappers.
... 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.
...And 9 more matches
nsIPromptService
you need to wrap them in a temporary object, which can be either empty or have a value property set to the out parameter type.
...if you call this method from javascript you need to wrap this argument in an object with its 'value' property set to a boolean (or use an empty object).
...if you call this method from javascript you need to wrap this argument in an object with its 'value' property set to a boolean (or use an empty object).
...And 9 more matches
Basic concepts of flexbox - CSS: Cascading Style Sheets
the flex-wrap property is set to nowrap.
...if there are more items than can fit in the container, they will not wrap but will instead overflow.
... multi-line flex containers with flex-wrap while flexbox is a one dimensional model, it is possible to cause our flex items to wrap onto multiple lines.
...And 9 more matches
CustomizableUI.jsm
l); void unregisterarea(aareaid, adestroyplacements); void addwidgettoarea(awidgetid, aareaid, [optional] aposition); void removewidgetfromarea(awidgetid); void movewidgetwithinarea(awidgetid, aposition); void ensurewidgetplacedinwindow(awidgetid, awindow); void beginbatchupdate(); void endbatchupdate(aforcedirty); widgetgroupwrapper createwidget(awidgetspecification); void destroywidget(awidgetid); widgetgroupwrapper getwidget(awidgetid); array getunusedwidgets(awindow); array getwidgetidsinarea(aareaid); array getwidgetsinarea(aareaid); string getareatype(aareaid); domelement getcustomizetargetforarea(aareaid, awindow); void reset(); void un...
...typically, you would do this using a try...finally block wrapped around your insertion code.
... parameters aproperties the specification for the widget return value a wrapper around the created widget.
...And 8 more matches
Grid template areas - CSS: Cascading Style Sheets
.wrapper { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-rows: minmax(100px, auto); grid-template-areas: "hd hd hd hd hd hd hd hd hd" "sd sd sd main main main main main main" "ft ft ft ft ft ft ft ft ft"; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e...
...6; max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="header">header</div> <div class="sidebar">sidebar</div> <div class="content">content</div> <div class="footer">footer</div> </div> using this method we do not need to specify anything at all on the individual grid items, everything happens on our grid container.
... .header { grid-area: hd; } .footer { grid-area: ft; } .content { grid-area: main; } .sidebar { grid-area: sd; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-rows: minmax(100px, auto); ...
...And 8 more matches
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } <div class="wrapper"> <div class="box1">...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> ...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> ...
...And 8 more matches
Content Processes - Archive of obsolete content
recall that the window object inside the sandbox is actually a wrapper to the real object.
...this is where xray wrappers come in.
... xray wrappers automatically wrap native objects like the window object, and only exposes their native properties, even if they have been overridden on the wrapped object.
...And 7 more matches
Index - Archive of obsolete content
175 boxes code snippets make the box style="display: block" and the wrapping behavior will occur when the box is resized: 176 canvas code snippets canvas, code snippets, graphics no summary!
... 427 drag and drop javascript wrapper xul no summary!
... 1150 wrap xul attributes, xul reference no summary!
...And 7 more matches
HTML basics - Learn web development
html consists of a series of elements, which you use to enclose, or wrap, different parts of the content to make it appear a certain way, or act a certain way.
... the main parts of our element are as follows: the opening tag: this consists of the name of the element (in this case, p), wrapped in opening and closing angle brackets.
... the attribute value wrapped by opening and closing quotation marks.
...And 7 more matches
Getting started with HTML - Learn web development
html consists of a series of elements, which you use to enclose, wrap, or mark up different parts of content to make it appear or act in a certain way.
... anatomy of an html element let's further explore our paragraph element from the previous section: the anatomy of our element is: the opening tag: this consists of the name of the element (in this example, p for paragraph), wrapped in opening and closing angle brackets.
... active learning: creating your first html element edit the line below in the input area by wrapping it with the tags <em> and </em>.
...And 7 more matches
Debugger.Object - Firefox Developer Tools
(in firefox terminology, privileged code sees the element through an “xray wrapper”.) to ensure that debugger code sees each object just as the debuggee would, each debugger.object instance presents its referent as it would be seen from a particular compartment.
...this accessor may throw if the referent is a scripted proxy or some other sort of exotic object (an opaque wrapper, for example).
...this does not unwrap cross-compartment wrappers: if the referent is a wrapper, the result refers to the wrapper’s global, not the wrapped object’s global.
...And 7 more matches
Index - Web APIs
WebAPIIndex
42 aescbcparams api, aescbcparams, dictionary, reference, web crypto api the aescbcparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-cbc algorithm.
... 43 aesctrparams api, aesctrparams, dictionary, reference, web crypto api the aesctrparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-ctr algorithm.
... 44 aesgcmparams api, aesgcmparams, dictionary, reference, web crypto api the aesgcmparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-gcm algorithm.
...And 7 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
.wrapper > p { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; margin: 1em; color: #d9480f; max-width: 300px; } <div class="wrapper"> <p style="writing-mode: horizontal-tb">i have writing mode set to the default <code>horizontal-tb</code></p> <p style="writing-mode: vertical-rl">i have writing mode set to <code>vertical-rl</cod...
...it then moves onto the next line, creating a new row track, and fills in more items: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(2, 100px); grid-gap: 10px; } <div class="wrapper"> <d...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { writing-mode: vertical-lr; display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(2, 100px); grid-gap: 10px; }...
...And 7 more matches
Introduction to CSS layout - Learn web development
floats — applying a float value such as left can cause block level elements to wrap alongside one side of an element, like the way images sometimes have text floating around them in magazine layouts.
... the html markup below gives us a containing element, with a class of wrapper, inside which are three <div> elements.
... flexbox example 1 * {box-sizing: border-box;} .wrapper > div { border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } .wrapper { display: flex; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> </div> in addition to the above properties that can be applied to the flex container, there are properties that can be applied to the flex items.
...And 6 more matches
Leak-hunting strategies and tips
seeing a leaked globalwindowimpl, nsxulpdglobalobject, nsxbldocglobalobject, or nsxpcwrappedjs is a sign that there could be significant numbers of js objects leaked.) for example, start with bringing up the mail window and closing the window without doing anything.
...this can mean there will be xpconnect wrapper objects showing up as owning the leaked objects, but it doesn't mean it's xpconnect's fault (although that has been known to happen, it's rare).
... when a c++ object is exposed to javascript (the more common of the two), an xpcwrappednative object is created.
...And 6 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { max-width: 1024px; margin: 0 auto; font: 1.2em helvetica, arial, sans-serif; } .wrapper > * { border: 2px solid #f08c00; background-color: #ffec99; border-radius: 5px; padding: 10px; } nav ul { list-style: none; margin: 0; padding: 0; } <div class="wrapper"> <header class="main-he...
... .wrapper { display: grid; grid-gap: 20px; grid-template-areas: "header" "nav" "content" "sidebar" "ad" "footer"; } after setting up a mobile layout we will get this single column at all screen sizes, we can now add a media query and redefine our layout for the circumstance of having enough screen real estate to show two columns.
... @media (min-width: 500px) { .wrapper { grid-template-columns: 1fr 3fr; grid-template-areas: "header header" "nav nav" "sidebar content" "ad footer"; } nav ul { display: flex; justify-content: space-between; } } you can see the layout taking shape in the value of grid-template-areas.
...And 6 more matches
Label and description - Archive of obsolete content
to cause the text to wrap: ensure the long-running text is a text node child of <description/> or <label/> (i.e., do not specify the long-running text in the value attribute of these elements).
... the default style for these xul elements includes white-space: wrap;.
...text is permitted to wrap.
...And 5 more matches
JSException - Archive of obsolete content
method summary the netscape.javascript.jsexception class has the following methods: getwrappedexception instance method getwrappedexception.
... getwrappedexceptiontype instance method getwrappedexceptiontype returns the int mapping of the type of the wrappedexception object.
...the getwrappedexception method was not available.
...And 5 more matches
Legacy layout methods - Learn web development
<div class="wrapper"> <div class="row"> <div class="col">1</div> <div class="col">2</div> <div class="col">3</div> <div class="col">4</div> <div class="col">5</div> <div class="col">6</div> <div class="col">7</div> <div class="col">8</div> <div class="col">9</div> <div class="col">10</div> <div class="col">11</div> <div class="col">12</div> </div> <div class="...
... in the <style> element, add the following code, which gives the wrapper container a width of 980 pixels, with padding on the right hand side of 20 pixels.
... * { box-sizing: border-box; } body { width: 980px; margin: 0 auto; } .wrapper { padding-right: 20px; } now use the row container that is wrapped around each row of the grid to clear one row from another.
...And 5 more matches
Mozilla accessibility architecture
toolkit specific implementations should have "wrap" appended to the class name.
... for example, document specific code for each toolkit goes in nsdocaccessiblewrap: public nsdocaccessible.
...however, because this would have caused a lot of difficulty when implementing the accessibility cache, the code was moved in to the "wrap" classes in a source directory specific to each toolkit.
...And 5 more matches
nsIWebBrowserPersist
sist;1"] .createinstance(components.interfaces.nsiwebbrowserpersist); method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextrahe...
...implies wrap (except inside <pre>), since html wraps.
... encode_flags_raw 4 output without formatting or wrapping the content.
...And 5 more matches
Debugger.Object - Firefox Developer Tools
(in firefox terminology, privileged code sees the element through an "xray wrapper".) to ensure that debugger code sees each object just as the debuggee would, each debugger.object instance presents its referent as it would be seen from a particular compartment.
...this does not unwrap cross-compartment wrappers: if the referent is a wrapper, the result refers to the wrapper's global, not the wrapped object's global.
... the result refers to the global directly, not via a wrapper.
...And 5 more matches
Using textures in WebGL - Web APIs
turn off mips and set // wrapping to clamp to edge gl.texparameteri(gl.texture_2d, gl.texture_wrap_s, gl.clamp_to_edge); gl.texparameteri(gl.texture_2d, gl.texture_wrap_t, gl.clamp_to_edge); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); } }; image.src = url; return texture; } function ispowerof2(value) { return (value & (value - 1)) == 0; } the loadtexture() routine st...
...after that we setup filtering and wrapping for the texture based on whether or not the image we download was a power of 2 in both dimensions or not.
...their wrapping mode must also be set to clamp_to_edge.
...And 5 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
to create gaps between the cards, i use a margin on the items, and then a negative margin on the container: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 600px; margin: 0 auto; } .wrapper li { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper ul { overflow: hidden; margin: 0 -10px; padding: 0; list-style: none; } .wrapper li { float:...
... left; width: calc(33.333333% - 20px); margin: 0 10px 20px 10px; } <div class="wrapper"> <ul> <li class="card"><h2>one</h2> <p>we can use css grid to overwrite older methods.</p> </li> <li class="card"><h2>two</h2> <p>we can use css grid to overwrite older methods.</p> </li> <li class="card"><h2>three</h2> <p>we can use css grid to overwrite older methods.</p> </li> <li class="card"><h2>four</h2> <p>we can use css grid to overwrite older methods.</p> </li> <li class="card"><h2>five</h2> <p>we can use css grid to overwrite older methods.</p> </li> <li class="card"><h2>six</h2> <p>we can use css grid to overwrite older metho...
... @supports (display: grid) { .wrapper { /* do anything for grid supporting browsers here.
...And 5 more matches
platform/xpcom - Archive of obsolete content
in this example the helloworld component is available to javascript only, so we use the technique documented under the "using wrappedjsobject" section of how to build an xpcom component in javascript.
... var { class } = require('sdk/core/heritage'); var { unknown, factory } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome'); var contractid = '@me.org/helloworld'; // define a component var helloworld = class({ extends: unknown, get wrappedjsobject() this, hello: function() {return 'hello world';} }); // create and register the factory var factory = factory({ contract: contractid, component: helloworld }); // xpcom clients can retrieve and use this new // component in the normal way var wrapper = cc[contractid].createinstance(ci.nsisupports); var helloworld = wrapper.wrappedjsobject; console.log(helloworld.hello()); using class id you can specify a class id for the factory by setting the id option in the factory's constructor.
...here's the example above, rewritten to use class id instead of contract id for lookup: var { class } = require('sdk/core/heritage'); var { unknown, factory } = require('sdk/platform/xpcom'); var { cc, ci, components } = require('chrome'); // define a component var helloworld = class({ extends: unknown, get wrappedjsobject() this, hello: function() {return 'hello world';} }); // create and register the factory var factory = factory({ component: helloworld }); var id = factory.id; // retrieve the factory by class id var wrapper = components.classesbyid[id].createinstance(ci.nsisupports); var helloworld = wrapper.wrappedjsobject; console.log(helloworld.hello()); replacing factories if the factory ...
...And 4 more matches
Appendix D: Loading Scripts - Archive of obsolete content
under ordinary circumstances, native objects passed out of sandboxes are wrapped in xraywrapper objects, which means that only native properties of these objects are directly exposed to privileged code.
...this means that any and all javascript objects passed in our out of them are wrapped in inter-compartment proxy objects, which consume additional memory and add an extra layer of complexity to all property accesses and method calls.
...some known issues include: e4x xml objects cannot be wrapped for passage between compartments: bug 613142 there are a number of type detection issues, including: string.replace does not recognize regexp objects from foreign compartments: bug 633830 debugging: support for sandbox evaluation in development tools is uneven.
...And 4 more matches
The Box Model - Archive of obsolete content
descriptions may be longer, and in general you should plan it so that they can wrap into multiple lines.
... in order to have wrapping descriptions, you need to set the text as a child node instead of using the value attribute: <description>&xulschoolhello.description.label;</description> even then, the text will extend as much as it can in a single line, so you need to add some css limits in order to make it wrap inside a xul dialog or window.
... you can use the css property width to restrict the width of the description so that it wraps as you need it to.
...And 4 more matches
textbox - Archive of obsolete content
attributes cols, decimalplaces, disabled, emptytext, hidespinbuttons, increment, label, max, maxlength, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference, readonly, rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valuenumber, wraparound methods decrease, increase, reset, select, setselection...
...there are several attributes that allow the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.
... wrap type: string set this attribute to the value off to disable word wrapping in the textbox.
...And 4 more matches
Flexbox - Learn web development
wrapping one issue that arises when you have a fixed amount of width or height in your layout is that eventually your flexbox children will overflow their container, breaking the layout.
... have a look at our flexbox-wrap0.html example, and try viewing it live (take a local copy of this file now if you want to follow along with this example): here we see that the children are indeed breaking out of their container.
... one way in which you can fix this is to add the following declaration to your <section> rule: flex-wrap: wrap; also, add the following declaration to your <article> rule: flex: 200px; try this now; you'll see that the layout looks much better with this included: we now have multiple rows — as many flexbox children are fitted onto each row as makes sense, and any overflow is moved down to the next line.
...And 4 more matches
Mozilla DOM Hacking Guide
xpconnect will "wrap" the argument in a wrapper that will be of the type expected by our c++ function.
... similarly, then return type of the c++ function will be wrapped by xpconnect so that javascript can use it safely.
... static nsresult wrapnative(...): xpconnect fu, not our problem.
...And 4 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
multipart functions, such as bulk encryption, hashing, and mac functions (for example, c_digest and c_sign) and those that require overlapped operation (c_unwrap, c_decrypt) are handled by creating new sessions.
...for example, if the rsa slot unwraps a key, nss needs to move that key to a slot that can do the symmetric operations.
...nss will never try to pull private keys out of tokens (except as wrapped objects for pkcs #12).
...And 4 more matches
NSS functions
lot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength mxr 3.2 and later pk11_getbestslot mxr 3.2 and later pk11_getbestslotmultiple mxr 3.2 and later pk11_getbestwrapmechanism mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later ...
...k11_getsymkeynickname mxr 3.4 and later pk11_getsymkeytype mxr 3.9 and later pk11_getsymkeyuserdata mxr 3.11 and later pk11_gettokeninfo mxr 3.2 and later pk11_gettokenname mxr 3.2 and later pk11_getwindow mxr 3.2 and later pk11_getwrapkey mxr 3.2 and later pk11_hashbuf mxr 3.2 and later pk11_hasrootcerts mxr 3.4 and later pk11_importcert mxr 3.5 and later pk11_importcertforkeytoslot mxr 3.2 and later pk11_importcrl mxr 3.6 and later pk11_importdercert mxr ...
...henticationpath mxr 3.4 and later pk11_pubdecryptraw mxr 3.2 and later pk11_pubderive mxr 3.2 and later pk11_pubderivewithkdf mxr 3.9 and later pk11_pubencryptpkcs1 mxr 3.9.3 and later pk11_pubencryptraw mxr 3.2 and later pk11_pubunwrapsymkey mxr 3.2 and later pk11_pubunwrapsymkeywithflags mxr 3.6 and later pk11_pubunwrapsymkeywithflagsperm mxr 3.9 and later pk11_pubwrapsymkey mxr 3.2 and later pk11_randomupdate mxr 3.2 and later pk11_readrawattribute mxr 3.9.2 and later ...
...And 4 more matches
GCIntegration - SpiderMonkey Redirect 1
avoid having c++ objects that point to js objects (unless it's just to their own wrapper--that's okay).
... this should be obvious by now, but never ever allow a gc thing point to a gc thing in a different compartment unless it's a wrapper that's registered in the cross-compartment wrapper map.
...as a concrete example of this, imagine that we call getwrapper() on an nswrappercache instance.
...And 4 more matches
Index
103 jsextendedclass.wrappedobject jsapi reference, obsolete, spidermonkey if a class has the jsclass_is_extended bit set in its jsclass.flags and has a non-null jsextendedclass.wrappedobject, then objects of that class may be wrappers.
... in a few cases the javascript engine will pretend the wrapper isn't there, instead operating on the object it wraps.
... in these cases the engine calls the jsextendedclass.wrappedobject callback to get the wrapped object.
...And 4 more matches
Places utilities for JavaScript
lean nodeisdynamiccontainer(nsinavhistoryresultnode anode); boolean nodeislivemarkcontainer(nsinavhistoryresultnode anode); obsolete since gecko 21 boolean nodeislivemarkitem(nsinavhistoryresultnode anode); obsolete since gecko 21 boolean isreadonlyfolder(nsinavhistoryresultnode anode); int getindexofnode(nsinavhistoryresultnode anode); string wrapnode(nsinavhistoryresultnode anode, string atype, nsiuri aoverrideuri); array unwrapnodes(string blob, string atype); nsitransaction maketransaction(string data, string type, nsinavhistoryresultnode container, int index, boolean copy); nsinavhistoryresult getfoldercontents(int afolderid, boolean aexcludeitems, boolean aexpandqueries); boolean showaddbookmarkui(n...
... wrapnode() string-wraps a result node according to the rules of the specified content type.
... string wrapnode(anode, string atype, nsiuri aoverrideuri) parameters anode the result node to wrap (serialize) atype the content type to serialize as aoverrideurioptional used instead of the node's uri if provided.
...And 4 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
to create the root iaccessible for a window the first time it gets the wm_getobject message in, nswindow.cpp first generates an internal event called ns_getaccessible, which is handled in presshell::handleeventinternal() via the creation of an nsdocaccessiblewrap for an inner window or nsrootaccessiblewrap for a top level window.
...all of the platform-specific classes have the word "wrap" appended to them.
... the wrap classes contain implementations and interfaces specific to msaa or atk.
...And 4 more matches
Overview of CSS Shapes - CSS: Cascading Style Sheets
you could for example float an item left, which would cause the text to wrap round the right and bottom of the item in a rectangular fashion.
... if you then apply a circle shape, the text would then wrap round the line of the circle.
...the specification defines four <basic-shape> values, which are: inset() circle() ellipse() polygon() using the value inset() wraps text around a rectangular shape however you are able to add offset values, thus pulling the line boxes of any wrapping content closer to the object than would otherwise happen.
...And 4 more matches
white-space - CSS: Cascading Style Sheets
note: to make words break within themselves, use overflow-wrap, word-break, or hyphens instead.
... syntax /* keyword values */ white-space: normal; white-space: nowrap; white-space: pre; white-space: pre-wrap; white-space: pre-line; white-space: break-spaces; /* global values */ white-space: inherit; white-space: initial; white-space: unset; the white-space property is specified as a single keyword chosen from the list of values below.
... nowrap collapses white space as for normal, but suppresses line breaks (text wrapping) within the source.
...And 4 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
ns_block_shrink_wrap causes the block to "shrink-wrap" around its content.
...this is set by default for document, table cell inner, and absolutely positioned wrapper frames.
...this is set by default for document frames, area frames, table cell inner frames, absolutely positioned wrapper frames, and floated frames when the frame is created.
...And 3 more matches
Advanced text formatting - Learn web development
this is usually a feeling, thought or piece of additional background information description lists use a different wrapper than the other list types — <dl>; in addition each term is wrapped in a <dt> (description term) element, and each description is wrapped in a <dd> (description definition) element.
... blockquotes if a section of block level content (be it a paragraph, multiple paragraphs, a list, etc.) is quoted from somewhere else, you should wrap it inside a <blockquote> element to signify this, and include a url pointing to the source of the quote inside a cite attribute.
... wrap the title of each source in <cite> tags and turn each one into a link to that source.
...And 3 more matches
HTML text fundamentals - Learn web development
in html, each paragraph has to be wrapped in a <p> element, like so: <p>i am a paragraph, oh yes i am.</p> each heading has to be wrapped in a heading element: <h1>i am the title of the story.</h1> there are six heading elements: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.
... to style content with css, or make it do interesting things with javascript, you need to have elements wrapping the relevant content, so css/javascript can effectively target it.
...in this context the <h1> element is also a semantic element, which gives the text it wraps around the role (or meaning) of "a top level heading on your page." <h1>this is a top level heading</h1> by default, the browser will give it a large font size to make it look like a heading (although you could style it to look like anything you wanted using css).
...And 3 more matches
JavaScript-DOM Prototypes in Mozilla
prototype setup on an xpconnect wrapped dom node in mozilla when a dom node is accessed from javascript in mozilla, the native c++ dom node is wrapped using xpconnect and the wrapper is exposed to javascript as the javascript representation of the dom node.
... when xpconnect wraps a c++ object it will create a jsobject that is unique to this c++ object.
...all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
...And 3 more matches
Cryptography functions
lot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength mxr 3.2 and later pk11_getbestslot mxr 3.2 and later pk11_getbestslotmultiple mxr 3.2 and later pk11_getbestwrapmechanism mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later ...
...k11_getsymkeynickname mxr 3.4 and later pk11_getsymkeytype mxr 3.9 and later pk11_getsymkeyuserdata mxr 3.11 and later pk11_gettokeninfo mxr 3.2 and later pk11_gettokenname mxr 3.2 and later pk11_getwindow mxr 3.2 and later pk11_getwrapkey mxr 3.2 and later pk11_hashbuf mxr 3.2 and later pk11_hasrootcerts mxr 3.4 and later pk11_importcert mxr 3.5 and later pk11_importcertforkeytoslot mxr 3.2 and later pk11_importcrl mxr 3.6 and later pk11_importdercert mxr ...
...henticationpath mxr 3.4 and later pk11_pubdecryptraw mxr 3.2 and later pk11_pubderive mxr 3.2 and later pk11_pubderivewithkdf mxr 3.9 and later pk11_pubencryptpkcs1 mxr 3.9.3 and later pk11_pubencryptraw mxr 3.2 and later pk11_pubunwrapsymkey mxr 3.2 and later pk11_pubunwrapsymkeywithflags mxr 3.6 and later pk11_pubunwrapsymkeywithflagsperm mxr 3.9 and later pk11_pubwrapsymkey mxr 3.2 and later pk11_randomupdate mxr 3.2 and later pk11_readrawattribute mxr 3.9.2 and later ...
...And 3 more matches
Web Replay
atomic variables can be handled by treating reads and writes as if they were wrapped by a lock acquire/release during recording.
... when a call or message is intercepted, the wrapped call/message is first performed normally and then it and its outputs are recorded in a data stream for the thread performing the call.
... during execution of the wrapped call/message, recording of any inner calls is suppressed, so that they are performed normally without affecting the recording.
...And 3 more matches
Working with windows in chrome code
you should be aware of xpcnativewrappers when working with untrusted content.
... with xpcnativewrappers turned on (which is the default in firefox 1.5+), your extension can safely access the dom of the content document, but not the content javascript.
... bypassing xpcnativewrapper to work with content javascript directly can lead to security problems.
...And 3 more matches
CryptoKey - Web APIs
WebAPICryptoKey
the cryptokey interface of the web crypto api represents a cryptographic key obtained from one of the subtlecrypto methods generatekey(), derivekey(), importkey(), or unwrapkey().
... cryptokey.extractable boolean indicating whether or not the key may be extracted using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
...exportkey() or wrapkey() will throw an exception if used to extract this key.
...And 3 more matches
Timing element visibility with the Intersection Observer API - Web APIs
we'll be using css grid to style and lay out the site, so we can be pretty straightforward here: <div class="wrapper"> <header> <h1>a fake blog</h1> <h2>showing intersection observer in action!</h2> </header> <aside> <nav> <ul> <li><a href="#link1">a link</a></li> <li><a href="#link2">another link</a></li> <li><a href="#link3">one more link</a></li> </ul> </nav> </aside> <main> </main> </div> this is the framework for the entire site.
... body { font-family: "open sans", "arial", "helvetica", sans-serif; background-color: aliceblue; } .wrapper { display: grid; grid-template-columns: auto minmax(min-content, 1fr); grid-template-rows: auto minmax(min-content, 1fr); max-width: 700px; margin: 0 auto; background-color: aliceblue; } the site's <body> is configured here to use one of a number of common sans-serif fonts, and to use "aliceblue" as the background color.
... then the "wrapper" class is defined; it wraps the entire blog, including the header, sidebar, and body content (articles and ads).
...And 3 more matches
SubtleCrypto - Web APIs
subtlecrypto.wrapkey() returns a promise that fulfills with a wrapped symmetric key for usage (transfer and storage) in insecure environments.
... the wrapped key matches the format specified in the given parameters, and wrapping is done by the given wrapping key, using the specified algorithm.
... subtlecrypto.unwrapkey() returns a promise that fulfills with a cryptokey corresponding to the wrapped key given in the parameter.
...And 3 more matches
WebGL constants - Web APIs
should return keep, replace, incr, decr, invert, incr_wrap, or decr_wrap.
...should return keep, replace, incr, decr, invert, incr_wrap, or decr_wrap.
...should return keep, replace, incr, decr, invert, incr_wrap, or decr_wrap.
...And 3 more matches
JavaScript Client API - Archive of obsolete content
const cu = components.utils; cu.import("resource://services-sync/engines.js"); cu.import("resource://services-sync/record.js"); cu.import("resource://services-sync/util.js"); the record object the record object is a wrapper around a single instance of whatever data it is that you are syncing -- a single bookmark, history url, password or form data entry.
...but, you want to use a derived class, cryptowrapper, which seamlessly encrypts and decrypts records on the client.
...all you have to do is write an object that extends cryptowrapper and maintains a property called cleartext.
...And 2 more matches
3D collision detection - Game development
this consists of wrapping game entities in a non-rotated (thus axis-aligned) box and checking the positions of these boxes in the 3d coordinate space to see if they are overlapping.
...if you have entities that will be rotating, you can either modify the dimensions of the bounding box so it still wraps the object, or opt to use another bounding geometry type, such as spheres (which are invariant to rotation.) the animated gif below shows a graphic example of an aabb that adapts its size to fit the rotating entity.
...the main advantage of spheres is that they are invariant to rotation, so if the wrapped entity rotates, the bounding sphere would still be the same.
...And 2 more matches
Positioning - Learn web development
overflowing inline elements <span>wrap onto a new line if possible — like this one containing text</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> body { width: 500px; margin: 0 auto; } p { background: aqua; border: 3px solid blue; padding: 10px; margin: 10px; } span { background: red; border: 1px solid black; } .pos...
...overflowing inline elements <span>wrap onto a new line if possible — like this one containing text</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> body { width: 500px; margin: 0 auto; } p { background: aqua; border: 3px solid blue; padding: 10px; margin: 10px; } span { background: red; border: 1px solid black; } .pos...
...overflowing inline elements <span>wrap onto a new line if possible — like this one containing text</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> body { width: 500px; margin: 0 auto; position: relative; } p { background: aqua; border: 3px solid blue; padding: 10px; margin: 10px; } span { background: red; border: 1p...
...And 2 more matches
Chrome registration
component {09543782-22b1-4a0b-ba07-9134365776ee} maincomponent.js process=main component {98309951-ac89-4642-afea-7b2b6216bcef} contentcomponent.js process=content xpcnativewrappers chrome packages can decide whether to use the xpcnativewrapper security mechanism to automatically protect their code against malicious content that they might access.
...disabling it manually was possible by specifying xpcnativewrappers=no until firefox 4.
...you can no longer disable xpcnativewrappers.
...And 2 more matches
PromiseWorker.jsm
each special data argument that you want to transfer, you can wrap in a basepromiseworker.meta object.
...unlike when sending/transferring from the main thread, transferring from worker does not require each piece of data that you want transferred to be wrapped in its own meta object.
... instead, the whole return should be wrapped.
...And 2 more matches
DMD
you can do this by running: adb push $objdir/dist/bin/libdmd.so /sdcard/ second, you will need to make an executable wrapper for fennec which sets an environment variable before launching it.
...if you are not familiar with that method, you can ignore this parenthetical note.) first make the executable wrapper on your host machine using the editor of your choice.
...since you cannot mark files in /sdcard/ as executable, we will use /data/local/tmp for this purpose: adb push dmd_fennec /data/local/tmp adb shell cd /data/local/tmp chmod 755 dmd_fennec the final step is to make android use the above wrapper script while launching fennec, so that the environment variable is present when fennec starts up.
...And 2 more matches
Index
the usual minimum requirement is that private keys must be wrapped using a protective layer (such as password-based encryption).
...data described as pem is a base64 encoded presentation of der, usually wrapped between human readable begin/end lines.
... 170 enc dec mac output public key as csr generates encryption/mac keys and outputs public key as certificate signing request 171 enc dec mac using key wrap certreq pkcs10 csr generates encryption/mac keys and outputs public key as pkcs11 certificate signing request 172 encdecmac using token object - sample 3 encdecmac, html, ncc, ncc article, web, web development no summary!
...And 2 more matches
PKCS11 Implement
it uses a single session for all single-part rsa operations such as logging in, logging out, signing, verifying, generating keys, wrapping keys, and so on.
...rypt c_sign ckm_rsa_pkcs ckm_dsa c_sign ckm_rsa_pkcs ckm_dsa c_sign ckm_rsa_pkcs ckm_dsa c_sign ckm_rsa_pkcs ckm_dsa c_verify ckm_rsa_pkcs ckm_dsa c_verifyrecover ckm_rsa_pkcs c_generatekey c_generatekeypair (if token is read/write)c_generatekeypair (if token is read/write) c_generatekeypair (if token is read/write)c_generatekeypair (if token is read/write) c_wrapkey c_unwrapkey ckm_rsa_pkcs c_unwrapkey ckm_rsa_pkcs c_unwrapkey ckm_rsa_pkcs c_unwrapkey ckm_rsa_pkcs c_generaterandom c_save (when token runs out of sessions) c_restore (when token runs out of sessions) external key tokens need to support c_decrypt and c_sign.
...in addition to c_sign and c_generatekeypair, signing and decryption tokens should also support c_decrypt and, optionally, c_unwrapkey.
...And 2 more matches
GC Rooting Guide
js::handle<t> all gc thing pointers that are parameters to a function must be wrapped in js::handle<t>.
...} js::mutablehandle<t> all gc thing pointers that are used as out-parameters must be wrapped in a js::mutablehandle<t>.
... these do not need to be wrapped in any of rooting classes, but they should be immediately used to initialize a js::rooted<t> if there is any code that could gc before the end of the containing function; a raw pointer must never be stored on the stack during a gc.
...And 2 more matches
JSExtendedClass
syntax struct jsextendedclass { jsclass base; jsequalityop equality; jsobjectop outerobject; jsobjectop innerobject; jsiteratorop iteratorobject;// added in spidermonkey 1.8 jsobjectop wrappedobject; // added in spidermonkey 1.8 ...and additional reserved fields.
... wrappedobject jsobjectop added in spidermonkey 1.8 optional.
... if non-null, an object of this class may serve as a wrapper for another object.
...And 2 more matches
Shell global objects
unwrappedobjectshavesameshape(obj1, obj2) returns true iff obj1 and obj2 have the same shape, false otherwise.
... both objects are unwrapped first, so this can be used on objects from different globals.
... wrapwithproto(obj) wrap an object into a noop wrapper with prototype semantics.
...And 2 more matches
XPCOM changes in Gecko 2.0
xpcnativewrapper changes you can't disable xpcnativewrappers from your manifest specifying xpcnativewrappers=no in your manifest (that is, xpcnativewrapper automation) is no longer supported.
... this was always intended to be a short-term workaround to allow extensions to continue to work while their authors updated their code to use xpcnativewrappers.
... if your add-on depends upon xbl bindings attached to content objects—for example, the ability to call functions or get and set properties created by the xbl binding—you will need to use the xpcnativewrapper property wrappedjsobject to access wrapped objects.
...And 2 more matches
Detailed XPCOM hashtable guide
nsthashtable - low-level c++ wrapper around pldhash; generates callback functions and handles most casting automagically.
... nsdatahashtable/nsinterfacehashtable/nsclasshashtable - high-level c++ wrappers around pldhash; simplifies the common usage pattern mapping a simple keytype to a simple datatype; client does not need to declare or manage an entry class; nsdatahashtable datatype is a scalar such as pruint32; nsinterfacehashtable datatype is an interface; nsclasshashtable datatype is a class pointer owned by the hashtable.
...the c++ wrappers for pldhash (see below) are often much easier and safer to use in c++ code, as many potential casting errors are easily avoided.
...And 2 more matches
Components.utils
isxraywrapper() test whether a given object is an xray or not.
... isdeadwrapper() determines whether this object is backed by a deadobjectproxy.
...serves the same purpose as xpcnativewrapper.
...And 2 more matches
Components.utils.waiveXrays
waives xray vision for an object, giving the caller a transparent wrapper to the underlying object.
...the result of waivexrays is just like the wrappedjsobject property for xrayed objects, but it's more useful because you can call it on primitives or objects that aren't xrays, in which case it just returns the argument you passed in.
... returns if the argument obj is an xray, this function returns a wrapper that transitively waives xray behavior on the underlying object and anything that comes off the object.
...And 2 more matches
nsIAuthModule
herits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void getnexttoken([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void init(in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword); void unwrap([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void wrap([const] in voidptr aintoken, in unsigned long aintokenlength, in boolean confidential, out voidptr aouttoken, out unsigned long aouttokenlength); constants constant value description req_default 0 default behavior.
... unwrap() this method is used to unpack, decrypt, and verify the checksums on data returned by a server when security layers are in use.
... void unwrap( [const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength ); parameters aintoken a buffer containing the data received from the server.
...And 2 more matches
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit browsers without flex wrapping) final standards syntax (ff, safari, chrome, ie11+, edge, opera) this was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
...-moz-box-direction: reverse; -moz-box-orient: vertical; } @else { -webkit-box-direction: normal; -webkit-box-orient: horizontal; -moz-box-direction: normal; -moz-box-orient: horizontal; } -webkit-flex-direction: $value; -ms-flex-direction: $value; flex-direction: $value; } // shorter version: @mixin flex-dir($args...) { @include flex-direction($args...); } flexbox wrap the flex-wrap property controls whether the flex container is single-lined or multi-lined and the direction of the cross-axis, which determines the direction in which the new lines are stacked in.
... values: nowrap (default) | wrap | wrap-reverse spec: https://drafts.csswg.org/css-flexbox/#flex-wrap-property @mixin flex-wrap($value: nowrap) { // no webkit/ff box fallback.
...And 2 more matches
Visual formatting model - CSS: Cascading Style Sheets
the part of the string before the paragraph element is wrapped in an anonymous box, then we have the <p>, which generates a box, and then another anonymous box.
... 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.
...And 2 more matches
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
the flex-flow css shorthand property specifies the direction of a flex container, as well as its wrapping behavior.
... constituent properties this property is a shorthand for the following css properties: flex-direction flex-wrap syntax /* flex-flow: <'flex-direction'> */ flex-flow: row; flex-flow: row-reverse; flex-flow: column; flex-flow: column-reverse; /* flex-flow: <'flex-wrap'> */ flex-flow: nowrap; flex-flow: wrap; flex-flow: wrap-reverse; /* flex-flow: <'flex-direction'> and <'flex-wrap'> */ flex-flow: row nowrap; flex-flow: column wrap; flex-flow: column-reverse wrap-reverse; /* global values */ flex-flow: inherit; flex-flow: initial; flex-flow: unset; values see...
... flex-direction and flex-wrap for details on the values.
...And 2 more matches
line-break - CSS: Cascading Style Sheets
anywhere there is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white spaces, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the gl, wj, or zwj character class or mandated by the word-break property.
... the different wrapping opportunities must not be prioritized.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | loose | normal | strict | anywhere examples setting text wrapping see whether the text is wrapped before "々", "ぁ" and "。".
...And 2 more matches
JavaScript modules - JavaScript
the modules directory's two modules are described below: canvas.js — contains functions related to setting up the canvas: create() — creates a canvas with a specified width and height inside a wrapper <div> with a specified id, which is itself appended inside a specified parent element.
... returns an object containing the canvas's 2d context and the wrapper's id.
... createreportlist() — creates an unordered list appended inside a specified wrapper element, which can be used to output report data into.
...And 2 more matches
String - JavaScript
in contexts where a method is to be invoked on a primitive string or a property lookup occurs, javascript will automatically wrap the string primitive and call the method or perform the property lookup.
...rather than having lines that go on endlessly, or wrap at the whim of your editor, you may wish to specifically break the string into multiple lines in the source code without affecting the actual string contents.
... method 1 you can use the + operator to append multiple strings together, like this: let longstring = "this is a very long string which needs " + "to wrap across multiple lines because " + "otherwise my code is unreadable." method 2 you can use the backslash character (\) at the end of each line to indicate that the string will continue on the next line.
...And 2 more matches
window/utils - Archive of obsolete content
this function wraps nsidomwindowutils.currentinnerwindowid.
...this function wraps nsidomwindowutils.outerwindowid.
... var { open } = require('sdk/window/utils'); var window = open('data:text/html,hello window'); this function wraps nsiwindowwatcher.openwindow.
...it wraps window.opendialog.
Appendix F: Monitoring DOM changes - Archive of obsolete content
monkey patching in many instances, especially when dealing with chrome code, the best way to modify actions which result in dom mutations is by wrapping the functions that trigger those changes.
... for instance, when you want to modify the result of dom mutations that you know are the result of the doawesomedomstuff() function, you can wrap it as follows: { let originaldoawesomedomstuff = doawesomedomstuff; doawesomedomstuff = function _doawesomedomstuff() { let res = originaldoawesomedomstuff.apply(this, arguments); doawesomerdomstuff(res, arguments); return res; }; } now, whenever doawesomedomstuff() is called, the original function will be called, followed by your own doawesomerdomstuff() function, which can then further modify the dom as needed.
... variations on this method include modifying the arguments passed to the wrapped function, modifying its return value, and making changes both before and after the original method is called.
... monkey patching dom methods when you are interested in changes to particular nodes, sometimes the best way is to wrap the dom methods of those elements, as in the monkey patching section above.
Notes on HTML Reflow - Archive of obsolete content
more than one frame may be needed to represent a single element from the content model; for example, text that wraps is broken into several frames, one per wrapped line.
...reflow may have the side-effect of creating new continuation frames, for example, for a text frame when the text must be wrapped.
...nsboxframe nsboxframe is an html frame that "wraps" a xul box.
...nsboxtoblockadaptor nsboxtoblockadaptor is a xul box that wraps an html block frame, used to convert changes in the box layout into html reflows.
JavaScript crypto - Archive of obsolete content
overview of the new cert issuing process user fills out enrollment form user action initiates script script calls key generation method (generatecrmfrequest) signing and encryption keys are generated encryption private key is wrapped with public key of key recovery authority (kra) (passed in in the form of a certificate as part of the script, and checked against a pre-installed certificate copy in the local certificate database) the public keys, wrapped encryption private key, and text string from the script (possibly containing naming or enrollment info) are signed by the user signed blob is returned to the script scri...
...pt submits signed blob and any other necessary info to the ca/ra ca/ra verifies signature on signed blob ca/ra validates identity of user ca/ra sends wrapped encryption private key to kra kra sends escrow verification back to ca ca creates and signs certificates ca sends certificates back to the user (importusercertificates) typical use the ca's enrollment page could look something like this: <!doctype html> <h2>request a cert</h2> <form name="reqform" method="post" action="http://your.ra.site.org"> <p><input type=hidden name=cert_request value=""> <p>name: <input type=text name=name value=""> <p>password: <input type=password name="password" value=""> <p><input type=submit name="send" value="submit"> </form> <script> /* the following values could be filled in by the server cgi */ va...
...if you choose to implement these flags, your module must supply the following additional functions for each flag: pkcs11_mech_flag: must support ckm_rsa_pkcs and ckm_rsa_x_509 and the following functions: c_wrapkey, c_encrypt, c_sign, c_decrypt, c_unwrapkey, c_verifyrecover, c_verify, c_generatekeypair (2048, 1024, 512) size pkcs11_mech_dsa_flag: must support ckm_dsa and the following functions: c_sign, c_verify, c_generatekeypair pkcs11_mech_rc2_flag: must support ckm_rc2_cbc and ckm_rc2_ecb and the following functions: c_generatekey, c_encrypt, c_decrypt, c_wrapkey, c_unwrapkey pkcs11_mech_rc4_flag:...
... must support ckm_rc4_cbc and ckm_rc4_ecb and the following functions: c_generatekey, c_encrypt, c_decrypt, c_wrapkey, c_unwrapkey pkcs11_mech_des_flag: must support ckm_cpmf_cbc, ckm_des_cbc, ckm_des3_cbc, ckm_cpmf_ecb, ckm_des_ecb, ckm_des3_ecb and the following functions: c_generatekey, c_encrypt, c_decrypt, c_wrapkey, c_unwrapkey pkcs11_mech_dh_flag: must support ckm_dh_pkcs_derive and ckm_dh_key_pair_gen and the following functions: c_derivekey, c_generatekeypair pkcs11_mech_md5_flag: hashing must be able to function without authentication.
jspage - Archive of obsolete content
;};object.reset=function(a,c){if(c==null){for(var e in a){object.reset(a,e); }return a;}delete a[c];switch($type(a[c])){case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=object.reset(b);break;case"array":a[c]=$unlink(a[c]); break;}return a;};new native({name:"class",initialize:class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a; },wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new error('the method "'+b+'" cannot be called.'); }var e=this.caller,f=this._current;this.caller=f;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=f;this.caller=e;return d;}.extend({_owner:a,_origin:c,_name:b}); }});class.implement({implement:function(a,d){if($type(...
...a)=="object"){for(var e in a){this.implement(e,a[e]);}return this;}var f=class.mutators[a];if(f){d=f.call(this,d); if(d==null){return this;}}var c=this.prototype;switch($type(d)){case"function":if(d._hidden){return this;}c[a]=class.wrap(this,a,d);break;case"object":var b=c[a]; if($type(b)=="object"){$mixin(b,d);}else{c[a]=$unlink(d);}break;case"array":c[a]=$unlink(d);break;default:c[a]=d;}return this;}});class.mutators={extends:function(a){this.parent=a; this.prototype=class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new error('the method "'+b+'" has no parent.'); }return c.apply(this,arguments);}.protect());},implements:function(a){$splat(a).each(function(b){if(b instanceof function){b=class.instantiate(b);}t...
...ar o=n[s||l];var q=[];while(o){if(o.nodetype==1&&(!m||element.match(o,m))){if(!p){return document.id(o,r); }q.push(o);}o=o[l];}return(p)?new elements(q,{ddup:false,cash:!r}):null;};var e={html:"innerhtml","class":"classname","for":"htmlfor",defaultvalue:"defaultvalue",text:(browser.engine.trident||(browser.engine.webkit&&browser.engine.version<420))?"innertext":"textcontent"}; var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var k=["value","type","defaultvalue","accesskey","cellpadding","cellspacing","colspan","frameborder","maxlength","readonly","rowspan","tabindex","usemap"]; b=b.associate(b);hash.extend(e,b);hash.extend(e,k.associate(k.map(string.tolowercase)));var a={before:function(m,l){if(l.parentnode){l.paren...
...n(l){l=document.id(l,true);if(l){this.appendchild(l);}},this);return this;},appendtext:function(m,l){return this.grab(this.getdocument().newtextnode(m),l); },grab:function(m,l){a[l||"bottom"](document.id(m,true),this);return this;},inject:function(m,l){a[l||"bottom"](this,document.id(m,true));return this;},replaces:function(l){l=document.id(l,true); l.parentnode.replacechild(this,l);return this;},wraps:function(m,l){m=document.id(m,true);return this.replaces(m).grab(m,l);},getprevious:function(l,m){return j(this,"previoussibling",null,l,false,m); },getallprevious:function(l,m){return j(this,"previoussibling",null,l,true,m);},getnext:function(l,m){return j(this,"nextsibling",null,l,false,m);},getallnext:function(l,m){return j(this,"nextsibling",null,l,true,m); },getfirst:function(l,m){return j(...
Index - Archive of obsolete content
ArchiveMozillaXULIndex
419 wrap xul attributes, xul reference no summary!
... 420 wraparound xul attributes, xul reference no summary!
... 887 wraparound xul properties, xul reference no summary!
...if text appears as a child of the description, it will wrap to multiple lines.
Adding Labels and Images - Archive of obsolete content
the text will not wrap, so the text will all be displayed on a single line.
...if the text needs to wrap, you can place the text content inside opening and closing tags as in the following example: example 2 : <label>this is some longer text that will wrap onto several lines.</label> as with html, line breaks and extra whitespace are collapsed into a single space.
... later, we'll find out how to constrain the width of elements so that we can see the wrapping more easily.
...</description> you can set the text via script using the textcontent property, as in the following example: <description id="text" width="200"/> document.getelementbyid('text').textcontent = "some lengthy word wrapped text goes here."; internally, both the label element and the description elements are the same.
Manifest Files - Archive of obsolete content
the browser.manifest file used by firefox looks like this: content branding jar:browser.jar!/content/branding/ xpcnativewrappers=yes content browser jar:browser.jar!/content/browser/ xpcnativewrappers=yes overlay chrome://global/content/viewsource.xul chrome://browser/content/viewsourceoverlay.xul overlay chrome://global/content/viewpartialsource.xul chrome://browser/content/viewsourceoverlay.xul overlay chrome://browser/content/pageinfo.xul chrome://pippki/content/pageinfooverlay.xul two packages are listed here, 'br...
...the xpcnativewrappers=yes part at the end of the manifest line is a flag that may optionally be used.
...if the xpcnativewrappers flag is specified, it indicates that scripts running in a privileged context don't call these overridden versions, but the original built-in versions instead.
...for more information about this feature, see xpcnativewrapper.
String.prototype.quote() - Archive of obsolete content
the non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").
... syntax str.quote() return value a new string representing the original string wrapped in double-quotes, with any special characters escaped.
... examples using quote in the table below the quote() method replaces any special characters and wraps the strings in double-quotes.
... also note the third column where a wrapped eval() evaluates the escape sequences again.
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1...
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="item">item</div...
...> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 100px 100px; } .item { grid-column-start: 1; grid-column-end: 3; grid-row-start: 1; grid-row-end: 3; } naming lines the lines created in the explicit grid can be named, by adding the name in square brackets before or after the track sizing information.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="item">item</div> </div> .wrapper { display: grid; grid-template-columns: [col1-start] 1fr [col2-start] 1fr [col3-start] 1fr [cols-end]; grid-template-rows: [row1-start] 100px [row2-start] 100px [rows-end]; } .item { grid-column-start: col1-start; grid-column-end: col...
CSS values and units - Learn web development
i've set a font size of 1em on the containing <div>, which has a class of .wrapper.
... the difference is that the second set of two boxes is inside a wrapper that is 400 pixels wide.
... try changing the width of the wrapper or the percentage value to see how this works.
...the 20% is calculated from the width of the parent container .wrapper and so will change if that width changes.
Supporting older browsers - Learn web development
a floated item that becomes a grid item loses the float behaviour, which means that by turning the wrapper into a grid container, the floated items become grid items.
... * {box-sizing: border-box;} .wrapper { background-color: rgb(79,185,227); padding: 10px; max-width: 400px; display: grid; grid-template-columns: 1fr 1fr 1fr; } .item { float: left; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } <div class="wrapper"> <div class="item">item one</div> <div class="item">item two</div> <div class="item">item three</div> </div> note: the clear property also has no effect once the cleared item becomes a grid item, so you could have a layout with a cleared footer, which is then turned into a grid layout.
... * {box-sizing: border-box;} .wrapper { background-color: rgb(79,185,227); padding: 10px; max-width: 400px; display: grid; grid-template-columns: 1fr 1fr 1fr; } .item { float: left; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; width: 33.333%; } <div class="wrapper"> <div class="item">item one</div> <div class="item">item two</div> <div class="item">item three</div> </div> ...
... * {box-sizing: border-box;} .wrapper { background-color: rgb(79,185,227); padding: 10px; max-width: 400px; display: grid; grid-template-columns: 1fr 1fr 1fr; } .item { float: left; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; width: 33.333%; } @supports (display: grid) { .item { width: auto; } } <div class="wrapper"> <div class="item">item one</div> <div class="item">...
Index - Learn web development
html consists of a series of elements, which you use to enclose, or wrap, different parts of the content to make it appear a certain way, or act a certain way.
... 229 html table basics article, beginner, codingscripting, html, learn, tables, basics, cell, col, colgroup, colspan, header, row, rowspan that just about wraps up the basics of html tables.
... 249 responsive images article, beginner, codingscripting, design, graphics, guide, html, image, intermediate, jpeg, png, pictures, captions, hyperlinks, img, picture, sizes, src, srcset that's a wrap for responsive images — we hope you enjoyed playing with these new techniques.
... as a recap, there are two distinct problems we've been discussing here: 250 video and audio content article, audio, beginner, guide, html, video, captions, subtitles, track and that's a wrap; we hope you had fun playing with video and audio in web pages!
Making asynchronous programming easier with async and await - Learn web development
you'll note that we've wrapped the code inside a function, and we've included the async keyword before the function keyword.
... you are probably already thinking "this is really cool!", and you are right — fewer .then() blocks to wrap around code, and it mostly just looks like synchronous code, so it is really intuitive.
...we've had to wrap all the code in a new async function, displaycontent(), and we've not reduced the code by a lot of lines, but being able to move the bulk of the code out of the .then() block provides a nice, useful simplification, leaving us with a much more readable program.
... another minor inconvenience is that you have to wrap your awaited promises inside an async function.
Drawing graphics - Learn web development
add the following block to the bottom of the draw() function: if (posx % 13 === 0) { if (sprite === 5) { sprite = 0; } else { sprite++; } } we are wrapping the whole block in if (posx % 13 === 0) { ...
...if so, we move on to the next sprite by incrementing sprite (wrapping to 0 after we're done with sprite #5).
...add the following chunk of code at the bottom of your javascript: let cube; let loader = new three.textureloader(); loader.load( 'metal003.png', function (texture) { texture.wraps = three.repeatwrapping; texture.wrapt = three.repeatwrapping; texture.repeat.set(2, 2); let geometry = new three.boxgeometry(2.4, 2.4, 2.4); let material = new three.meshlambertmaterial( { map: texture, shading: three.flatshading } ); cube = new three.mesh(geometry, material); scene.add(cube); draw(); }); there's a bit more to take in here, so let's go through it in stages: ...
... inside this function we use properties of the texture object to specify that we want a 2 x 2 repeat of the image wrapped around all sides of the cube.
Video and Audio APIs - Learn web development
ata-icon="p" aria-label="play pause toggle"></button> <button class="stop" data-icon="s" aria-label="stop"></button> <div class="timer"> <div></div> <span aria-label="timer">00:00</span> </div> <button class="rwd" data-icon="b" aria-label="rewind"></button> <button class="fwd" data-icon="f" aria-label="fast forward"></button> </div> </div> the whole player is wrapped in a <div> element, so it can all be styled as one unit if needed.
... at the top of this file, insert the following code: const media = document.queryselector('video'); const controls = document.queryselector('.controls'); const play = document.queryselector('.play'); const stop = document.queryselector('.stop'); const rwd = document.queryselector('.rwd'); const fwd = document.queryselector('.fwd'); const timerwrapper = document.queryselector('.timer'); const timer = document.queryselector('.timer span'); const timerbar = document.queryselector('.timer div'); here we are creating constants to hold references to all the objects we want to manipulate.
... the outer timer wrapper <div>, the digital timer readout <span>, and the inner <div> that gets wider as the time elapses.
... seconds = math.floor(media.currenttime - minutes * 60); let minutevalue; let secondvalue; if (minutes < 10) { minutevalue = '0' + minutes; } else { minutevalue = minutes; } if (seconds < 10) { secondvalue = '0' + seconds; } else { secondvalue = seconds; } let mediatime = minutevalue + ':' + secondvalue; timer.textcontent = mediatime; let barlength = timerwrapper.clientwidth * (media.currenttime/media.duration); timerbar.style.width = barlength + 'px'; } this is a fairly long function, so let's go through it step by step: first of all, we work out the number of minutes and seconds in the htmlmediaelement.currenttime value.
Styling Vue components with CSS - Learn web development
ze; } .btn__danger { color: #fff; background-color: #ca3c3c; border-color: #bd2130; } .btn__filter { border-color: lightgrey; } .btn__danger:focus { outline-color: #c82333; } .btn__primary { color: #fff; background-color: #000; } .btn-group { display: flex; justify-content: space-between; } .btn-group > * { flex: 1 1 auto; } .btn-group > * + * { margin-left: 0.8rem; } .label-wrapper { margin: 0; flex: 0 0 100%; text-align: center; } [class*="__lg"] { display: inline-block; width: 100%; font-size: 1.9rem; } [class*="__lg"]:not(:last-child) { margin-bottom: 1rem; } @media screen and (min-width: 620px) { [class*="__lg"] { font-size: 2.4rem; } } .visually-hidden { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(1px 1px...
... 1px 1px); clip: rect(1px, 1px, 1px, 1px); clip-path: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack-large > * + * { margin-top: 2.5rem; } @media screen and (min-width: 550px) { .stack-small > * + * { margin-top: 1.4rem; } .stack-large > * + * { margin-top: 2.8rem; } } /* end global styles */ #app { background: #fff; margin: 2rem 0 4rem 0; padding: 1rem; padding-top: 0; position: relative; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 2.5rem 5rem 0 rgba(0, 0, 0, 0.1); } @media screen and (min-width: 550px) { #app { padding: 4rem; } } #app > * { max-width: 50rem; margin-left: auto; margin-right: auto; } #app > form { max-width...
...to avoid repeating ourselves, let's wrap our label in an <h2>.
... update your todoform template so that it looks like this: <template> <form @submit.prevent="onsubmit"> <h2 class="label-wrapper"> <label for="new-todo-input" class="label__lg"> what needs to be done?
Hacking Tips
since there isn't debug info for the jitted code, you will need to tell gdb that you are looking at arm code: (gdb) set arm force-mode arm or you can wrap the x command in your own command: def xi set arm force-mode arm eval "x/%di %d", $arg0, $arg1 set arm force-mode auto end printing asm.js/wasm generated assembly code (from gdb) set a breakpoint on js::wasm::instance::callexport (defined in wasminstance.cpp as of november 18th 2016).
...for example in '[rr 28496 607198]reftest test-start | file:///home/bgirard/mozilla-central/tree/image/test/reftest/bmp/bmpsuite/b/wrapper.html?badpalettesize.bmp' z would be 607198.
... the other way is to wrap the section that you want to measure with the datenow() function call which returns the number of milliseconds, with a decimal part for sub-milliseconds.
... on linux, you can manage the resources available to one program by using cgroup, and to do you can install libcgroup which provides some convenient tools such as cgexec to wrap the program that you want to benchmark.
JSPropertySpec
syntax struct jspropertyspec { struct selfhostedwrapper { void *unused; const char *funname; }; const char *name; int8 tinyid; // obsolete since jsapi 31 uint8_t flags; union { jsnativewrapper native; selfhostedwrapper selfhosted; } getter; union { jsnativewrapper native; selfhostedwrapper selfhosted; } setter; /* obsolete since jsapi 29 */ /* added in jsapi 28 */ const char *selfhostedgetter; const char *selfhostedsetter; }; name type description name const char * name to assign the prope...
... getter jsnativewrapper or selfhostedwrapper getter method for the property.
... setter jsnativewrapper or selfhostedwrapper setter method for the property.
...to define an array of jspropertyspec, use js_psg, js_psgs, js_self_hosted_get, js_self_hosted_getset, and js_ps_end see also mxr id search for jspropertyspec jsfunctionspec jsnativewrapper js_defineproperties js_psg js_psgs js_self_hosted_get js_self_hosted_getset js_ps_end bug 766448 - changed type of getter and setter to wrapper bug 938728 - added selfhostedgetter and selfhostedsetter bug 958262 - changed type of getter and setter to union, and removed selfhostedgetter and selfhostedsetter.
How to build an XPCOM component in JavaScript
ur interface the same way you did above, except with a few modifications so that xpcomutils can set it up properly: /*********************************************************** class definition ***********************************************************/ //class constructor function helloworld() { // if you only need to access your component from javascript, uncomment the following line: //this.wrappedjsobject = this; } // class definition helloworld.prototype = { // properties required for xpcom registration: classdescription: "my hello world javascript xpcom component", classid: components.id("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"), contractid: "@dietrich.ganx4.com/helloworld;1", // [optional] custom factory (an object implementing nsifactory).
... using your component using wrappedjsobject if you only intend to access your component from javascript, i.e.
... you skipped the sections "defining the interface" and "compiling the typelib" above, you uncommented the "wrappedjsobject" line in the class constructor, and you removed the "[components.interfaces.nsihelloworld]" argument for the call to xpcomutils.generateqi() in queryinterface, then you can access your component like this: try { var mycomponent = components.classes['@dietrich.ganx4.com/helloworld;1'] .getservice().wrappedjsobject; alert(mycomponent.hello()); } catch (anerror) { dump("error: " + anerror); } for more information about wrappedjsobject, see here.
... an example component older js+xpcom notes - includes some wrappedjsobject information.
Language bindings
the result is structured cloned back to the original context, unless it is native (for example, if it returns a dom node, this is not structured cloned, because the original context will see that through an xraywrapper already), so it's guaranteed to behave predictably.
...for example, you can import xpcomutils.jsm to avoid copy/pasting long xpcom component registration boilerplate in your component files.components.utils.importglobalpropertiesimports various objects into a system scope.components.utils.isxraywrapperwhen privileged javascript in gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways.
...any expando properties are not visible, and if any native properties have been redefined, this has no effect.components.utils.makeobjectpropsnormalensures that the specified object's methods are all in the object's scope, and aren't cross-component wrappers.components.utils.reporterrorcomponents.utils.reporterror reports a javascript error object to the error console, and returns.
...this can be particularly handy with restartless (boostrapped) extensions, so that you can unload an old version of a code module when a new version of your add-on is installed.components.utils.unwaivexraysundo a previous call to components.utils.waivexrays(), restoring xray vision for the caller.components.utils.waivexrayswaives xray vision for an object, giving the caller a transparent wrapper to the underlying object.javaxpcomjavaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
nsIChromeRegistry
illa.org/chrome/chrome-registry;1 as a service: var chromeregistry = components.classes["@mozilla.org/chrome/chrome-registry;1"] .getservice(components.interfaces.nsichromeregistry); method overview void canonify(in nsiuri achromeurl); obsolete since gecko 1.8 void checkfornewchrome(); nsiuri convertchromeurl(in nsiuri achromeurl); boolean wrappersenabled(in nsiuri auri); violates the xpcom interface guidelines constants constant value description none 0 partial 1 full 2 methods canonify() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this method is obsolete; use convertchromeurl() instead.
... violates the xpcom interface guidelines wrappersenabled() returns whether xpcnativewrappers are enabled for the specified uri.
... boolean wrappersenabled( in nsiuri auri ); parameters auri the uri for which to determine if xpcnativewrappers are enabled.
... return value true if xpcnativewrappers are enabled for the specified uri; otherwise false.
nsIDOMWindowUtils
hpx, in float aheightpx); void setdisplayport(in float axpx, in float aypx, in float awidthpx, in float aheightpx); void setresolution(in float axresolution, in float ayresolution); void startpccountprofiling(); void stoppccountprofiling(); void suppresseventhandling(in boolean asuppress); void suspendtimeouts(); nsidomfile wrapdomfile(nsifile afile); attributes attribute type description currentinnerwindowid unsigned long long the id of the window's current inner window.
... getclassname() returns the real classname (possibly of the mostly-transparent security wrapper) of aobj.
... wrapdomfile() wraps the specified nsidomfile in a dom file object.
... nsidomfile wrapdomfile( nsifile afile ); parameters afile the nsifile object to wrap in a dom file object.
nsISecurityCheckedComponent
method overview string cancallmethod(in nsiidptr iid, in wstring methodname); string cancreatewrapper(in nsiidptr iid); string cangetproperty(in nsiidptr iid, in wstring propertyname); string cansetproperty(in nsiidptr iid, in wstring propertyname); methods cancallmethod() returns a capability string indicating what permissions are required to call the specified method on the given interface.
...cancreatewrapper() returns a string indicating what permissions are required to create a wrapper for the given interface.
... string cancreatewrapper( in nsiidptr iid ); parameters iid the interface to reflect into javascript.
... note that if wrapper creation is prevented, the properties and methods will not be defined on the javascript object, whereas if wrapper creation succeeds but methods/properties are prevented, the properties and methods will be visible, not not usable.
nsMsgNavigationType
will wrap around if the wrap flag is set to true.
...will wrap around if the wrap flag is set to true.
...will wrap around if the wrap flag is set to true.
...will wrap around if the wrap flag is set to true.
Storage
you can still use this helper object by manually creating the statement wrapper, mozistoragestatementwrapper, which is provided in gecko 1.9.1 and later.
...see mozistoragestatementwrapper for details.
... mozistoragevaluearray wraps an array of sql values, such as a result row.
... mozistoragestatementwrapper storage statement wrapper mozistorageservice storage service storage:performance how to get your database connection performing well.
EventTarget.addEventListener() - Web APIs
my_element.addeventlistener('click', (e) => { console.log(this.classname) // warning: `this` is not `my_element` console.log(e.currenttarget === this) // logs `false` }) if an event handler (for example, onclick) is specified on an element in the html source, the javascript code in the attribute value is effectively wrapped in a handler function that binds the value of this in a manner consistent with the addeventlistener(); an occurrence of this within the code represents a reference to the element.
...ototype.preventdefault=function() { this.returnvalue=false; }; } if (!event.prototype.stoppropagation) { event.prototype.stoppropagation=function() { this.cancelbubble=true; }; } if (!element.prototype.addeventlistener) { var eventlisteners=[]; var addeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var self=this; var wrapper=function(e) { e.target=e.srcelement; e.currenttarget=self; if (typeof listener.handleevent != 'undefined') { listener.handleevent(e); } else { listener.call(self,e); } }; if (type=="domcontentloaded") { var wrapper2=function(e) { if (document.readystate=="complete") { wrapper(e); } ...
... }; document.attachevent("onreadystatechange",wrapper2); eventlisteners.push({object:this,type:type,listener:listener,wrapper:wrapper2}); if (document.readystate=="complete") { var e=new event(); e.srcelement=window; wrapper2(e); } } else { this.attachevent("on"+type,wrapper); eventlisteners.push({object:this,type:type,listener:listener,wrapper:wrapper}); } }; var removeeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var counter=0; while (counter<eventlisteners.length) { var eventlistener=eventlisteners[counter]; if (eventlistener.object==this && eventlistener.type==type && eventlistener.listener==listener) { if (type=="domco...
...ntentloaded") { this.detachevent("onreadystatechange",eventlistener.wrapper); } else { this.detachevent("on"+type,eventlistener.wrapper); } eventlisteners.splice(counter, 1); break; } ++counter; } }; element.prototype.addeventlistener=addeventlistener; element.prototype.removeeventlistener=removeeventlistener; if (htmldocument) { htmldocument.prototype.addeventlistener=addeventlistener; htmldocument.prototype.removeeventlistener=removeeventlistener; } if (window) { window.prototype.addeventlistener=addeventlistener; window.prototype.removeeventlistener=removeeventlistener; } } })(); older way to register event listeners addeventlistener() was introduced ...
HTMLElement.offsetLeft - Web APIs
however, for inline-level elements (such as span) that can wrap from one line to the next, offsettop and offsetleft describe the positions of the first border box (use element.getclientrects() to get its width and height), while offsetwidth and offsetheight describe the dimensions of the bounding border box (use element.getboundingclientrect() to get its position).
... therefore, a box with the left, top, width and height of offsetleft, offsettop, offsetwidth and offsetheight will not be a bounding box for a span with wrapped text.
... example var colortable = document.getelementbyid("t1"); var toleft = colortable.offsetleft; if (toleft > 5) { // large left offset: do something here } this example shows a 'long' sentence that wraps within a div with a blue border, and a red box that one might think should describe the boundaries of the span.
...</span> <span id="longspan">long span that wraps within this div.</span> </div> <div id="box" style="position: absolute; border-color: red; border-width: 1; border-style: solid; z-index: 10"> </div> <script type="text/javascript"> var box = document.getelementbyid("box"); var longspan = document.getelementbyid("longspan"); box.style.left = longspan.offsetleft + document.body.scrollleft + "px"; box.style.top = longspan.offsettop + document.body.scrolltop + "px"; box.style.width = longspan.offsetwidth + "px"; box.style.height = longspan.offsetheight + "px"; </script> specification specification status comment css object model (cssom) view modul...
SubtleCrypto.deriveKey() - Web APIs
extractable is a boolean indicating whether it will be possible to export the key using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
... "wrapkey": the key may be used to wrap a key.
... "unwrapkey": the key may be used to unwrap a key.
... syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
SubtleCrypto.importKey() - Web APIs
extractable is a boolean indicating whether it will be possible to export the key using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
... wrapkey: the key may be used to wrap a key.
... unwrapkey: the key may be used to unwrap a key.
... exceptions the promise is rejected when one of the following exceptions is encountered: syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
WebGLRenderingContext.stencilOp() - Web APIs
gl.incr_wrap increments the current stencil buffer value.
... wraps stencil buffer value to zero when incrementing the maximum representable unsigned value.
... gl.decr_wrap decrements the current stencil buffer value.
... wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of 0.
WebGLRenderingContext.stencilOpSeparate() - Web APIs
gl.incr_wrap increments the current stencil buffer value.
... wraps stencil buffer value to zero when incrementing the maximum representable unsigned value.
... gl.decr_wrap decrements the current stencil buffer value.
... wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of 0.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
.wrapper { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } autoprefixer online is a useful way to see which prefixes are recommended, depending on how many versions you wish to go back with browser support.
... you can test the fallback behaviour by removing display: flex from the wrapper.
...css creates anonymous boxes to represent these items so that you do not need to wrap each item in a wrapper to represent the html table row, and a second one to represent the table element itself, you can’t see or style these anonymous boxes; they are there purely to fix up the tree.
...for example, two contiguous flex items with display: table-cell will become two separate display: block flex items, instead of being wrapped into a single anonymous table.” - 4.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
in a browser that supports this keyword you should be able to see that the text has taken all of the soft wrapping opportunities available to it, becoming as small as it can be without overflowing.
...it gets as big as it possibly can be, taking no soft-wrapping opportunities.
...the items will be floored at their min-content size — the size that they become if they take advantage of any soft wrapping opportunities available to them.
...if you change the width on the flex container — increasing it to 700px for example — and then reduce the flex item width, you can see that the first two items will wrap, however they will never become smaller than that min-content size.
clear - CSS: Cascading Style Sheets
WebCSSclear
formal definition initial valuenoneapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | left | right | both | inline-start | inline-end examples clear: left html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="red">lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="left">this paragraph clears left.</p> </div> css .wrapper{ border:1px solid black; padding:10px; } .left { border: 1px solid black; clear: left; } .black { float: left; margin: 0; background-color: black; color: #fff; width: 20%; } .red { float: left; margin: 0; background-color: pink; width:20%; } p { width: 50%; } clear: right html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="red">lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="right">this paragraph clears right.</p> </div> css .wrapper{ border:1px solid black; padding:10px; } .right { border: 1px solid black; clear: right; } .black { float: right; margin: 0; background-color: black; color: #fff; width:20%; } .red { float: right; margin: 0; background-color: pink; width:20%; } p { width: 50%; } clear: both html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="both">this paragraph clears both.</p> </div> css .wrapper{ border:1px solid black; padding:10px; } .both { border: 1px solid black; clear: both; } .black { float: left; margin: 0; background-color: black; color: #fff; width:20%; } .red { float: right; margin: 0; background-color: pink; width:20%; } p { width: 45%; } specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
shape-outside - CSS: Cascading Style Sheets
the shape-outside css property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap.
... by default, inline content wraps around its margin box; shape-outside provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes.
...the float area determines the shape around which inline content (float elements) wrap.
...inline content wraps around the element's margin box, like usual.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
then we'll wrap things up with a brief discussion of how to use color wisely: how to select appropriate colors, keeping in mind the needs of people with differing visual capabilities.
... let's take a look at an example, starting by looking at the results we're trying to achieve: html the html responsible for creating the above example is shown here: <div class="wrapper"> <div class="box boxleft"> <p> this is the first box.
... </p> </div> </div> this is pretty simple, using a <div> as a wrapper around the contents, which consists of two more <div>s, each styled differently with a single paragraph (<p>) in each box.
... .wrapper { width: 620px; height: 110px; margin: 0; padding: 10px; border: 6px solid mediumturquoise; } the .wrapper class is used to assign styles to the <div> that encloses all of our other content.
Using Promises - JavaScript
this should be needed only to wrap old apis.
... luckily we can wrap settimeout in a promise.
... best practice is to wrap problematic functions at the lowest possible level, and then never call them directly again: const wait = ms => new promise(resolve => settimeout(resolve, ms)); wait(10*1000).then(() => saysomething("10 seconds")).catch(failurecallback); basically, the promise constructor takes an executor function that lets us resolve or reject a promise manually.
...a variant of this is the promise constructor anti-pattern, which combines nesting with redundant use of the promise constructor to wrap code that already uses promises.
BigInt - JavaScript
type information when tested against typeof, a bigint will give "bigint": typeof 1n === 'bigint' // true typeof bigint('1') === 'bigint' // true when wrapped in an object, a bigint will be considered as a normal "object" type: typeof object(1n) === 'object' // true operators the following operators may be used with bigints (or object-wrapped bigints): +, *, -, **, %.
...1 : 0)) // ↪ [ -12n, 0, 0n, 4n, 4, 6, 10 ] note that comparisons with object-wrapped bigints act as with other objects, only indicating equality when the same object instance is compared: 0n === object(0n) // false object(0n) === object(0n) // false const o = object(0n) o === o // true conditionals a bigint behaves like a number in cases where: it is converted to a boolean: via the boolean function; when used with logical operators ||, &&,...
... static methods bigint.asintn() wraps a bigint value to a signed integer between -2width-1 and 2width-1 - 1.
... bigint.asuintn() wraps a bigint value to an unsigned integer between 0 and 2width - 1.
Function.prototype.bind() - JavaScript
description the bind() function creates a new bound function, which is an exotic function object (a term from ecmascript 2015) that wraps the original function object.
... calling the bound function generally results in the execution of its wrapped function.
... a bound function has the following internal properties: [[boundtargetfunction]] the wrapped function object [[boundthis]] the value that is always passed as this value when calling the wrapped function.
... [[boundarguments]] a list of values whose elements are used as the first arguments to any call to the wrapped function.
edgeMode - SVG: Scalable Vector Graphics
value duplicate | wrap | none default value duplicate animatable yes duplicate this value indicates that the input image is extended along each of its borders as necessary by duplicating the color values at the given edge of the input image.
... wrap this value indicates that the input image is extended by taking the color values from the opposite edge of the image.
... value duplicate | wrap | none default value none animatable yes duplicate this value indicates that the input image is extended along each of its borders as necessary by duplicating the color values at the given edge of the input image.
... wrap this value indicates that the input image is extended by taking the color values from the opposite edge of the image.
Exported WebAssembly functions - WebAssembly
exported webassembly functions are basically just javascript wrappers that represent webassembly functions in javascript.
... either way, you get the same kind of wrapper for the underlying function.
... it is worth noting that these are real javascript functions, in addition to being wrappers for webassembly functions.
...testfunc.tostring() returns an interesting result: function 0() { [native code] } this gives you more of an idea of its wrapper-type nature.
Compiling an Existing C Module to WebAssembly - WebAssembly
it seemed to work brilliantly: $ emcc -o3 -s wasm=1 -s extra_exported_runtime_methods='["cwrap"]' \ -i libwebp \ webp.c \ libwebp/src/{dec,dsp,demux,enc,mux,utils}/*.c note: this strategy will not work with every c project.
...emscripten provides emconfigure and emmake to wrap these commands and inject the appropriate parameters.
... now you only need some html and javascript to load your new module: <script src="./a.out.js"></script> <script> module.onruntimeinitialized = async _ => { const api = { version: module.cwrap('version', 'number', []), }; console.log(api.version()); }; </script> and you will see the correct version number in the output: note: libwebp returns the current version a.b.c as a hexadecimal number 0xabc.
...after exposing the function to javascript using cwrap, you can use that number to find the start of our buffer and copy the image data: const api = { version: module.cwrap('version', 'number', []), create_buffer: module.cwrap('create_buffer', 'number', ['number', 'number']), destroy_buffer: module.cwrap('destroy_buffer', '', ['number']), }; const image = await loadimage('./image.jpg'); const p = api.create_buffer(image.width, image.height); ...
Modules - Archive of obsolete content
objects living in one compartment cannot be accessed directly from another compartment: they need to be accessed through an intermediate object, known as a wrapper.
...rewriting the loadscript function using sandboxes, we end up with: function loadscript(url, imports) { let global = components.utils.sandbox(url); global.imports = imports; global.exports = {}; loader.loadsubscript(url, global); return global.exports; } note that the object returned by sandbox is a wrapper to the sandbox, not the sandbox itself.
... a wrapper behaves exactly like the wrapped object, with one difference: for each property access/function it performs an access check to make sure that the calling script is actually allowed to access/call that property/function.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
within the window are a label element and textbox element, wrapped in a hbox element so that they are arranged horizontally.
...nt handler) clear: function(event) { }, // dynamically generate menu items (event handler) createmenu: function(event) { }, // read file _readfile: function(afile) { }, // write file _writefile: function(afile, adata) { }, }; window.addeventlistener("load", function(){ gsessionstore.init(); }, false); window.addeventlistener("unload", function(){ gsessionstore.uninit(); }, false); wrap methods and variables as properties of objects you’ll note that in listing 15, i’ve defined a lot of different methods and variables as properties of a single object, gsessionstore.
...wrapping everything in one object is a good way to isolate extensions from each other and keep them from trampling each others’ toes.
Promises - Archive of obsolete content
moreover, many third-party wrappers for the xmlhttprequest api now support promises out of the box.
... yield db.close(); } }); promise wrappers and helpers the following are some example promise-based wrappers for common callback-based asynchronous apis.
... */ jsonstore.prototype.save = function () { return this.saver.savechanges(); }; example usage: var addon_id = "extension@example.com"; var config_default = { "foo": "bar", }; new jsonstore("config", config_default).then(store => { console.log(store.data); store.data.baz = "quux"; store.save(); }) the following changes will remove the dependency on aom wrappers: let addon = yield new promise(accept => addonmanager.getaddonbyid(addon_id, accept)); let dir = yield new promise(accept => addon.getdatadirectory(accept)); xmlhttprequest function request(url, options) { return new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = event => resolve(event.target); ...
CSS3 - Archive of obsolete content
css flexible box layout module candidate recommendation add a flexbox layout to the css display property and several new css properties to control it: flex, flex-align, flex-direction, flex-flow, flex-item-align, flex-line-pack, flex-order, flex-pack, and flex-wrap.
...these shapes describe areas, around which inline content wraps instead of wrapping around the bounding box.
... control on line breaks and word boundaries using the css line-break, word-break, hyphens, text-wrap, overflow-wrap, and text-align-last properties.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
instead of "shrinkwrapping" the image itself, the browser is now wrapping around the line in which the image sits.
...the image will move to the bottom of the cell, but the cell won't "shrinkwrap" the image.
...should this property be adopted, then any browser supporting it could emulate traditional "shrinkwrap" behavior without risking other layout upset with the following rule: td {line-box-contain: font replaced;} /* proposed for css3 */ there are other possible fixes contained within the current css3 working drafts, such as line-height-policy.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
parameters node the menu is attached to this node, which may be either a raw dom node or a dom node wrapped by jquery.
...parameters node the menu is attached to this node, which may be either a raw dom node or a dom node wrapped by jquery.
...parameters anchornode the menu will pop up on this node, which may be either a raw dom node or a dom node wrapped by jquery.
Using XPInstall to Install Plugins - Archive of obsolete content
exe) installer, xpinstall can wrap this native installer and run it so that the user never has to leave the browsing environment and click on the exe to run it.
...not all the work needs to be done in javascript -- if you have a native installer (exe) that recognizes netscape gecko browsers, and you merely wish to wrap the exe installer in an xpi package for a streamlined delivery to the client, you can easily do so.
... using xpinstall to run an exe (native code) installer if you wish to run a native installer (exe) to install plugin software, but wish to make the delivery of this native installer streamlined and within the browser's process, then you ought to consider wrapping it in an xpi package.
description - Archive of obsolete content
if text appears as a child of the description, it will wrap to multiple lines.
... attributes crop, disabled, tabindex value properties accessibletype, crop, disabled, tabindex, value style classes header, indent, monospace, plain, small-margin examples this is a long section of text that will word wrap when displayed <description> this is a long section of text that will word wrap when displayed.
... </description> this is a long section of text that will not word wrap <description value="this is a long section of text that will not word wrap"> </description> this is a long section of dynamically controlled text that will word wrap <description id="desc" style="width: 300px"></description> document.getelementbyid('desc').textcontent = "this is a long section of dynamic message text that will word wrap"; attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute.
JSObject - Archive of obsolete content
java.lang.object | +----netscape.javascript.jsobject description javascript objects are wrapped in an instance of the class netscape.javascript.jsobject and passed to java.
... when a javascript object is sent to java, the runtime engine creates a java wrapper of type jsobject; when a jsobject is sent from java to javascript, the runtime engine unwraps it to its original javascript object type.
...when the jsobject is passed back to javascript, the object is unwrapped and can be used by javascript code.
JavaArray - Archive of obsolete content
summary core object a wrapped java array accessed from within javascript code is a member of the type javaarray.
...javaarray is a wrapper for the instance; all references to the array instance are made through the javaarray.
...when the javaarray is passed back to java, the array is unwrapped and can be used by java code.
JavaObject - Archive of obsolete content
summary core object the type of a wrapped java object accessed from within javascript code.
...javaobject is a wrapper for the instance; all references to the class instance are made through the javaobject.
...when the javaobject is passed back to java, it is unwrapped and can be used by java code.
Bounding volume collision detection with THREE.js - Game development
knotbbox.intersectsbox(otherbox); note: this is different from the box3.containsbox method, which checks whether the box3 fully wraps another one.
... it takes into account the child meshes when computing the size of the bounding box, so the original mesh and all its children are wrapped.
... knot.position.set(-3, 2, 1); knot.rotation.x = -math.pi / 4; // update the bounding box so it stills wraps the knot knotboxhelper.update(); box3.setfromobject(knotboxhelper); performing collision tests is done in the same way as explained in the above section — we use our box3 object in the same way as described above.
Fundamental text and font styling - Learn web development
you can't select and style subsections of text unless you wrap them in an appropriate element (such as a <span> or <strong>), or use a text-specific pseudo-element like ::first-letter (selects the first letter of an element's text), ::first-line (selects the first line of an element's text), or ::selection (selects the text currently highlighted by the cursor.) fonts let's move straight on to look at properties for styling fonts.
... overflow-wrap: specify whether or not the browser may break lines within words in order to prevent overflow.
... playable code <div class="body-wrapper" style="font-family: 'open sans light',helvetica,arial,sans-serif;"> <h2>html input</h2> <textarea id="code" class="html-input" style="width: 90%;height: 10em;padding: 10px;border: 1px solid #0095dd;"> <p>some sample text for your delight</p> </textarea> <h2>css input</h2> <textarea id="code" class="css-input" style="width: 90%;height: 10em;padding: 10px;border: 1px solid #0095dd;">...
Advanced form styling - Learn web development
take the following example, which shows a number of the "ugly" form features in action: this example has the following css applied to it: body { font-family: 'josefin sans', sans-serif; margin: 20px auto; max-width: 400px; } form > div { margin-bottom: 20px; } select { -webkit-appearance: none; appearance: none; } .select-wrapper { position: relative; } .select-wrapper::after { content: "▼"; font-size: 1rem; top: 6px; right: 10px; position: absolute; } button, label, input, select, progress, meter { display: block; font-family: inherit; font-size: 100%; padding: 0; margin: 0; box-sizing: border-box; width: 100%; padding: 5px; height: 30px; } input[type="text"], input[type="datetime-lo...
...we put an extra wrapper around the control, because ::before/::after don't work on <select> elements (this is because generated content is placed relative to an element's formatting box, but form inputs work more like replaced elements — their display is generated by the browser and put in place — and therefore don't have one): <div class="select-wrapper"><select id="select" name="select"> <option>banana</opti...
...on> <option>cherry</option> <option>lemon</option> </select></div> we then use generated content to generate a little down arrow, and put it in the right place using positioning: .select-wrapper { position: relative; } .select-wrapper::after { content: "▼"; font-size: 1rem; top: 6px; right: 10px; position: absolute; } the second, slightly more major issue is that you don't have control over the box that appears containing the options when you click on the <select> box to open it.
Example 1 - Learn web development
/* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : ...
.../* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : ...
...1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0, 0, 0, .45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select...
How to structure a web form - Learn web development
as you can see in the examples, it's common practice to wrap a label and its widget with a <li> element within a <ul> or <ol> list.
...for now, read the descriptions carefully as you follow the below instructions, and start to form an appreciation of which wrapper elements we are using to structure the form, and why.
...here you'll see that we are wrapping the contact information fields inside a distinct <section> element.
Other form controls - Learn web development
visually, the text entered wraps and the form control is by default resizable.
... wrap specifies how the control wraps text.
... the values are soft (the default value), which means the text submitted is not wrapped but the text rendered by the browser is wrapped; hard (the cols attribute must be specified when using this value), which means both the submitted and rendered texts are wrapped, and off, which stops wrapping.
Document and website structure - Learn web development
with the right css, you could use pretty much any elements to wrap around the different sections and get it looking how you wanted, but as discussed before, we need to respect semantics and use the right element for the right job.
... non-semantic wrappers sometimes you'll come across a situation where you can't find an ideal semantic element to group some items together or wrap some content.
... <span> is an inline non-semantic element, which you should only use if you can't think of a better semantic text element to wrap your content, or don't want to add any specific meaning.
HTML table advanced features and accessibility - Learn web development
to use them: the <thead> element must wrap the part of the table that is the header — this is usually the first row containing the column headings, but this is not necessarily always the case.
... the <tfoot> element needs to wrap the part of the table that is the footer — this might be a final row with items in the previous rows summed, for example.
... the <tbody> element needs to wrap the other parts of the table content that aren't in the table header or footer.
Handling text — strings in JavaScript - Learn web development
double quotes in javascript, you can choose single quotes or double quotes to wrap your strings in.
... you can even do this with two numbers — you can force a number to become a string by wrapping it in quote marks.
...i gave it a score of ${ score/highestscore * 100 }%.`; there is no more need to open and close multiple string pieces — the whole lot can just be wrapped in a single pair of backticks.
Beginning our React todo list - Learn web development
the jsx copy the following snippet to your clipboard, then paste it into app.js so that it replaces the existing app() function: function app(props) { return ( <div classname="todoapp stack-large"> <h1>todomatic</h1> <form> <h2 classname="label-wrapper"> <label htmlfor="new-todo-input" classname="label__lg"> what needs to be done?
... text-decoration: underline; border-color: #4d4d4d; } .btn__danger { color: #fff; background-color: #ca3c3c; border-color: #bd2130; } .btn__filter { border-color: lightgrey; } .btn__primary { color: #fff; background-color: #000; } .btn-group { display: flex; justify-content: space-between; } .btn-group > * { flex: 1 1 49%; } .btn-group > * + * { margin-left: 0.8rem; } .label-wrapper { margin: 0; flex: 0 0 100%; text-align: center; } .visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack-large > * + * { margin-top: 2...
... #4d4d4d; box-shadow: inset 0 0 0 2px; } [class*="__lg"] { display: inline-block; width: 100%; font-size: 1.9rem; } [class*="__lg"]:not(:last-child) { margin-bottom: 1rem; } @media screen and (min-width: 620px) { [class*="__lg"] { font-size: 2.4rem; } } .filters { width: 100%; margin: unset auto; } /* todo item styles */ .todo { display: flex; flex-direction: row; flex-wrap: wrap; } .todo > * { flex: 0 0 100%; } .todo-text { width: 100%; min-height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } .todo-text:focus { box-shadow: inset 0 0 0 2px; } /* checkbox styles */ .c-cb { box-sizing: border-box; font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; displa...
Starting our Svelte Todo list app - Learn web development
copy and paste the following into our todos.svelte component file, replacing the existing content: <!-- todos.svelte --> <div class="todoapp stack-large"> <!-- newtodo --> <form> <h2 class="label-wrapper"> <label for="todo-0" class="label__lg"> what needs to be done?
...olor: #fff; background-color: #ca3c3c; border-color: #bd2130; } .btn__filter { border-color: lightgrey; } .btn__primary { color: #fff; background-color: #000; } .btn__primary:disabled { color: darkgrey; background-color:#565656; } .btn-group { display: flex; justify-content: space-between; } .btn-group > * { flex: 1 1 49%; } .btn-group > * + * { margin-left: 0.8rem; } .label-wrapper { margin: 0; flex: 0 0 100%; text-align: center; } .visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack-large > * + * { margin-top: 2...
... #4d4d4d; box-shadow: inset 0 0 0 2px; } [class*="__lg"] { display: inline-block; width: 100%; font-size: 1.9rem; } [class*="__lg"]:not(:last-child) { margin-bottom: 1rem; } @media screen and (min-width: 620px) { [class*="__lg"] { font-size: 2.4rem; } } .filters { width: 100%; margin: unset auto; } /* todo item styles */ .todo { display: flex; flex-direction: row; flex-wrap: wrap; } .todo > * { flex: 0 0 100%; } .todo-text { width: 100%; min-height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } .todo-text:focus { box-shadow: inset 0 0 0 2px; } /* checkbox styles */ .c-cb { box-sizing: border-box; font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; displa...
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
put the following contents inside it: <script> import { createeventdispatcher } from 'svelte' const dispatch = createeventdispatcher() let name = '' const addtodo = () => { dispatch('addtodo', name) name = '' } const oncancel = () => name = '' </script> <form on:submit|preventdefault={addtodo} on:keydown={e => e.key === 'escape' && oncancel()}> <h2 class="label-wrapper"> <label for="todo-0" class="label__lg">what needs to be done?</label> </h2> <input bind:value={name} type="text" id="todo-0" autocomplete="off" class="input input__lg" /> <button type="submit" disabled={!name} class="btn btn__primary btn__lg">add</button> </form> here we are binding the <input> to the name variable with bind:value={name} and disabling the add button when it is em...
...nce to the name input dom node const addtodo = () => { dispatch('addtodo', name) name = '' nameel.focus() // give focus to the name input } const oncancel = () => { name = '' nameel.focus() // give focus to the name input } </script> <form on:submit|preventdefault={addtodo} on:keydown={e => e.key === 'escape' && oncancel()}> <h2 class="label-wrapper"> <label for="todo-0" class="label__lg">what needs to be done?</label> </h2> <input bind:value={name} bind:this={nameel} type="text" id="todo-0" autocomplete="off" class="input input__lg" /> <button type="submit" disabled={!name} class="btn btn__primary btn__lg">add</button> </form> try the app out — type a new todo name in to the <input> field, press tab to give focus to the add ...
...and we can achieve this without the need to create a custom wrapper element like textinput, myinput or similar.
Focus management with Vue refs - Learn web development
since the focusoneditbutton() method needs to be invoked after the dom has updated, we can wrap the existing function body inside a $nexttick() call.
... destroyed() — runs after a component has been removed from the dom activated() — only used in components wrapped in a special keep-alive tag.
... deactivated() — only used in components wrapped in a special keep-alive tag.
Introduction to automated testing - Learn web development
this works on the premise that things like gulp plugins are basically wrappers around command line tools.
... install the node sauce labs wrapper using the following command: npm install saucelabs create a new file inside your project root called call_sauce.js.
... install the node testingbot wrapper using the following command: npm install testingbot-api create a new file inside your project root called tb.js.
Setting up your own test automation environment - Learn web development
so here we've done the test as before, except that this time we've wrapped it inside a function, searchtest().
... we could add a sleep() method to our quick_test.js test too — try wrapping your last line of code in a block like this: driver.sleep(2000).then(function() { input.sendkeys('filling in my form'); input.getattribute("value").then(function(value) { if(value !== '') { console.log('form input editable'); } }); }); webdriver will now wait for 2 seconds before filling in the form field.
... to do this, you need to: install the node sauce labs wrapper using the following command (if you've not already done it for this project): npm install saucelabs --save-dev require saucelabs — put this at the top of your sauce_google_test.js file, just below the previous variable declarations: const saucelabs = require('saucelabs'); create a new instance of saucelabs, by adding the following just below that: let saucelabs = new saucelabs({ ...
Accessibility API cross-reference
directory see <nav> if it really is a table of contents, use <toc> containing <toci> elements (which are wrappers for internal hyperlinks in such a table).
...in such a case, they should be wrapped in a <reference> pragmatically however, user agents should expect to find <link> tags as direct children of <toci> abstract role - a perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page.
...in such a case, they should be wrapped in a <reference> pragmatically however, user agents should expect to find <link> tags as direct children of <toci> a list list list list list <ol>, <ul> <l> an item in a list listitem n/a list_item listitem <li> <li> may contain <lbl> (bullet, numeral, term etc.) and <lbody> a type of live region where new information is added in meaningf...
Accessible Toolkit Checklist
these toolkits wrap the widgets implemented by the os with a consistent api for each platform.
...however, be aware that the wrapping layer will introduce accessibility bugs, and thus you will need to test extensively and fill in the holes.
... tab order must wrap, not have invisible items in tab order dynamically added items must not corrupt the tab cycle or make it disorderly tab cycle must be identical backwards and forwards the f6 and shift+f6 key combinations should cycle through panes in a window making focus visible on any widget, and focus must always be visible shift+f10 or context menu key should work like right clic...
Reviewer Checklist
in c++, wrapper-cache as needed.
... if your object can be gotten from somewhere without creating it in the process, it needs to be wrapper-cached.
...the first line should be a short description (since only the first line is shown in the log), and additional description, if needed, should be present, properly wrapped, in later lines.
Sqlite.jsm
the sqlite.jsm javascript code module is a promise-based wrapper around the storage/sqlite interface.
...this is a glorified wrapper around the pragma shrink_memory statement, which tells sqlite to shrink its memory usage (by clearing caches, etc).
...this is a wrapper around the pragma user_version statement.
source-editor.jsm
method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolean canundo(); void endcompoundchange(); boolean redo(); void resetundo(); ...
... number findnext( boolean awrap }; parameters awrap if true, the search operation will wrap around to the beginning of the text.
... number findnext( boolean awrap }; parameters awrap if true, the search operation will wrap around to the end of the text.
Mozilla Quirks Mode Behavior
support <pre wrap>, <pre cols>, <pre width>.
...i don't follow the code in nscssrenderingborders well enough to tell, though.] in quirks mode a fixed width specified on a table cell resets the nowrap attribute.
... if the nowrap attribute is present the cell width will never be smaller than the specified fixed width (bug 277232).
JS::PerfMeasurement
perfmeasurement* js::extractperfmeasurement(jsval wrapper) if you are the c++ side of an xpcom interface, and you want to benchmark only part of your execution time but make the results available to javascript, you can declare a bare jsval argument in your .idl file and have javascript pass a perfmeasurement object that it created in that argument slot.
... the jsval you receive points to a javascript wrapper object.
... it initializes the javascript wrapper interface for this api and pokes the constructor function into the global object you provide.
NSS_3.12_release_notes.html
bug 354403: nsslist_createiterator returns pointer to a freed memory if the function fails to allocate a lock bug 399236: pkix wrapper must print debug output into stderr bug 399300: pkix error results not freed after use.
...- null pointer dereference in cert_certchainfromcert bug 353374: klocwork 76494 - null ptr derefs in cert_formatname bug 353375: klocwork 76513 - null ptr deref in nsscertificatelist_docallback bug 353413: klocwork 76541 free uninitialized pointer in cert_findcerturlextension bug 353416: klocwork 76593 null ptr deref in nsscryptokiprivatekey_setcertificate bug 353423: klocwork bugs in nss/lib/pk11wrap/dev3hack.c bug 353739: klocwork null ptr dereferences in instance.c bug 353741: klocwork cascading memory leak in mpp_make_prime bug 353742: klocwork null ptr dereference in ocsp_decoderesponsebytes bug 353748: klocwork null ptr dereferences in pki3hack.c bug 353760: klocwork null pointer dereference in p7decode.c bug 353763: klocwork null ptr dereferences in pk11cert.c bug 353773: klocwork null ...
...bug 337088: coverity 405, pk11_paramtoalgid() in mozilla/security/nss/lib/pk11wrap/pk11mech.c bug 339907: oaep_xor_with_h1 allocates and leaks sha1cx bug 341122: coverity 633 sftk_destroyslotdata uses slot->slotlock then checks it for null bug 351140: coverity 995, potential crash in ecgroup_fromnameandhex bug 362278: lib/util includes header files from other nss directories bug 228190: remove unnecessary nss_enable_ecc defines from manifest.mn bug 412906: remove sha.c and sha.
Python binding for NSS
design goals nss and nspr are c language api's which python-nss "wraps" and exposes to python programs.
...es and values to be justified when printing objects the following classes were added rsagenparams the following class methods were added nss.nss.certificate.get_extension nss.nss.pk11slot.generate_key_pair nss.nss.dsapublickey.format nss.nss.dsapublickey.format_lines the following module functions were added nss.nss.pub_wrap_sym_key the following internal utilities were added pystring_utf8 secitem_new_alloc() the following class constructors were modified to accept intialization parameters keypqgparams (dsa generation parameters) the following were deprecated nss.nss.make_line_pairs (replaced by nss.nss.make_line_fmt_tuples) deprecated func...
...ease 0.7.0 release date 2009-09-18 scm tag source download change log general modifications: add support for symmetric encryption/decryption more support for digests (hashes) the following classes added: pk11symkey pk11context the following methods and functions added: get_best_wrap_mechanism get_best_key_length key_gen derive get_key_length digest_key clone_context digest_begin digest_op cipher_op finalize digest_final read_hex hash_buf sec_oid_tag_str sec_oid_tag_name sec_oid_tag_from_name key_mechanism_type_name key_mechanism_type_from_name pk11_attribute_type_name pk11_att...
NSPR functions
the nss functions port_geterror and port_seterror are simply wrappers of pr_geterror and pr_seterror.
...you can implement an nspr i/o layer that wraps your own tcp socket code.
... pr_getuniqueidentity pr_createiolayerstub pr_getdefaultiomethods pr_getidentitieslayer pr_getlayersidentity pr_pushiolayer pr_popiolayer wrapping a native file descriptor if your current tcp socket code uses the standard bsd socket api, a lighter-weight method than creating your own nspr i/o layer is to simply import a native file descriptor into nspr.
SpiderMonkey compartments
an object in one compartment cannot touch an object in another compartment, except through a cross-compartment wrapper.
...we call these objects cross-compartment wrappers.
... spidermonkey tracks the creation of these cross-compartment wrappers and thus it knows at all times what objects from a compartment are kept alive by outside references (through cross-compartment wrappers).
Bytecode Descriptions
toasynciter stack: iter, next ⇒ asynciter create and push an async iterator wrapping the sync iterator iter.
...if the circumstances permit the optimization, tryskipawait replaces value with the result of the await expression (unwrapping the resolved promise, if any) and pushes true.
...format: jof_scope enterwith operands: (uint32_t staticwithindex) stack: val ⇒ push a withenvironmentobject wrapping toobject(val) to the environment chain.
Garbage collection
instead, it must store a wrapper for the other object.
... this allows compartments to be used for security checks: objects in the same compartment have the same access requirements, so no checks are needed, but checks may be done when traversing cross-compartment wrappers.
...cross-compartment wrappers are used as roots for single- and multi-compartment gcs.
JSFunctionSpec
syntax struct jsfunctionspec { const char *name; jsnativewrapper call; uint16_t nargs; uint16_t flags; const char *selfhostedname; }; typedef struct jsnativewrapper { jsnative op; const jsjitinfo *info; } jsnativewrapper; name type description name const char * the function's name.
... call jsnativewrapper the built-in js call wrapped by this function.
... if the function does not wrap a native js call, set this value to null.
SpiderMonkey 1.8.5
a compartment is a global object, a context, and a set of related objects with no outside references (crosscompartment wrappers excepted).
...this change was made in bug 571355 to move the regexp statics out of the context, to simplify cross compartment wrappers.
... bug 630209 also removed the need for js_newscriptobject, by modifying the script compilation interfaces to handle the creation and management of the object wrapper directly; similarly, the script execution interfaces now accept a jsobject pointer than a pointer to jsscript.
SpiderMonkey 1.8.7
a compartment is a global object, a context, and a set of related objects with no outside references (crosscompartment wrappers excepted).
...this change was made in bug 571355 to move the regexp statics out of the context, to simplify cross compartment wrappers.
... bug 630209 also removed the need for js_newscriptobject, by modifying the script compilation interfaces to handle the creation and management of the object wrapper directly; similarly, the script execution interfaces now accept a jsobject pointer than a pointer to jsscript.
SavedFrame
to view everything, use an xraywrapper.
... this is the default wrapper.
... to see the stack as the content compartment sees it, waive the xray wrapper with components.utils.waivexrays: const contentviewofstack = components.utils.waivexrays(somestack); accessor properties of the savedframe.prototype object source the source url for this stack frame, as a string.
Mozilla internal string guide
you can just use getter_copies() to wrap a string class argument, and the class will remember to free the buffer when it goes out of scope: { nsstring val; getvalue(getter_copies(val)); // val will free itself here if (somecondition) return ns_error_failure; ...
...const nscstring&: ""_ns for 8-bit literals, converting implicitly to const nscstring& u""_ns for 16-bit literals, converting implicitly to const nsstring& the benefits of the user-defined literals may seem unclear, given that nsdependentcstring will also wrap a string value in an nscstring.
... wrapping character buffers nsdependentstring nsdependentcstring wrap const char* / const char16_t* buffers.
Components.utils.evalInWindow
the result is structured cloned back to the original context, unless it is native (for example, if it returns a dom node, this is not structured cloned, because the original context will see that through an xraywrapper already), so it's guaranteed to behave predictably.
...if this is just native (for example, a dom node), then the function relies on xraywrappers to wrap the returned content, otherwise the result is structured-cloned.
...lt); // {"name":"selection1","node":{}} the add-on code can modify the variable as well, of course: // add-on-script.js components.utils.evalinwindow("somelocalvariable.newprop = 42", contentwindow); // page-script.js console.log(window.somelocalvariable.newprop); // 42 but note that the add-on script must trust that the page script has not redefined the setter on somelocalvariable: unlike xraywrappers, evalinwindow() does not provide x-ray vision.
mozIStorageConnection
the statements are run wrapped in a transaction.
... mozistoragevaluearray wraps an array of sql values, such as a result row.
... mozistoragestatementwrapper storage statement wrapper ...
mozIStorageStatement
note: javascript callers should always wrap their execution in a try block, and have a reset statement in a finally block.
... void execute(); see also storage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage mozistoragevaluearray wraps an array of sql values, such as a result row.
... mozistorageasyncstatement mozistoragestatementwrapper storage statement wrapper mozistoragebindingparams mozistoragebindingparamsarray ...
nsIAuthPromptAdapterFactory
netwerk/base/public/nsiauthpromptadapterfactory.idlscriptable an interface for wrapping nsiauthprompt interfaces to make them usable via an nsiauthprompt2 interface.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiauthprompt2 createadapter(in nsiauthprompt aprompt); methods createadapter() wrap an object implementing nsiauthprompt so that it's usable via nsiauthprompt2.
... nsiauthprompt2 createadapter( in nsiauthprompt aprompt ); parameters aprompt the nsiauthprompt to wrap.
nsIEditorMailSupport
nsisupportsarray getembeddedobjects(); nsidomnode insertascitedquotation(in astring aquotedtext, in astring acitation, in boolean ainserthtml); nsidomnode insertasquotation(in astring aquotedtext); void inserttextwithquotations(in domstring astringtoinsert); void pasteascitedquotation(in astring acitation, in long aselectiontype); void pasteasquotation(in long aselectiontype); void rewrap(in boolean arespectnewlines); void stripcites(); methods getembeddedobjects() get a list of img and object tags in the current document.
... rewrap() rewrap the selected part of the document, re-quoting if necessary.
... void rewrap( in boolean arespectnewlines ); parameters arespectnewlines try to maintain newlines in the original?
nsIMsgDBView
void docommandwithfolder(in nsmsgviewcommandtypevalue command, in nsimsgfolder destfolder); void getcommandstatus(in nsmsgviewcommandtypevalue command, out boolean selectable_p, out nsmsgviewcommandcheckstatevalue selected_p); void viewnavigate(in nsmsgnavigationtypevalue motion, out nsmsgkey resultid, out nsmsgviewindex resultindex, out nsmsgviewindex threadindex, in boolean wrap); boolean navigatestatus(in nsmsgnavigationtypevalue motion); nsmsgkey getkeyat(in nsmsgviewindex index); nsimsgdbhdr getmsghdrat(in nsmsgviewindex index); nsimsgfolder getfolderforviewindex(in nsmsgviewindex index); acstring geturiforviewindex(in nsmsgviewindex index); nsimsgdbview clonedbview(in nsimessenger amessengerinstance, in nsimsgwind...
... void viewnavigate(in nsmsgnavigationtypevalue motion, out nsmsgkey resultid, out nsmsgviewindex resultindex, out nsmsgviewindex threadindex, in boolean wrap); parameters motion the nsmsgnavigationtypevalue.
... wrap whether to wrap around messages from the last to first (or vice versa).
nsIParserUtils
implemented by: @mozilla.org/parserutils;1 as a service: var parserutils = components.classes["@mozilla.org/parserutils;1"] .getservice(components.interfaces.nsiparserutils); method overview astring converttoplaintext(in astring src, in unsigned long flags, in unsigned long wrapcol); nsidomdocumentfragment parsefragment(in astring fragment, in unsigned long flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element); astring sanitize(in astring src, in unsigned long flags); constants constant value description sanitizerallowcomments (1 << 0) flag for sanitizer: allow comment nodes.
... astring converttoplaintext( in astring src, in unsigned long flags, in unsigned long wrapcol ); parameters src the html source to parse (c++ callers are allowed but not required to use the same string for the return value.) flags conversion option flags defined in nsidocumentencoder.
... wrapcol number of characters per line; 0 for no auto-wrapping.
XPCOM Interface Reference by grouping
it is wrapped by system, but displayed for convenience.
... data this section contains data wrappers and core object definitions.
... nsisupportsweakreference nsivariant do not use nsienumerator nsiinprocesscontentframemessagemanager nsiscriptableio nsixpcscriptable future nsixmlhttprequestupload obsolete nsixmlrpcclient nsixmlrpcfault security auth nsiauthmodule nsiauthprompt nsiauthpromptprovider nsiauthpromptwrapper nsiasyncverifyredirectcallback content nsicontentpolicy credentials nsilogininfo nsiloginmanager using nsiloginmanager nsiloginmanagerstorage nsiloginmetainfo history nsiglobalhistory nsiglobalhistory2 nsiglobalhistory3 ssl nsib...
Using the clipboard
the clipboard model in mozilla requires you to perform the following steps to copy data: create an xpcom wrapper for the data which you want to put on the clipboard.
...first, we need to create an xpcom object to wrap what we want to copy.
...const nssupportsstring = components.constructor("@mozilla.org/supports-string;1", "nsisupportsstring"); function supportsstring(str) { // create an instance of the supports-string class var res = nssupportsstring(); // store the javascript string that we want to wrap in the new nsisupportsstring object res.data = str; return res; } // create a constructor for the built-in transferable class const nstransferable = components.constructor("@mozilla.org/widget/transferable;1", "nsitransferable"); // create a wrapper to construct an nsitransferable instance and set its source to the given window, when necessary function transferable(source) { var res...
XPCOM
if the referent object is destroyed before the weak reference, the pointer inside the weak reference is set to nsnull.working with multiple versions of interfacesin this short note we illustrate how one can update an xpcom module in order for it to work in both firefox 2 and firefox 3, even if the interfaces have changed in the interim.working with out parameterswrappedjsobjectwrappedjsobject is a property sometimes available on xpconnect wrappers.
... when available, it lets you access the javascript object hidden by the wrapper.xpcom abixpcom abi is the binary interface of xpcom components.
...this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around nspr's.xptcall faqxptcall is a small low level xpcom method call library.
Mozilla
javascript tips javascript-dom prototypes in mozilla when a dom node is accessed from javascript in mozilla, the native c++ dom node is wrapped using xpconnect and the wrapper is exposed to javascript as the javascript representation of the dom node.
... when xpconnect wraps a c++ object it will create a jsobject that is unique to this c++ object.
...all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
CustomElementRegistry.define() - Web APIs
// create a class for the element class popupinfo extends htmlelement { constructor() { // always call super first in constructor super(); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create spans var wrapper = document.createelement('span'); wrapper.setattribute('class','wrapper'); var icon = document.createelement('span'); icon.setattribute('class','icon'); icon.setattribute('tabindex', 0); var info = document.createelement('span'); info.setattribute('class','info'); // take attribute content and put it inside the info span var text = this.getattribute('text'); ...
...ntent = text; // insert icon var imgurl; if(this.hasattribute('img')) { imgurl = this.getattribute('img'); } else { imgurl = 'img/default.png'; } var img = document.createelement('img'); img.src = imgurl; icon.appendchild(img); // create some css to apply to the shadow dom var style = document.createelement('style'); style.textcontent = '.wrapper {' + 'position: relative;' + '}' + '.info {' + 'font-size: 0.8rem;' + 'width: 200px;' + 'display: inline-block;' + 'border: 1px solid black;' + 'padding: 10px;' + ...
... '}' + 'img {' + 'width: 1.2rem' + '}' + '.icon:hover + .info, .icon:focus + .info {' + 'opacity: 1;' + '}'; // attach the created elements to the shadow dom shadow.appendchild(style); shadow.appendchild(wrapper); wrapper.appendchild(icon); wrapper.appendchild(info); } } // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4 numbers on the back of your card."> note: constructo...
Intersection Observer API - Web APIs
threshold example <template id="boxtemplate"> <div class="samplebox"> <div class="label topleft"></div> <div class="label topright"></div> <div class="label bottomleft"></div> <div class="label bottomright"></div> </div> </template> <main> <div class="contents"> <div class="wrapper"> </div> </div> </main> .contents { position: absolute; width: 700px; height: 1725px; } .wrapper { position: relative; top: 600px; } .samplebox { position: relative; left: 175px; width: 150px; background-color: rgb(245, 170, 140); border: 2px solid rgb(201, 126, 17); padding: 4px; margin-bottom: 6px; } #box1 { height: 200px; } #box2 { height: 75px; } #bo...
...: absolute; margin: 0; background-color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.7); width: 3em; height: 18px; padding: 2px; text-align: center; } .topleft { left: 2px; top: 2px; } .topright { right: 2px; top: 2px; } .bottomleft { bottom: 2px; left: 2px; } .bottomright { bottom: 2px; right: 2px; } let observers = []; startup = () => { let wrapper = document.queryselector(".wrapper"); // options for the observers let observeroptions = { root: null, rootmargin: "0px", threshold: [] }; // an array of threshold sets for each of the boxes.
...0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], [0, 0.25, 0.5, 0.75, 1.0] ]; for (let i=0; i<=1.0; i+= 0.01) { thresholdsets[0].push(i); } // add each box, creating a new observer for each for (let i=0; i<4; i++) { let template = document.queryselector("#boxtemplate").content.clonenode(true); let boxid = "box" + (i+1); template.queryselector(".samplebox").id = boxid; wrapper.appendchild(document.importnode(template, true)); // set up the observer for this box observeroptions.threshold = thresholdsets[i]; observers[i] = new intersectionobserver(intersectioncallback, observeroptions); observers[i].observe(document.queryselector("#" + boxid)); } // scroll to the starting position document.scrollingelement.scrolltop = wrapper.firstelementchil...
SubtleCrypto.generateKey() - Web APIs
extractable is a boolean indicating whether it will be possible to export the key using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
... wrapkey: the key may be used to wrap a key.
... unwrapkey: the key may be used to unwrap a key.
WebGL2RenderingContext.getSamplerParameter() - Web APIs
gl.texture_wrap_r: returns a glenum indicating the texture wrapping function for the texture coordinate r.
... gl.texture_wrap_s: returns a glenum indicating the texture wrapping function for the texture coordinate s.
... gl.texture_wrap_t: returns a glenum indicating the texture wrapping function for the texture coordinate t.
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
gl.texture_wrap_r: a glenum specifying the texture wrapping function for the texture coordinate r.
... gl.texture_wrap_s: a glenum specifying the texture wrapping function for the texture coordinate s.
... gl.texture_wrap_t: a glenum specifying the texture wrapping function for the texture coordinate t.
WebGLRenderingContext.getTexParameter() - Web APIs
gl.texture_wrap_s glenum wrapping function for texture coordinate s gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_t glenum wrapping function for texture coordinate t gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_r glenum wrapping function for texture coordinate r gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
WebGLRenderingContext.texParameter[fi]() - Web APIs
gl.texture_wrap_s wrapping function for texture coordinate s gl.repeat (default value),gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_t wrapping function for texture coordinate t gl.repeat (default value),gl.clamp_to_edge, gl.mirrored_repeat.
... gl.texture_wrap_r wrapping function for texture coordinate r gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat.
Window.find() - Web APIs
WebAPIWindowfind
syntax window.find(astring, acasesensitive, abackwards, awraparound, awholeword, asearchinframes, ashowdialog); astring the text string for which to search.
... awraparound boolean.
... if true, specifies a wrap around search.
WindowProxy - Web APIs
a windowproxy object is a wrapper for a window object.
...all operations performed on a windowproxy object will also be applied to the underlying window object it currently wraps.
...when a browsing context is navigated, the window object its windowproxy wraps is changed.
ARIA annotations - Accessibility
this should be used on an element that wraps a single insertion and deletion (see role="insertion" and role="deletion" above).
...this is the job of role="suggestion", which should be set on an element wrapping both of them like so: <p>freida’s pet is a <span role="suggestion"><span role="deletion">black cat called luna</span><span role="insertion">purple tyrannosaurus rex called tiny</span></span>.
...to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details attribute, the value of which should be the id of the comment.
Box-shadow generator - CSS: Cascading Style Sheets
' data-label=":after"></div> </div> <div id="preview"> <div id="obj-element"> <div class="content"> </div> <div id="obj-before"> </div> <div id="obj-after"> </div> </div> </div> </div> </div> <div id="controls" class="group section"> <div class="wrap-left"> <div class="colorpicker category"> <div class="title"> </div> <div id="colorpicker" class="group"> <div id="gradient" class="gradient"> <div id="gradient_picker"> </div> </div> <div id="hue" data-topic="hue" class="hue"> <div id="hue_select...
...t_color"> </div> </div> <div class="block info"> <div class="input" data-topic="a" data-title='alpha:' data-action="alpha"></div> <div class="input" data-topic="hexa" data-title='' data-action="hexa"></div> </div> </div> </div> </div> <div class="wrap-right"> <div id="shadow_properties" class="category"> <div class="title"> shadow properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> inset </div> <div class="ui-checkbox" data-topic='inset'></div> </div> ...
...play : block; position: absolute; z-index: -1; } #obj-after { height: 100%; width: 100%; background: #ddd; border: 1px solid #ccc; text-align: right; display : block; position: absolute; z-index: -1; } /******************************************************************************/ /******************************************************************************/ /** * controls */ .wrap-left { float: left; overflow: hidden; } .wrap-right { float: right; overflow: hidden; } .wrap-left > * { float: left; } .wrap-right > * { float: right; } @media (min-width: 960px) { .wrap-left { width: 45%; } .wrap-right { width: 55%; } } @media (max-width: 959px) { .wrap-left { width: 30%; } .wrap-right { width: 70%; } } #controls { color: #444; margin: 10px 0...
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
as already described in the basic concepts article, flex items can be allowed to wrap but, once they do so, each line becomes a flex container of its own.
... as a rule of thumb, if you are adding widths to flex items in order to make items in one row of a wrapped flex container line up with the items above them you really want two-dimensional layout.
... by adding display: contents to the wrapper around the nested elements, you can see that that item has disappeared from the layout, allowing the two sub-children to be laid out as if they were direct children of the flex container.
CSS Shapes - CSS: Cascading Style Sheets
the specification defines a number of different ways to define a shape on a floated element, causing wrapping lines to wrap round the shape rather than following the rectangle of the element's box.
...this creates a circle shape, and the content wrapping the float now wraps around that shape.
... this changes the length of the wrapping text's line boxes.
Inline formatting context - CSS: Cascading Style Sheets
in the next example there is a (<span>) element wrapping a set of words wrapping onto two lines.
... the border on the <span> breaks at the wrapping point.
...if there is a float within the same block formatting context however, the float will cause the line boxes that wrap the float to become shorter.
Sticky footers - CSS: Cascading Style Sheets
the recipe download this example note: in this example and the following one we are using a wrapper set to min-height: 100% in order that our live example works.
...the .wrapper has a minimum height of 100% which means it is as tall as the container it is in.
... the flexbox example starts out in the same way, but we use display:flex rather than display:grid on the .wrapper; we also set flex-direction to column.
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
display<display-box><display-inside><display-internal><display-legacy><display-listitem><display-outside>dpcmdpidppxdrop-shadow()eelement()ellipse()em:emptyempty-cells:enabledenv()exffallback (@counter-style)filter<filter-function>:first:first-child::first-letter (:first-letter)::first-line (:first-line):first-of-typefit-content()<flex>flexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloat:focusfont@font-facefont-familyfont-family (@font-face)font-feature-settingsfont-feature-settings (@font-face)@font-feature-valuesfont-kerningfont-language-overridefont-optical-sizingfont-sizefont-size-adjustfont-stretchfont-stretch (@font-face)font-stylefont-style (@font-face)font-synthesisfont-variantfont-variant (@font-face)font-variant-alternatesfont-variant-capsfont-variant-east-asianfon...
...nter-style):not:nth-child:nth-last-child:nth-last-of-type:nth-of-type<number>oobject-fitobject-positionoffsetoffset-anchoroffset-distanceoffset-pathoffset-rotate:only-child:only-of-typeopacityopacity():optionalorderorientation (@viewport)@ornamentsornaments()orphans:out-of-rangeoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-anchoroverflow-blockoverflow-inlineoverflow-wrapoverflow-xoverflow-yoverscroll-behavioroverscroll-behavior-blockoverscroll-behavior-inlineoverscroll-behavior-xoverscroll-behavior-yppad (@counter-style)paddingpadding-blockpadding-block-endpadding-block-startpadding-bottompadding-inlinepadding-inline-endpadding-inline-startpadding-leftpadding-rightpadding-top@pagepage-break-afterpage-break-beforepage-break-insidepaint()paint-orderpath()pc<percent...
...itiontransition-delaytransition-durationtransition-propertytransition-timing-functiontranslatetranslate()translate3d()translatex()translatey()translatez()turnuunicode-bidiunicode-range (@font-face)unset<url>url()user-zoom (@viewport)v:validvar()vertical-alignvh@viewportviewport-fit (@viewport)visibility:visitedvmaxvminvwwwhite-spacewidowswidthwidth (@viewport)will-changeword-breakword-spacingword-wrapwriting-modexxzz-indexzoom (@viewport)others--* selectors the following are the various selectors, which allow styles to be conditional based on various features of elements within the dom.
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
the hyphens css property specifies how words should be hyphenated when text wraps across multiple lines.
...lines will only wrap at whitespace.
... manual words are broken for line-wrapping only where characters inside the word suggest line break opportunities.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
html the html needs to be updated to wrap the <input> in a <div> to let us correct the layout after the transform is performed (since transforms don't automatically affect the layout of the page): <div class="slider-wrapper"> <input type="range" min="0" max="11" value="7" step="1"> </div> css now we need some css.
... first is the css for the wrapper itself; this specifies the display mode and size we want so that the page lays out correctly; in essence, it's reserving an area of the page for the slider so that the rotated slider fits into the reserved space without making a mess of things.
... .slider-wrapper { display: inline-block; width: 20px; height: 150px; padding: 0; } then comes the style information for the <input> element within the reserved space: .slider-wrapper input { width: 150px; height: 20px; margin: 0; transform-origin: 75px 75px; transform: rotate(-90deg); } the size of the control is set to be 150 pixels long by 20 pixels tall.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
there is a special case: if the data type is periodic (such as for dates or times), the value of max may be lower than the value of min, which indicates that the range may wrap around; for example, this allows you to specify a time range from 10 pm to 4 am.
... there is a special case: if the data type is periodic (such as for dates or times), the value of max may be lower than the value of min, which indicates that the range may wrap around; for example, this allows you to specify a time range from 10 pm to 4 am.
... for the input types whose domain of possible values is periodic (that is, at the highest possible value, the values wrap back around to the beginning rather than ending), it's possible for the values of the max and min properties to be reversed, which indicates that the range of permitted values starts at min, wraps around to the lowest possible value, then continues on until max is reached.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
wrap indicates how the control wraps text.
... off : like soft but changes appearance to white-space: pre so line segments exceeding cols are not wrapped and the <textarea> becomes horizontally scrollable.
... yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeswrapchrome full support yesedge full support 12firefox full support yesie full support yesopera full support yessafari full support ye...
SyntaxError: unterminated string literal - JavaScript
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.
... the + operator variant looks like this: var longstring = 'this is a very long string which needs ' + 'to wrap across multiple lines because ' + 'otherwise my code is unreadable.'; or you can use the backslash character ("\") at the end of each line to indicate that the string will continue on the next line.
...that form looks like this: var longstring = 'this is a very long string which needs \ to wrap across multiple lines because \ otherwise my code is unreadable.'; another possibility is to use template literals, which are supported in ecmascript 2015 environments: var longstring = `this is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable.`; ...
Object - JavaScript
the object constructor creates an object wrapper for the given value.
...it is a wrapper for the given value.
...let o = new object(undefined) let o = new object(null) using object to create boolean objects the following examples store boolean objects in o: // equivalent to o = new boolean(true) let o = new object(true) // equivalent to o = new boolean(false) let o = new object(boolean()) object prototypes when altering the behavior of existing object.prototype methods, consider injecting code by wrapping your extension before or after the existing logic.
Symbol - JavaScript
it creates a new symbol each time: symbol('foo') === symbol('foo') // false the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new number).
... if you really want to create a symbol wrapper object, you can use the object() function: let sym = symbol('foo') typeof sym // "symbol" let symobj = object(sym) typeof symobj // "object" shared symbols in the global symbol registry the above syntax using the symbol() function will not create a global symbol that is available in your whole codebase.
... symbol wrapper objects as property keys when a symbol wrapper object is used as a property key, this object will be coerced to its wrapped symbol: let sym = symbol('foo') let obj = {[sym]: 1} obj[sym] // 1 obj[object(sym)] // still 1 specifications specification ecmascript (ecma-262)the definition of 'symbol' in that specification.
async function - JavaScript
if the return value of an async function is not explicitly a promise, it will be implicitly wrapped in a promise.
...ritten with a single async function as follows: async function getprocesseddata(url) { let v try { v = await downloaddata(url) } catch(e) { v = await downloadfallbackdata(url) } return processdatainworker(v) } in the above example, notice there is no await statement after the return keyword, although that would be valid too: the return value of an async function is implicitly wrapped in promise.resolve - if it's not already a promise itself (as in this example).
...return promisevalue the implicit wrapping of return values in promise.resolve does not imply that return await promisevalue is functionally equivalent to return promisevalue.
Using shadow DOM - Web Components
creating the shadow root we first attach a shadow root to the custom element: // create a shadow root let shadow = this.attachshadow({mode: 'open'}); creating the shadow dom structure next, we use some dom manipulation to create the element's internal shadow dom structure: // create spans let wrapper = document.createelement('span'); wrapper.setattribute('class', 'wrapper'); let icon = document.createelement('span'); icon.setattribute('class', 'icon'); icon.setattribute('tabindex', 0); let info = document.createelement('span'); info.setattribute('class', 'info'); // take attribute content and put it inside the info span let text = this.getattribute('data-text'); info.textcontent = text; ...
...ibute('img')) { imgurl = this.getattribute('img'); } else { imgurl = 'img/default.png'; } let img = document.createelement('img'); img.src = imgurl; icon.appendchild(img); styling the shadow dom after that we create a <style> element and populate it with some css to style it: // create some css to apply to the shadow dom let style = document.createelement('style'); style.textcontent = ` .wrapper { position: relative; } .info { font-size: 0.8rem; width: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white; border-radius: 10px; opacity: 0; transition: 0.6s all; position: absolute; bottom: 20px; left: 10px; z-index: 3; } img { width: 1.2rem; } .icon:hover + .info, .icon:focus + .info { opacity: 1; }`; attaching the ...
...shadow dom to the shadow root the final step is to attach all the created elements to the shadow root: // attach the created elements to the shadow dom shadow.appendchild(style); shadow.appendchild(wrapper); wrapper.appendchild(icon); wrapper.appendchild(info); using our custom element once the class is defined, using the element is as simple as defining it, and putting it on the page, as explained in using custom elements: // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" data-text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4 numbers on the back of your card."> internal versus external styles in the above example we a...
/loader - Archive of obsolete content
getservice(ci.nsiobserverservice); let observer = { observe: function onunload(subject, topic, reason) { // if this module is unloaded then `subject.wrappedjsobject` will be // `unloadsubject`.
... if (subject.wrappedjsobject === unloadsubject) console.log("i am about to unload, reason is " + reason); }}; observerservice.addobserver(observer, 'sdk:loader:destroy', false); unload the loader module exposes an unload() function that can be used to unload specific loader instance and undo changes made by modules loaded into it.
core/promise - Archive of obsolete content
treat all values as promises module provides a simple function for wrapping values into promises: const { resolve } = require('sdk/core/promise'); var a = resolve(5).then(function(value) { return value + 2; }); a.then(console.log); // => 7 also resolve not only takes values, but also promises.
...in such cases it's usually easier to wrap value into promise than branch on value type: function or(a, b) { var second = resolve(b).then(function(bvalue) { return !!bvalue }); return resolve(a).then(function(avalue) { return !!avalue || second; }, function() { return second; }) } note: we could not use promised function here, as they reject returned promise if any of the given arguments is rejected.
system/unload - Archive of obsolete content
globals functions ensure(object, name) calling ensure() on an object does two things: it replaces a destructor method with a wrapper method that will never call the destructor more than once.
... it ensures that this wrapper method is called when the object's module is unloaded.
Boxes - Archive of obsolete content
wrapping contents in html you can use a div as a container and when the div changes size, the contents will wrap or adjust the layout.
...make the box style="display: block" and the wrapping behavior will occur when the box is resized: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox style="display: block"> <label value="aaa"/> <label value="bbb"/> <label value="ccc"/> <label value="ddd"/> <label value="eee"/> <label value="fff"/> <label value="ggg"/> <label value="hhh"/> <label value="iii"/> <label value="jjj"/> <label value="kkk"/> <label value="lll"/> <label value="mmm"/> <label value="nnn"/> <label value="ooo"/> <label value="p...
Preferences - Archive of obsolete content
javascript wrappers for preferences system there are a few javascript wrappers to make your life easier: http://mozilla.doslash.org/prefutils chrome://global/content/nsusersettings.js https://wiki.mozilla.org/labs/js_modules how to save preferences to save preferences into the default location: var prefservice = components.classes["@mozilla.org/preferences-service;1"] .g...
...are frozen and will not change): nsiprefbranch and nsiprefservice nsiprefbranch2 interface (before gecko 1.8 it was called nsiprefbranchinternal) preferences system - an easy way to create a xul options window for your extension or application syncing preferences across clients using sync lxr pages for libpref, the source code module that implements the preferences system a javascript wrapper for preferences api adding preferences to an extension — a simple tutorial with a working extension that illustrates the use of preference observers inline options - how to use the new preference ui that appears inline in the add-on manager window starting in firefox 7 .
getAttributeNS - Archive of obsolete content
function getattributenswrapper (thisitem, ns, nsatt) { if (thisitem === null) { return false; } if (thisitem.getattributens) { return thisitem.getattributens(ns, nsatt); } else if (ns === null) { return thisitem.getattribute(nsatt); } else if (ns === 'http://www.w3.org/xml/1998/namespace') { // this is assumed so don't try to get an xmlns for the 'xml' prefix return thisitem...
...(xmlnsprefix) && attrs2[i].nodevalue === ns ) { // e.g., 'xmlns:xlink' and 'http://www.w3.org/1999/xlink' return attrs[j].nodevalue; } } thisitem = thisitem.parentnode; } } } return ''; // if not found (some implementations return 'null' but this is not standard) } alert(getattributenswrapper (someelement, 'http://www.w3.org/1999/xlink', 'href')); // gets xlink:href, xl:href, etc.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
however, the fact that software derived from bsd-licensed code can be redistributed under a different license creates the possibility that it will be wrapped in another proprietary program.
... pros and cons programs that have been released under the gpl mandate that any derivative works also be released under the gpl, so the code cannot be wrapped in a proprietary program.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
this element is nothing more than a wrapper, so you can have whatever xul content you want in it.
...all of this is very important to test because, when the dialog is opened, firefox changes the dom of the toolbar, adding wrapper elements that allow the customization.
Source code directories overview - Archive of obsolete content
the [#seamonkey-embedding embedding] code wraps this code with higher level browser functions like forward, back and history.
...the [#seamonkey-webshell webshell] code wraps these interfaces according to the particular platform and way (e.g.
Drag and Drop - Archive of obsolete content
the second is to use a javascript wrapper object that handles some of this for you.
... the code for this wrapper can be found in a file named toolkit/content/nsdraganddrop.js nsdraganddrop.js which is contained in the widget-toolkit (or global) package.
Space Manager High Level Design - Archive of obsolete content
essentially a css-specific wrapper for generic nsbanddata.
... the blockbanddata then walks the collection of trapezoids that were returned by the spacemanager method getbanddata (as nsbanddata wrappers) and determines the right-most edge of the available space.
How to implement a custom XUL query processor component - Archive of obsolete content
here is our sample javascript xpcom query processor: components.utils.import("resource://gre/modules/xpcomutils.jsm"); // basic wrapper for nsixultemplateresult function templateresult(adata) { this._data = adata; // just make a random number for the id this._id = math.random(100000).tostring(); } templateresult.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsixultemplateresult]), // private storage _data: null, // right now our results are flat lists, so no containing/recursion ta...
... rulematched: function(aquery, arulenode) { }, // the output for a result has been removed and the result is no longer being used by the builder hasbeenremoved: function() { } }; // basic wrapper for nsisimpleenumerator function templateresultset(aarrayofdata) { this._index = 0; this._array = aarrayofdata; } templateresultset.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsisimpleenumerator]), hasmoreelements: function() { return this._index < this._array.length; }, getnext: function() { return new templateresult(this._array[this._ind...
advanceSelectedTab - Archive of obsolete content
« xul reference home advanceselectedtab( dir, wrap ) return type: no return value if the argument dir is set to 1, the currently selected tab changes to the next tab.
...if the wrap argument is true, the adjustment will wrap around when the first or last tab is reached.
insertItem - Archive of obsolete content
« xul reference home insertitem( id, beforenode, wrapper, beforepermanent ) not in seamonkey 1.x return type: element add an item with the given id to the toolbar.
...the third argument can be used to wrap the new item in another element.
textbox (Toolkit autocomplete) - Archive of obsolete content
there are several attributes that allow the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.
... inputfield type: textbox element in mozilla, the xul textbox is implemented as a wrapper around an html input element.
Textbox (XPFE autocomplete) - Archive of obsolete content
there are several attributes that allow the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.
... inputfield type: textbox element in mozilla, the xul textbox is implemented as a wrapper around an html input element.
Element Positioning - Archive of obsolete content
examples of setting widths and heights <button label="1" style="width: 100px;"/> <button label="2" style="width: 100em; height: 10px;"/> <button label="3" flex="1" style="min-width: 50px;"/> <button label="4" flex="1" style="min-height: 2ex; max-width: 100px"/> <textbox flex="1" style="max-width: 10em;"/> <description style="max-width: 50px">this is some boring but simple wrapping text.</description> example 1 the first button will be displayed with a width of 100 pixels (px means pixels).
...the text inside will wrap to the next line, after fifty pixels.
Using the Editor from XUL - Archive of obsolete content
nsautoplaceholderbatch is a utility class that wraps text insertion with calls to turn off selection and layout updating (to avoid flicker), and the maintenance of a placeholder transaction.
... another stack-based class, nsautorules, ensures that text insertion is wrapped with calls to nshtmleditor::startoperation() / endoperation().
label - Archive of obsolete content
ArchiveMozillaXULlabel
the caption is in the "value" attribute remember that the label element has a "value" attribute, unlike value in html whereas buttons, checkboxes use label="foo" as the attribute <label label="a caption"/> <!-- wrong --> <label value="a caption"/> <label value="click the button"/> <button label="a button"/> <checkbox label="a decision" value="1"/> wrapping by default, label text does not wrap.
... to enable wrapping, use a text node instead of the value attribute.
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata advanceselectedtab( dir, wrap ) return type: no return value if the argument dir is set to 1, the currently selected tab changes to the next tab.
...if the wrap argument is true, the adjustment will wrap around when the first or last tab is reached.
toolbar - Archive of obsolete content
methods insertitem( id, beforenode, wrapper, beforepermanent ) not in seamonkey 1.x return type: element add an item with the given id to the toolbar.
...the third argument can be used to wrap the new item in another element.
JS-Engine FAQ - Archive of obsolete content
to write wrappers in pure javascript to interface with any c library on the system there are mechanisms such as xpcshell, wxjs, jsdb, jsni coding spidermonkey in c check out this tutorial how to compile tamarin on linux/x86 there is a patch that allows you to compile it.
...see xpcnativewrapper.
2006-09-29 - Archive of obsolete content
* @param ashrinkwrap whether the frame is in a context where * non-replaced blocks should shrink-wrap (e.g., * it's floating, absolutely positioned, or * inline-block).
... */ virtual nssize computesize(nscoord aavailwidth, nscoord amargin, nscoord aborder, nscoord apadding, prbool ashrinkwrap) = 0; details can be located at refactoring some of nshtmlreflowstate.
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
function asyncwrapperfunction() { var opid = debug.mstraceasyncoperationstarting('async trace'); dosomethingasync().then(function (result) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_success); debug.mstraceasynccallbackstarting(opid); // process result of async operation.
... }, function (error) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_error); debug.mstraceasynccallbackstarting(opid); }); debug.mstraceasynccallbackcompleted(); } function dosomethingasync() { return winjs.promise.as(true); } asyncwrapperfunction(); requirements supported in the internet explorer 11 standards document mode.
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
function asyncwrapperfunction() { var opid = debug.mstraceasyncoperationstarting('async trace'); dosomethingasync().then(function (result) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_success); debug.mstraceasynccallbackstarting(opid); // process result of async operation.
... }, function (error) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_error); debug.mstraceasynccallbackstarting(opid); }); debug.mstraceasynccallbackcompleted(); } function dosomethingasync() { return winjs.promise.as(true); } asyncwrapperfunction(); requirements supported in the internet explorer 11 standards document mode.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
therefore, i just added a half-em margins on card paragraphs, and then changed the left margin to be 160px, which makes sure the text in the paragraphs won't wrap under the floated images.
... this is desirable for the cases where only one word would wrap under an image.
Explaining basic 3D theory - Game development
applying textures onto objects during the fragment processing stage of the rendering pipeline allows us to adjust it by wrapping and filtering it if necessary.
... texture wrapping allows us to repeat the 2d image around the 3d object.
Building up a basic demo with Three.js - Game development
what might happen when you add a torus, wrapped in the phong material?
...we're wrapping the scale value in math.abs, to pass the absolute values, greater or equal to 0.
Gecko FAQ - Gecko Redirect 1
additionally, on the windows platform, gecko's xpcom interfaces are wrapped in an activex control that vb developers can utilize (activex wrappers are not available on other platforms because activex is a windows-only technology).
... a javabean wrapper is not currently under development, but there is nothing in gecko's architecture that precludes such development in the future.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide...
...: mastering wrapping of flex items css flexbox guide: typical use cases of flexbox ...
Flexbox - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide...
...: mastering wrapping of flex items css flexbox guide: typical use cases of flexbox ...
Grid Areas - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: 100px 100px; grid-template-areas: "a a b" "a a b"; } .item1...
... { grid-area: a; } .item2 { grid-area: b; } <div class="wrapper"> <div class="item1">item</div> <div class="item2">item</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns grid-template-areas grid-area further reading css grid layout guide: basic concepts of grid layout css grid layout guide: grid template areas definition of grid areas in the css grid layout specification ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
479 value codingscripting, glossary, needscontent in the context of data or an object wrapper around that data, the value is the primitive value that the object wrapper contains.
... 505 wrapper codingscripting, glossary, wrapper in programming languages such as javascript, a wrapper is a function that is intended to call one or more other functions, sometimes purely for convenience, and sometimes adapting them to do a slightly different task in the process.
Intrinsic Size - MDN Web Docs Glossary: Definitions of Web-related terms
for text the min-content size would be if the text wrapped as small as it can in the inline direction without causing an overflow, doing as much soft-wrapping as possible.
... the max-content size is the opposite — in the case of text, this would have the text display as wide as possible, doing no soft-wrapping, even if an overflow was caused.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
primitive wrapper objects in javascript except for null and undefined, all primitive values have object equivalents that wrap around the primitive values: string for the string primitive.
... the wrapper's valueof() method returns the primitive value.
Value - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of data or an object wrapper around that data, the value is the primitive value that the object wrapper contains.
... learn more general knowledge primitive wrapper class on wikipedia ...
Pseudo-classes and pseudo-elements - Learn web development
for example, if you wanted to select the first line of a paragraph you could wrap it in a <span> element and use an element selector; however, that would fail if the number of words you had wrapped were longer or shorter than the parent element's width.
... it acts as if a <span> was magically wrapped around that first formatted line, and updated each time the line length changed.
The box model - Learn web development
border box: the border box wraps the content and any padding.
... margin box: the margin is the outermost layer, wrapping the content, padding and border as whitespace between this box and other elements.
Beginner's guide to media queries - Learn web development
<body> <div class="wrapper"> <header> <nav> <ul> <li><a href="">about</a></li> <li><a href="">contact</a></li> <li><a href="">meet the team</a></li> <li><a href="">blog</a></li> </ul> </nav> </header> <main> <article> <div class="content"> <h1>veggies!</h1> <p> ...
...it might seem strange to wrap up a section about media queries with a suggestion that you might not need one at all!
Normal Flow - Learn web development
inline elements behave differently — they don't appear on new lines; instead, they sit on the same line as one another and any adjacent (or wrapped) text content, as long as there is space for them to do so inside the width of the parent block level element.
...overflowing inline elements will <span>wrap onto a new line if possible (like this one containing text)</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> body { width: 500px; margin: 0 auto; } p { background: rgba(255,84,104,0.3); border: 2px solid rgb(255,84,104); padding: 10px; margin: 10px; } span { background: white; borde...
Structuring a page of content - Learn web development
you need to add a suitable wrapper for: the header the navigation menu the main content the welcome text the image sidebar the footer you should also: apply the provided css to the page by adding another <link> element just below the existing one provided at the start.
... if you are getting stuck and can't envisage what elements to put where, draw out a simple block diagram of the page layout, and write on the elements you think should wrap each block.
Responsive images - Learn web development
like <video> and <audio>, the <picture> element is a wrapper containing several <source> elements that provide different sources for the browser to choose from, followed by the all-important <img> element.
... summary that's a wrap for responsive images — we hope you enjoyed playing with these new techniques.
HTML table basics - Learn web development
LearnHTMLTablesBasics
place the four cells you've already created inside <tr> tags, like so: <tr> <td>hi, i'm your first cell.</td> <td>i'm your second cell.</td> <td>i'm your third cell.</td> <td>i'm your fourth cell.</td> </tr> now you've made one row, have a go at making one or two more — each row needs to be wrapped in an additional <tr> element, with each cell contained in a <td>.
... summary that just about wraps up the basics of html tables.
Graceful asynchronous programming with Promises - Learn web development
because we want to do something a bit more complex to the blob than just run a single method on it and return the result, we'll need to wrap the function body in curly braces this time (otherwise it'll throw an error).
... let's have a look at a simple example to get you started — here we wrap a settimeout() call with a promise — this runs a function after two seconds that resolves the promise (using the passed resolve() call) with a string of "success!".
Ember resources and troubleshooting - Learn web development
it could be thought of as a build-time transform that wraps its argument with a setter function.
... with ember-set-helper: <checkbox @value={{this.somedata}} @ontoggle={{set this "somedata" (not this.somedata)}} /> with ember-box: {{#let (box this.somedata) as |somedata|}} <checkbox @value={{unwrap somedata}} @ontoggle={{update somedata (not this.somedata)}} /> {{/let}} note that none of these solutions are particularly common among members of the community, and as a whole, people are still trying to figure out an ergonomic and simple api for setting data in a template-only context, without backing js.
Vue conditional rendering: editing existing todos - Learn web development
yle scoped> .edit-label { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #0b0c0c; display: block; margin-bottom: 5px; } input { display: inline-block; margin-top: 0.4rem; width: 100%; min-height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } form { display: flex; flex-direction: row; flex-wrap: wrap; } form > * { flex: 0 0 100%; } </style> note: walk through the above code then read the below description to make sure you understand everything the component is doing before moving on.
...el}}</label> </div> <div class="btn-group"> <button type="button" class="btn" @click="toggletoitemeditform"> edit <span class="visually-hidden">{{label}}</span> </button> <button type="button" class="btn btn__danger" @click="deletetodo"> delete <span class="visually-hidden">{{label}}</span> </button> </div> </div> </template> we’ve added a wrapper <div> around the whole template for layout purposes.
Configuring Build Options
./mozconfig-common # build thunderbird mk_add_options moz_objdir=@topsrcdir@/obj-thunderbird ac_add_options --enable-application=comm/mail to build firefox, run the following commands: export mozconfig=/path/to/mozilla/mozconfig-firefox ./mach build to build thunderbird, run the following commands: export mozconfig=/path/to/mozilla/mozconfig-thunderbird ./mach build using mozconfigwrapper mozconfigwrapper is similar to using multiple mozconfig files except that it abstracts and hides them so you don't have to worry about where they live or which ones you've created.
...for information on installing and configuring mozconfigwrapper, see https://github.com/ahal/mozconfigwrapper.
Limitations of chrome scripts
for example: whenever extensions try to access web content from the chrome process, the browser will return a cross process object wrapper that gives the chrome code synchronous access to the content.
... limitations of cpows cross process object wrappers (cpows) are a migration aid giving chrome code synchronous access to content objects.
Multiprocess Firefox
this page is an informal index of leftovers, mostly revolving around the message manager and the related cross process object wrappers.
... cross process object wrappers cross process object wrappers are a migration aid, giving chrome code synchronous access to web content.
HTTP Cache
//github.com/realityripple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a helper interface wrapping following four arguments into a single one: private-browsing boolean flag anonymous load boolean flag app id number (0 for no app) is-in-browser boolean flag helper functions to create nsiloadcontextinfo objects: c++ consumers: functions at loadcontextinfo.h exported header js consumers: resource://gre/mod...
...the open callback actually doesn't give the consumer directly the cacheentry object but a small wrapper class that manages the 'consumer reference counter' on its cache entry.
IME handling guide
how does gecko disable ime on gtk mozilla::widget::imcontextwrapper sets focus to a dummy context which doesn't have ime composition.
... gtk mozilla::widget::imcontextwrapper handles ime.
Following the Android Toasts Tutorial from a JNI Perspective
we want to wrap this in a try-catch statement so if any errors occur we make sure to unload the classes and the java environment, this is good for performance.
... this is what our fields array will look like: static_fields: [ { name: 'length_short', sig: sig.int } ] wrap it all up here is the code for our completed toast class: var toast = jni.loadclass(my_jenv, sig.toast.substr(1, sig.toast.length - 2), { static_methods: [ { name: 'maketext', sig: '(' + sig.context + // context sig.int + // resid sig.int + // duration ')' + sig.toast // r...
XPCOMUtils.jsm
details can be found here: bug 628669 itersimpleenumerator() wraps an nsisimpleenumerator instance into a javascript generator that can be easily iterated over.
... example const nsifile = components.interfaces.nsifile; for (var file in xpcomutils.itersimpleenumerator(dir.directoryentries, nsifile)) console.log(file.path); iterstringenumerator() wraps an nsistringenumerator or nsiutf8stringenumerator instance into a javascript generator that can be easily iterated over.
Localization technical reviews
the team can also wrap contributors with <em:contributor> tags just after the moz_langpack_contributors section.
... make sure that the the text content is wrapped with emptylines.
Creating localizable web applications
good: function num_format($num, $decimals) { $locale_info = localeconv(); return number_format($num, $decimals, $locale_info['decimal_point'], $locale_info['thousands_sep']); } printf(_("%s mb"), num_format($size, 1)); wrap as few html tags as possible when wrapping the localizable content with the gettext function calls, put all the code that irrelevant to localization outside the function call.
...following the rule about wrapping as few html elements with the gettext function call as possible, you could try to put the <strong/> html tag outside of the php code (cf.
About NSPR
since these timers have finite namespace and are free running, they can wrap at any time.
...but in order to deal with the wrap-around issue, only half that namespace may be utilized.
An overview of NSS Internals
the usual minimum requirement is that private keys must be wrapped using a protective layer (such as password-based encryption).
...data described as pem is a base64 encoded presentation of der, usually wrapped between human readable begin/end lines.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
ode; with that understanding, the best directory to look for sample code is in the org/mozilla/jss/tests directory: http://lxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/tests org/mozilla/jss/tests/closedbs.java org/mozilla/jss/tests/keyfactorytest.java org/mozilla/jss/tests/digesttest.java org/mozilla/jss/tests/jcasigtest.java org/mozilla/jss/tests/keywrapping.java org/mozilla/jss/tests/listcerts.java org/mozilla/jss/tests/pk10gen.java org/mozilla/jss/tests/sdr.java org/mozilla/jss/tests/selftest.java org/mozilla/jss/tests/setupdbs.java org/mozilla/jss/tests/sigtest.java org/mozilla/jss/tests/symkeygen.java org/mozilla/jss/tests/testkeygen.java org/mozilla/jss/tests/sslclientauth.java org/...
...symmetric key usage: basically encrypt/decrypt is for data and wrap/unwrap is for keys.
JSS Provider Notes
in this case, the key should be wrapped (encrypted with another key), and then the encrypted key might be extractable from the token.
... secretkey supported algorithms notes aes des desede (des3 ) hmacsha1 rc2 rc4 secretkey is implemented by the class org.mozilla.jss.crypto.secretkeyfacade, which acts as a wrapper around the jss class symmetrickey.
Mozilla-JSS JCA Provider notes
in this case, the key should be wrapped (encrypted with another key), and then the encrypted key might be extractable from the token.
... secretkey supported algorithms notes aes des desede (des3) hmacsha1 rc2 rc4 secretkey is implemented by the class org.mozilla.jss.crypto.secretkeyfacade, which acts as a wrapper around the jss class symmetrickey.
NSS Sample Code sample2
* note: iv is only needed if cipher blocking chaining (cbc) mode of encryption * is used * * the recommended approach is to store and transport wrapped (encrypted) * des keys (ivs can be in the clear).
...we use pk11_originunwrap * to indicate the key was unwrapped - which is what should be done * normally anyway - using raw keys isn't a good idea */ symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if (symkey == null) { fprintf(stderr, "failure to import key into nss (err %d)\n", pr_geterror()); goto out; } /* se...
nss tech note7
if you are really trying to send a key, you should use pk11_pubwrapsymkey().
...both of these functions do the pkcs #1 wrapping of the data.
sslerr.html
ssl_error_md5_digest_failure -12215 "md5 digest function failed." ssl_error_sha_digest_failure -12214 "sha-1 digest function failed." ssl_error_mac_computation_failure -12213 "message authentication code computation failed." ssl_error_sym_key_context_failure -12212 "failure to create symmetric key context." ssl_error_sym_key_unwrap_failure -12211 "failure to unwrap the symmetric key in client key exchange message." ssl_error_iv_param_failure -12209 "pkcs11 code failed to translate an iv into a param." ssl_error_init_cipher_suite_failure -12208 "failed to initialize the selected cipher suite." ssl_error_session_key_gen_failure -12207 "failed to generate session keys for ssl ...
...on a server socket, indicates a failure of one of the following: (a) to unwrap the pre-master secret from the clientkeyexchange message, (b) to derive the master secret from the premaster secret, (c) to derive the mac secrets, cryptographic keys, and initialization vectors from the master secret.
JS_freeop
this article covers features introduced in spidermonkey 17 a wrapper for js_free.
... description js_freeop is a wrapper for js_free(p) that may delay js_free(p) invocation as a performance optimization as specified by the given jsfreeop instance.
Split object
this makes the problem resistant to a wrapper-based approach.) older versions of firefox accomplished this by blowing away all window properties every time a user navigated to another page, then reusing the window.
...(note: with does add an object to the scope chain, but it's a special with wrapper object that is skipped, or something, during the search described here.
Bundling multiple binary components
create small wrappers for calling the methods, as you may need to thunk parameters depending on how much has changed between gecko versions.
... this approach uses only one binary for each platform (win/mac/linux) but creates complexity in the binaries - loading the methods and creating the wrappers.
Finishing the Component
service), getter_addrefs(mioservice)); once you have this interface pointer, you can easily create nsiuri objects from a string, as in the following snippet: nscomptr<nsiuri> uri; nsembedcstring urlstring(node->urlstring); mioservice->newuri(urlstring, nsnull, nsnull, getter_addrefs(uri)); this code wraps a c-string with a nsembedcstring, which you'll recall is a string class that many of the gecko apis require.
... once the url string is wrapped in a nsembedcstring, it can be passed to the method newuri.
Starting WebLock
the nsmemory class is a wrapper around the nsimemory interface, whose only implementation is part of xpcom.
...these interfaces wrap primitive data types and derive from nsisupports.
Using XPCOM Utilities to Make Things Easier
for weblock, where the string classes need to be only wrappers around already existing string data, trading advanced functionality for a much smaller footprint is the right way to go.
...when you pass them to a getter, you must do something special, however: you must wrap the variable with the function getter_addrefs, as in the example above.
Interfacing with the XPCOM cycle collector
//if your class is a wrapper cache: //ns_impl_cycle_collection_unlink_preserved_wrapper tmp->msomeobj = nullptr; ns_impl_cycle_collection_unlink_end in the destructor, you should call mozilla::dropjsobjects(this); in your traverse method you need to list members involved in the cycle collector, i-e no js objects: ns_impl_cycle_collection_traverse_begin(nsfoo) ...
...ns_impl_cycle_collection_traverse_end finally, you need to manually add the js object to the trace method: ns_impl_cycle_collection_trace_begin(nsfoo) //if your class is a wrapper cache: //ns_impl_cycle_collection_trace_preserved_wrapper ns_impl_cycle_collection_trace_js_member_callback(msomeobj) ns_impl_cycle_collection_trace_end note that if your class is a wrapper cache then you likely have generate code that uses ns_impl_cycle_collection_wrappercache_# macro instead of ns_impl_cycle_collection_#.
Components.Constructor
for example: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsisupports]" try { // someinputstream is an existing nsiinputstream // throws because bis hasn't been qi'd to nsibinaryinputstream bis.setinputstream(someinputstream); } catch (e) { bis.queryinterface(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // succeeds now } if two arguments are given, the created instance will be nsisupports.queryinterfa...
...ce()'d to the xpcom interface whose name is the second argument: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsibinaryinputstream]" // someinputstream is an existing nsiinputstream bis.setinputstream(someinputstream); // succeeds if three arguments are given, then in addition to being nsisupports.queryinterface()'d, the instance will also have had an initialization method called on it.
Components.utils.Sandbox
in situations where only unidirectional protection is needed, callers have the option to waive the x-ray behavior using wrappedjsobject or xpcnativewrapper.unwrap().
... in general, when accessing same-origin content, script gets a transparent wrapper rather than an xray wrapper.
Components.utils.cloneInto
wrapreflectors: a boolean value that determines if objects reflected from c++, such as dom objects, should be cloned.
...if you pass the {wrapreflectors:true} flag, then the object you clone is allowed to contain these objects: // add-on script var addonscriptobject = { body: contentwindow.document.body }; contentwindow.addonscriptobject = cloneinto(addonscriptobject, contentwindow, {wrapreflectors: true}); // page script var test = document.getel...
Components.utils.unwaiveXrays
the chrome code can then use unwaivexrays to restore xray protection: // chrome code // contentwindow is an xray var isxray = components.utils.isxraywrapper(gbrowser.contentwindow); // true // expandos are not visible in xrays var foo = gbrowser.contentwindow.foo; // undefined // you can waive xray vision for an object var waived = components.utils.waivexrays(gbrowser.contentwindow); isxray = components.utils.isxraywrapper(waived); // false foo = waived.foo; ...
... // "i'm an expando" // waiving is transitive isxray = components.utils.isxraywrapper(waived.document); // false // use unwaivexrays to undo the waiver var unwaived = components.utils.unwaivexrays(waived); isxray = components.utils.isxraywrapper(unwaived); // true foo = unwaived.foo; // undefined // unwaiving is transitive isxray = components.utils.isxraywrapper(unwaived.document); // true ...
Components object
serves the same purpose as xpcnativewrapper.
... utils.makeobjectpropsnormal ensures that all functions come from the specified object's scope, and aren't cross-compartment wrappers.
mozIStorageFunction
mozistoragevaluearray wraps an array of sql values, such as a result row.
... mozistoragestatementwrapper storage statement wrapper ...
mozIStorageProgressHandler
mozistoragevaluearray wraps an array of sql values, such as a result row.
...mozistoragestatementwrapper storage statement wrapper ...
nsIAppShellService
set to ns_sizetocontent to force the window to wrap to its contents.
...set to ns_sizetocontent to force the window to wrap to its contents.
nsIEditor
n astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); selected content removal void deleteselection(in short action, in short stripwrappers); document info and file methods void resetmodificationcount(); long getmodificationcount(); void incrementmodificationcount(in long amodcount); void incrementmodificationcount(in long amodcount); transaction methods void dotransaction(in nsitransaction txn); void enableundo(in boolean enable); void undo(in unsig...
... direction controller void switchtextdirection(); output methods astring outputtostring(in astring formattype, in unsigned long flags); example: // flags are declared in base/public/nsidocumentencoder.idl // outputselectiononly = 1, outputformatted = 2, // outputraw = 4, outputbodyonly = 8, // outputpreformatted = 16, outputwrap = 32, // outputformatflowed = 64, outputabsolutelinks = 258, // outputencodew3centities = 256, outputcrlinebreak = 512, // outputlflinebreak = 1024, outputnoscriptcontent = 2048, // outputnoframescontent = 4096, outputnoformattinginpre = 8192, // outputencodebasicentities=16384, outputencodelatin1entities=32768, // outputencodehtmlentities=65536, outputpersistnbsp=131072 edi...
nsIScriptableIO
this mode is generally used as a wrapper for other streams.
...this mode is generally used as a wrapper for other streams.
nsIScriptableInputStream
init() wrap the given nsiinputstream with this nsiscriptableinputstream.
...void init( in nsiinputstream ainputstream ); parameters ainputstream the nsiinputstream to be wrapped.
nsISelectionPrivate
void startbatchchanges(); wstring tostringwithformat(in string formattype, in unsigned long flags, in print32 wrapcolumn); attributes attribute type description cancacheframeoffset boolean frame offset cache can be used just during calling nseditor::endplaceholdertransaction.
... tostringwithformat() wstring tostringwithformat( in string formattype, in unsigned long flags, in print32 wrapcolumn ); parameters formattype flags wrapcolumn return value ...
nsISyncMessageSender
this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
... this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
nsITXTToHTMLConv
methods preformathtml() specifies whether or not to wrap the resulting html in an <pre> block.
... void preformathtml( in boolean value ); parameters value true to wrap the resulting html in a <pre> block.
XPCOM Interface Reference
gregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoordinatetypensiaccessibledocumentnsiaccessibleeditabletextnsiaccessibleeventnsiaccessiblehyperlinknsiac...
...zilla_2_0nsiapplicationcachensiapplicationcachechannelnsiapplicationcachecontainernsiapplicationcachenamespacensiapplicationcacheservicensiapplicationupdateservicensiarraynsiasyncinputstreamnsiasyncoutputstreamnsiasyncstreamcopiernsiasyncverifyredirectcallbacknsiauthinformationnsiauthmodulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovidernsiauthpromptwrappernsiautocompletecontrollernsiautocompleteinputnsiautocompleteitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeyboardnsibinaryinputstreamnsibinaryoutputstreamnsiblocklistpromptnsiblocklistservicensiboxobjectnsibrowserboxobjectnsibrowserhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentry...
Getting Started Guide
in this case, you wrap the nscomptr with getter_addrefs (see comparison 4).
... you can tell nscomptr it doesn't need to addref the new value on assignment by wrapping the new value in dont_addref.
Xray vision
to waive xray vision for an object you can use components.utils.waivexrays(object), or use the object's wrappedjsobject property: // chrome code var waivedwindow = components.utils.waivexrays(gbrowser.contentwindow); var transfer = waivedwindow.confirm("transfer all my money?"); // calls the redefined implementation // chrome code var waivedwindow = gbrowser.contentwindow.wrappedjsobject; var transfer = waivedwindow.confirm("transfer all my money?"); // calls the redefined implementation waivers ar...
...for example, window.wrappedjsobject.document gets you the waived version of document.
Migrating from Firebug - Firefox Developer Tools
both tools allow to display wrapped event listeners (e.g.
... listeners wrapped in jquery functions).
AesCtrParams - Web APIs
the aesctrparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-ctr algorithm.
...the counter must be big enough that it doesn't wrap: if the message is n blocks and the counter is m bits long, then the following must be true: n <= 2m.
Document.execCommand() - Web APIs
formatblock adds an html block-level element around the line containing the current selection, replacing the block element containing the line if one exists (in firefox, <blockquote> is the exception — it will wrap any containing block element).
...(internet explorer and edge support only heading tags h1–h6, address, and pre, which must be wrapped in angle brackets, such as "<h1>".) forwarddelete deletes the character ahead of the cursor's position, identical to hitting the delete key on a windows keyboard.
Element: overflow event - Web APIs
bubbles yes cancelable yes interface uievent event handler property unknown examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getelementbyid("wr...
...apper"), child = document.getelementbyid("child"), toggle = document.getelementbyid("toggle"); wrapper.addeventlistener("overflow", function( event ) { console.log( event ); }, false); wrapper.addeventlistener("underflow", function( event ) { console.log( event ); }, false); toggle.addeventlistener("change", function( event ) { if ( event.target.checked ) { child.style.width = "40px"; child.style.height = "40px"; } else { child.style.width = "10px"; child.style.height = "10px"; } }, false); </script> specifications not part of any specification.
Element: underflow event - Web APIs
bubbles yes cancelable yes interface uievent event handler property unknown examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getelementbyid("wr...
...apper"), child = document.getelementbyid("child"), toggle = document.getelementbyid("toggle"); wrapper.addeventlistener("overflow", function( event ) { console.log( event ); }, false); wrapper.addeventlistener("underflow", function( event ) { console.log( event ); }, false); toggle.addeventlistener("change", function( event ) { if ( event.target.checked ) { child.style.width = "40px"; child.style.height = "40px"; } else { child.style.width = "10px"; child.style.height = "10px"; } }, false); </script> specifications not part of any specification.
HTMLTableCellElement - Web APIs
htmltablecellelement.nowrap a boolean value reflecting the nowrap attribute and indicating if cell content can be broken in several lines.
... recommendation the following properties have been obsoleted: align, axis, bgcolor, height, width, ch, choff, nowrap, and valign.
HTMLTextAreaElement - Web APIs
wrap string: returns / sets the wrap html attribute, indicating how the control wraps text.
... the following attributes have been added: autofocus, placeholder, dirname, wrap, maxlength, required, textlength, labels, selectionstart, selectionend, selectiondirection, validity, validationmessage, and willvalidate.
Using the MediaStream Recording API - Web APIs
e other elements and therefore be focusable/clickable: label { font-family: 'notocoloremoji'; font-size: 3rem; position: absolute; top: 2px; right: 3px; z-index: 5; cursor: pointer; } then we hide the actual checkbox, because we don't want it cluttering up our ui: input[type=checkbox] { position: absolute; top: -100px; } next, we style the information screen (wrapped in an <aside> element) how we want it, give it fixed position so that it doesn't appear in the layout flow and affect the main ui, transform it to the position we want it to sit in by default, and give it a transition for smooth showing/hiding: aside { position: fixed; top: 0; left: 0; text-shadow: 1px 1px 1px black; width: 100%; height: 100%; transform: translatex(100%);...
... ( // constraints - only audio needed for this app { audio: true }) // success callback .then(function(stream) { }) // error callback .catch(function(err) { console.log('the following getusermedia error occured: ' + err); } ); } else { console.log('getusermedia not supported on your browser!'); } the whole thing is wrapped in a test that checks whether getusermedia is supported before running anything else.
Capabilities, constraints, and settings - Web APIs
below all of that, you'll see the video itself.</p> <p>click the "start" button to begin.</p> <h3>constrainable properties available:</h3> <ul id="supportedconstraints"> </ul> <div id="startbutton" class="button"> start </div> <div class="wrapper"> <div class="trackrow"> <div class="leftside"> <h3>requested video constraints:</h3> <textarea id="videoconstrainteditor" cols=32 rows=8></textarea> </div> <div class="rightside"> <h3>actual video settings:</h3> <textarea id="videosettingstext" cols=32 rows=8 disabled></textarea> </div> </div> <div class="trackrow"> <div class="leftside"> ...
...on" id="stopbutton"> stop video </div> <div id="log"> </div> css content body { font: 14px "open sans", "arial", sans-serif; } video { margin-top: 20px; border: 1px solid black; } .button { cursor: pointer; width: 150px; border: 1px solid black; font-size: 16px; text-align: center; padding-top: 2px; padding-bottom: 4px; color: white; background-color: darkgreen; } .wrapper { margin-bottom: 10px; width: 600px; } .trackrow { height: 200px; } .leftside { float: left; width: calc(calc(100%/2) - 10px); } .rightside { float: right; width: calc(calc(100%/2) - 10px); } textarea { padding: 8px; } h3 { margin-bottom: 3px; } #supportedconstraints { column-count: 2; -moz-column-count: 2; } #log { padding-top: 10px; } javascript content now l...
Animating textures in WebGL - Web APIs
evel = 0; const internalformat = gl.rgba; const width = 1; const height = 1; const border = 0; const srcformat = gl.rgba; const srctype = gl.unsigned_byte; const pixel = new uint8array([0, 0, 255, 255]); // opaque blue gl.teximage2d(gl.texture_2d, level, internalformat, width, height, border, srcformat, srctype, pixel); // turn off mips and set wrapping to clamp to edge so it // will work regardless of the dimensions of the video.
... gl.texparameteri(gl.texture_2d, gl.texture_wrap_s, gl.clamp_to_edge); gl.texparameteri(gl.texture_2d, gl.texture_wrap_t, gl.clamp_to_edge); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); return texture; } here's what the updatetexture() function looks like; this is where the real work is done: function updatetexture(gl, texture, video) { const level = 0; const internalformat = gl.rgba; const srcformat = gl.rgba; const srctype = gl.unsigned_byte; gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, level, internalformat, srcformat, srctype, video); } you've seen this code before.
Taking still photos with WebRTC - Web APIs
initialization we start by wrapping the whole script in an anonymous function to avoid global variables, then setting up various variables we'll be using.
... wrapping up the startup() method there are only two more lines of code in the startup() method: clearphoto(); } this is where we call the clearphoto() method we'll describe below in the section clearing the photo box.
Example and tutorial: Simple synth keyboard - Web APIs
we draw this in a pair of nested <div> elements so that we can make the keyboard horizontally scrollable if all the keys don't fit on the screen, without having them wrap around.
... name="waveform"> <option value="sine">sine</option> <option value="square" selected>square</option> <option value="sawtooth">sawtooth</option> <option value="triangle">triangle</option> <option value="custom">custom</option> </select> </div> </div> css .container { overflow-x: scroll; overflow-y: hidden; width: 660px; height: 110px; white-space: nowrap; margin: 10px; } .keyboard { width: auto; padding: 0; margin: 0; } .key { cursor: pointer; font: 16px "open sans", "lucida grande", "arial", sans-serif; border: 1px solid black; border-radius: 5px; width: 20px; height: 80px; text-align: center; box-shadow: 2px 2px darkgray; display: inline-block; position: relative; margin-right: 3px; user-select: none; -moz-us...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
settimeout.call(myarray, myarray.mymethod, 2.0*1000); // error: "ns_error_xpc_bad_op_on_wn_proto: illegal operation on wrappednative prototype object" settimeout.call(myarray, myarray.mymethod, 2.5*1000, 2); // same error possible solutions a common way to solve the problem is to use a wrapper function that sets this to the required value: settimeout(function(){myarray.mymethod()}, 2.0*1000); // prints "zero,one,two" after 2 seconds settimeout(function(){myarray.mymethod('1')}, 2.5*1000); // prints "one" after 2.5...
...this can avoid having to use a wrapper function to set the value of this in a callback.
ARIA: Comment role - Accessibility
the related comment is marked up using an html structure wrapped with a <div> containing role="comment".
...="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details attribute, the value of which should be the id of the comment.
ARIA: form role - Accessibility
it should be declared on the html element that wraps the form elements.
... ideally, use the <form> element as the wrapping element and do not declare role="form".
ARIA: Mark role - Accessibility
<span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> the related comment is marked up using an html structure wrapped with a <div> containing role="comment".
... to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details attribute, the value of which should be the id of the comment.
ARIA: Suggestion role - Accessibility
this should be used on an element that wraps an element with an insertion role, and one with a deletion role.
...this is the job of role="suggestion", which should be set on an element wrapping both of them like so: <p>freida’s pet is a <span role="suggestion"> <span role="deletion">black cat called luna</span> <span role="insertion">purple tyrannosaurus rex called tiny</span> </span>.
Using feature queries - CSS: Cascading Style Sheets
an alternate way to write the above code is to wrap all of the grid code in a feature query as follows.
...as you can wrap up the css for supporting browsers, you do not run the risk of styles used for the fallback display leaking through, as shown in our grid example above.
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
if you have a wrapped multiple-line flex container then you might also want to use the align-content property to control the distribution of space between the rows.
...flex-start will then change to the end of that axis — so to the location where your lines would wrap if working in rows, or at the end of your last paragraph of text in the block direction.
CSS Flexible Box Layout - CSS: Cascading Style Sheets
reference css properties flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap order alignment properties the properties align-content, align-self, align-items and justify-content initially appeared in the flexbox specification, but are now defined in box alignment.
... mastering wrapping of flex items how to create flex containers with multiple lines and control the display of the items in those lines.
CSS Grid Layout - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid rgb(233,171,88); border-radius: 5px; background-color: rgba(233,171,88,.5); padding: 1em; color: #d9480f; } html <div class="wrapper"> <div class="one">one</div> <div class="two">two</div> <div class="three">three</div> <div class="four">four</div> <div class="five">five</div> <div class="six...
...">six</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; grid-auto-rows: minmax(100px, auto); } .one { grid-column: 1 / 3; grid-row: 1; } .two { grid-column: 2 / 4; grid-row: 1 / 3; } .three { grid-column: 1; grid-row: 2 / 5; } .four { grid-column: 3; grid-row: 3; } .five { grid-column: 2; grid-row: 4; } .six { grid-column: 3; grid-row: 4; } reference css properties grid-template-columns grid-template-rows grid-template-areas grid-template grid-auto-columns grid-auto-rows grid-auto-flow grid grid-row-start grid-column-start grid-row-end grid-column-end grid-row grid-column grid-area row-gap column-gap gap css functions repeat() minmax() fit-content() css data types <flex> ...
Consistent list indentation - CSS: Cascading Style Sheets
now we wrap these in a parent element; in this case, we'll wrap them in an unordered list (i.e., <ul>).
...since we have no padding for the <ul> element, its content wraps snugly around the three list items.
Column layouts - CSS: Cascading Style Sheets
download this example flexbox can also be used to create layouts where the flex items wrap onto new rows, by setting the flex-wrap property on the container to wrap.
... when you are happy for wrapped items to share out space along their line only and not line up with items in other lines.
Linear-gradient Generator - CSS: Cascading Style Sheets
ont-size: 13px; overflow: hidden; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text; } #output .css-property { width: 90%; margin: 5px 5%; color: #777; position: relative; float: left; } #output .property { height: 100%; width: 12%; position: absolute; left: 0; } #output .value { width: 88%; position: absolute; white-space: pre; word-wrap: break-word; display: block; right: 0; } javascript content var uicolorpicker = (function uicolorpicker() { 'use strict'; function getelembyid(id) { return document.getelementbyid(id); } var subscribers = []; var pickers = []; /** * rgba color class * * hsv/hsb and hsl (hue, saturation, value / brightness, lightness) * @param hue 0-360 * @param saturation 0-100 * ...
...= document.createelement('div'); var preview_color = document.createelement('div'); preview_box.classname = 'preview'; preview_color.classname = 'preview-color'; this.preview_color = preview_color; preview_box.appendchild(preview_color); this.node.appendchild(preview_box); }; colorpicker.prototype.newinputcomponent = function newinputcomponent(title, topic, onchangefunc) { var wrapper = document.createelement('div'); var input = document.createelement('input'); var info = document.createelement('span'); wrapper.classname = 'input'; wrapper.setattribute('data-topic', topic); info.textcontent = title; info.classname = 'name'; input.setattribute('type', 'text'); wrapper.appendchild(info); wrapper.appendchild(input); this.node.appendchild(wrapper); inpu...
WebKit CSS extensions - CSS: Cascading Style Sheets
-webkit-clip-path -webkit-column-count -webkit-column-fill -webkit-column-gap -webkit-column-rule -webkit-column-rule-color -webkit-column-rule-style -webkit-column-rule-width -webkit-column-span -webkit-column-width -webkit-columns f -webkit-filter -webkit-flex -webkit-flex-basis -webkit-flex-direction -webkit-flex-flow -webkit-flex-grow -webkit-flex-shrink -webkit-flex-wrap -webkit-font-feature-settings -webkit-font-kerning -webkit-font-variant-ligatures g-j -webkit-grid -webkit-grid-area -webkit-grid-auto-columns -webkit-grid-auto-flow -webkit-grid-auto-rows -webkit-grid-column -webkit-grid-column-end -webkit-grid-column-gap -webkit-grid-column-start -webkit-grid-gap -webkit-grid-row -webkit-grid-row-end -webkit-grid-row-gap -webkit-grid-row-st...
...r-radius -webkit-box-align**, *** -webkit-box-direction**, *** -webkit-box-flex**, *** -webkit-box-orient**, *** -webkit-box-pack**, *** -webkit-box-shadow -webkit-box-sizing -webkit-border-top-left-radius -webkit-border-top-right-radius f -webkit-filter -webkit-flex -webkit-flex-basis -webkit-flex-direction -webkit-flex-flow -webkit-flex-grow -webkit-flex-shrink -webkit-flex-wrap j -webkit-justify-content m -webkit-mask -webkit-mask-clip -webkit-mask-composite* -webkit-mask-image -webkit-mask-origin -webkit-mask-position -webkit-mask-position-x** -webkit-mask-position-y** -webkit-mask-repeat -webkit-mask-size o-p -webkit-order -webkit-perspective -webkit-perspective-origin t -webkit-text-fill-color** -webkit-text-size-adjust -webkit-text-s...
align-content - CSS: Cascading Style Sheets
ones with flex-wrap: nowrap).
...baseline<content-distribution> = space-between | space-around | space-evenly | stretch<overflow-position> = unsafe | safe<content-position> = center | start | end | flex-start | flex-end examples css #container { height:200px; width: 240px; align-content: center; /* can be changed in the live sample */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } div > div { box-sizing: border-box; border: 2px solid #8c8c8c; width: 50px; display: flex; align-items: center; justify-content: center; } #item1 { background-color: #8cffa0; min-height: 30px; } #item2 { background-color: #a0c8ff; min-height: 50px; } #item3 { background-color: #ffa08c;...
border-image-slice - CSS: Cascading Style Sheets
html <div class="wrapper"> <div></div> </div> <ul> <li> <label for="width">slide to adjust <code>border-width</code></label> <input type="range" min="10" max="45" id="width"> <output id="width-output">30px</output> </li> <li> <label for="slice">slide to adjust <code>border-image-slice</code></label> <input type="range" min="10" max="45" id="slice"> <output id="slice-output">30</output>...
... </li> </ul> css .wrapper { width: 400px; height: 300px; } div > div { width: 300px; height: 200px; border-width: 30px; border-style: solid; border-image: url(https://udn.realityripple.com/samples/56/bb98f533ef.png); border-image-slice: 30; border-image-repeat: round; } li { display: flex; place-content: center; } javascript const widthslider = document.getelementbyid('width'); const sliceslider = document.getelementbyid('slice'); const widthoutput = document.getelementbyid('width-output'); const sliceoutput = document.getelementbyid('slice-output'); const divelem = document.queryselector('div > div'); widthslider.addeventlistener('input', () => { const newvalue = widthslider.value + 'px'; divelem.style.borderwidth = newvalue; widthoutput.textcontent = newv...
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
formal definition initial valuesingleapplies tobox elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax single | multiple examples simple usage example in the original version of the spec, box-lines allowed you to specify that you wanted your flex container's children to wrap onto multiple lines.
... div { display: box; box-orient: horizontal; box-lines: multiple; } the modern flexbox equivalent is flex-wrap.
float - CSS: Cascading Style Sheets
WebCSSfloat
the float css property places an element on the left or right side of its container, allowing text and inline elements to wrap around it.
...additional squares would continue to stack to the right, until they filled the containing box, after which they would wrap to the next line.
grid-column-end - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting column end for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; ...
... grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-column-end' in that specification.
grid-column-start - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting column start for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; ...
... grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-column-start' in that specification.
grid-row-end - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting row end for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; ...
... grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-row-end' in that specification.
grid-row-start - CSS: Cascading Style Sheets
] | [ span && [ <integer> | <custom-ident> ] ] examples setting row start for a grid item html <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> <div class="box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; ...
... grid-row-start: 3; grid-row-end: 5; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-row-start' in that specification.
left - CSS: Cascading Style Sheets
WebCSSleft
nition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the width of the containing blockcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples positioning elements html <div id="wrap"> <div id="example_1"> <pre> position: absolute; left: 20px; top: 20px; </pre> <p>the only containing element for this div is the main window, so it positions itself in relation to it.</p> </div> <div id="example_2"> <pre> position: relative; top: 0; right: 0; </pre> <p>relative position in relation to its siblings.</p> </div> ...
...e> position: absolute; bottom: 10px; right: 20px; </pre> <p>absolute position inside of a parent with relative position</p> </div> <div id="example_5"> <pre> position: absolute; right: 0; left: 0; top: 200px; </pre> <p>absolute position with both left and right declared</p> </div> </div> </div> css #wrap { width: 700px; margin: 0 auto; background: #5c5c5c; } pre { white-space: pre; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; } #example_1 { width: 200px; height: 200px; position: absolute; left: 20px; top: 20px; background-color: #d8f5ff; } #example_2 { width: 200px; height: 200px; position: relative; top: 0; right: 0; background-col...
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
this is necessary for technical reasons — if a float intersected with the scrolling element it would forcibly rewrap the content after each scroll step, leading to a slow scrolling experience.
... in order for overflow to have an effect, the block-level container must have either a set height (height or max-height) or white-space set to nowrap.
position - CSS: Cascading Style Sheets
WebCSSposition
overflowing inline elements <span>wrap onto a new line if possible — like this one containing text</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> css body { width: 500px; margin: 0 auto; } p { background: aqua; border: 3px solid blue; padding: 10px; margin: 10px; } span { background: red; border: 1px solid black; } ...
...dding: 24px 0 0 0; } dt { background: #b8c1c8; border-bottom: 1px solid #989ea4; border-top: 1px solid #717d85; color: #fff; font: bold 18px/21px helvetica, arial, sans-serif; margin: 0; padding: 2px 0 0 12px; position: -webkit-sticky; position: sticky; top: -1px; } dd { font: bold 20px/45px helvetica, arial, sans-serif; margin: 0; padding: 0 0 0 12px; white-space: nowrap; } dd + dd { border-top: 1px solid #ccc; } result specifications specification status comment css level 2 (revision 1)the definition of 'position' in that specification.
text-overflow - CSS: Cascading Style Sheets
for example: overflow: hidden; white-space: nowrap; the text-overflow property only affects content that is overflowing a block container element in its inline progression direction (not text overflowing at the bottom of a box, for example).
... formal definition initial valueclipapplies toblock container elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ clip | ellipsis | <string> ]{1,2} examples css p { width: 200px; border: 1px solid; padding: 2px 5px; /* both of the following are required for text-overflow */ white-space: nowrap; overflow: hidden; } .overflow-visible { white-space: initial; } .overflow-clip { text-overflow: clip; } .overflow-ellipsis { text-overflow: ellipsis; } .overflow-string { /* not supported in most browsers, see the 'browser compatibility' section below */ text-overflow: " [..]"; } html <p class="overflow-visible">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p...
transform-box - CSS: Cascading Style Sheets
the reference box of a <table> is the border box of its table wrapper box, not its table box.
...the reference box of a <table> is the border box of its table wrapper box, not its table box.
word-break - CSS: Cascading Style Sheets
break-word has the same effect as word-break: normal and overflow-wrap: anywhere, regardless of the actual value of the overflow-wrap property.
... note: in contrast to word-break: break-word and overflow-wrap: break-word (see overflow-wrap), word-break: break-all will create a break at the exact place where text would otherwise overflow its container (even if putting an entire word on its own line would negate the need for a break).
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
the <bdi> element is used to wrap a span of text and instructs the bidirectional algorithm to treat this text in isolation from its surroundings.
...the result will be garbled: 1 - embedded-textst place if you know the directionality of embedded-text in advance, you can fix this problem by wrapping embedded-text in a <span> with the dir attribute set to the known directionality.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
ccept as a valid input readonly a boolean attribute which, if present, indicates that the contents of the time input should not be user-editable step the stepping interval to use both for user interfaces purposes and during constraint validation unlike many data types, time values have a periodic domain, meaning that the values reach the highest possible value, then wrap back around to the beginning again.
... making min and max cross midnight by setting a min attribute greater than the max attribute, the valid time range will wrap around midnight to produce a valid time range which crosses midnight.
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
html <p>you can also create a new document using the keyboard shortcut <kbd><kbd>ctrl</kbd>+<kbd>n</kbd></kbd>.</p> this wraps the entire key sequence in an outer <kbd> element, then each individual key within its own, in order to denote the components of the sequence.
... note: you don't need to do all this wrapping; you can choose to simplify it by leaving out the external <kbd> element.
<nobr>: The Non-Breaking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnobr
the non-standard, obsolete html <nobr> element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.
...instead, use the css property white-space like this: <span style="white-space: nowrap;">long line with no breaks</span> ...
TypeError: can't access dead object - JavaScript
examples checking if an object is dead components.utils offers a isdeadwrapper() method, which privileged code might use.
... if (components.utils.isdeadwrapper(window)) { // dead } unprivileged code has no access to component.utils and might just be able catch the exception.
Object.assign() - JavaScript
} }); const copy = object.assign({}, obj); console.log(copy); // { baz: 3 } primitives will be wrapped to objects const v1 = 'abc'; const v2 = true; const v3 = 10; const v4 = symbol('foo'); const obj = object.assign({}, v1, null, v2, undefined, v3, v4); // primitives will be wrapped, null and undefined will be ignored.
... // note, only string wrappers can have own enumerable properties.
Promise.prototype.then() - JavaScript
in the following example, the first then() will return 42 wrapped in a resolving promise even though the previous promise in the chain was rejected.
... promise.reject() .then(() => 99, () => 42) // onrejected returns 42 which is wrapped in a resolving promise .then(solution => console.log('resolved with ' + solution)); // resolved with 42 in practice, it is often desirable to catch rejected promises rather than use then's two case syntax, as demonstrated below.
Symbol() constructor - JavaScript
it creates a new symbol each time: symbol('foo') === symbol('foo') // false new symbol(...) the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new number).
... if you really want to create a symbol wrapper object, you can use the object() function: let sym = symbol('foo'); let symobj = object(sym); typeof sym // => "symbol" typeof symobj // => "object" specifications specification ecmascript (ecma-262)the definition of 'symbol constructor' in that specification.
text-anchor - SVG: Scalable Vector Graphics
the text-anchor attribute is used to align (start-, middle- or end-alignment) a string of pre-formatted text or auto-wrapped text where the wrapping area is determined from the inline-size property relative to a given point.
... it is not applicable to other types of auto-wrapped text.
Using custom elements - Web Components
// create a shadow root this.attachshadow({mode: 'open'}); // sets and returns 'this.shadowroot' // create (nested) span elements const wrapper = document.createelement('span'); wrapper.setattribute('class','wrapper'); const icon = wrapper.appendchild(document.createelement('span')); icon.setattribute('class','icon'); icon.setattribute('tabindex', 0); // insert icon from defined attribute or default icon const img = icon.appendchild(document.createelement('img')); img.src = this.hasattribute('img') ?
... this.getattribute('img') : 'img/default.png'; const info = wrapper.appendchild(document.createelement('span')); info.setattribute('class','info'); // take attribute content and put it inside the info span info.textcontent = this.getattribute('data-text'); // create some css to apply to the shadow dom const style = document.createelement('style'); style.textcontent = '.wrapper {' + // css truncated for brevity // attach the created elements to the shadow dom this.shadowroot.append(style,wrapper); finally, we register our custom element on the customelementregistry using the define() method we mentioned earlier — in the parameters we specify the element name, and then the class name that defines its functionality: customelements.define('popup-info', popupinfo); it is now available to ...
widget - Archive of obsolete content
first, in the content script, change self to addon, and wrap it in a function: function init() { var play_button = document.getelementbyid("play-button"); play_button.onclick = function() { addon.port.emit("play"); } var pause_button = document.getelementbyid("pause-button"); pause_button.onclick = function() { addon.port.emit("pause"); } var stop_button = document.getelementbyid("stop-button"); stop_button.onclick = function() {...
content/loader - Archive of obsolete content
example: the following code creates a wrapper on a hidden frame that reloads a web page in the frame every time the contenturl property is changed: var hiddenframes = require("sdk/frame/hidden-frame"); var { loader } = require("sdk/content/content"); var pageloader = loader.compose({ constructor: function pageloader(options) { options = options || {}; if (options.contenturl) this.contenturl = options.contenturl; this.
Listening for Load and Unload - Archive of obsolete content
you can just place your add-on's code at the top level instead of wrapping it in a function assigned to exports.main().
Localization - Archive of obsolete content
wrap all references to localizable strings with the _() function.
Canvas code snippets - Archive of obsolete content
losepath', 'drawimage', 'fill', 'fillrect', 'filltext', 'lineto', 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadowoffsetx', 'shadowoffsety', 'shadowblur', 'shadowcolor', 'strokestyle', 'textalign', 'textb...
JavaScript Debugger Service - Archive of obsolete content
the list of filters // we exclude the scripts with the following filenames from being tracked jsd.appendfilter(createfilter("*/firefox/components/*")); jsd.appendfilter(createfilter("*/firefox/modules/*")); jsd.appendfilter(createfilter("xstringbundle")); jsd.appendfilter(createfilter("chrome://*")); jsd.appendfilter(createfilter("x-jsd:ppbuffer*")); jsd.appendfilter(createfilter("xpcsafejsobjectwrapper.cpp")); jsd.appendfilter(createfilter("file://*")); note that appendfilter adds the filter to the end of the list.
Post data to window - Archive of obsolete content
here is an example: var datastring = "name1=data1&name2=data2"; // post method requests must wrap the encoded text in a mime // stream const cc = components.classes; const ci = components.interfaces; var stringstream = cc["@mozilla.org/io/string-input-stream;1"].
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
you must explicitly wrap them in an appropriate dependent string.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
if you want to insert long strings that automatically wrap to the window’s width, you can use the flex attribute as shown in listing 14, which will automatically expand it; in this case you don't set the value using the value attribute, instead you should place it in the contents of the element.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
an xpconnect-wrapped nsiioservice message should appear.
Adding Events and Commands - Archive of obsolete content
since drag and drop is a complicated thing to manage, there are some high level wrappers that facilitate working with it.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
// wrap in an anonymous function (which is called immediately).
JavaScript Object Management - Archive of obsolete content
the general guideline we follow is this: whenever you have to set a callback function parameter, wrap it in an anonymous function.
Index of archived content - Archive of obsolete content
dehydra object reference installing dehydra using dehydra developing new mozilla features devmo 1.0 launch roadmap download manager improvements in firefox 3 download manager preferences drag and drop drag and drop example drag and drop javascript wrapper drag and drop events editor embedding guide embedding faq embedding mozilla in a java application using javaxpcom error console exception logging in javascript existing content extension frequently asked questions external cvs snapshots in mozilla-central fast graphics p...
List of Mozilla-Based Applications - Archive of obsolete content
midbrowser mobile web browser mockery mockup creation tool built on xulrunner mongodb database project uses spidermonkey moyura email client part of the khmeros linux distro mozcards, jolistopwatch, jolitimer simple apps for maemo uses xulrunner moznet .net control embeddable gecko for .net applications wraps xulrunner for use in .net applications my internet browser localized browser uses gecko myna application server javascript application server for java uses mozilla rhino nextcms (fr) cms nightingale music player community run effort to continue songbird support for linux olpc web browser browser oneteam jabb...
Drag and Drop Example - Archive of obsolete content
first, we'll add the wrapper scripts: <script src="chrome://global/content/nsdraganddrop.js"/> <script src="chrome://global/content/nstransferable.js"/> <script src="dragboard.js"/> an additional script file dragboard.js is included which will contain the code we will write ourselves.
Editor Embedding Guide - Archive of obsolete content
text is not wrapped by word.
Layout FAQ - Archive of obsolete content
block(body)(1)@035ff490 {120,120,8820,600} [state=00000010] sc=035ff264(i=2,b=0)< line 035ffc18: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:linebr[0x5100] {0,0,330,300} < inline(span)(0)@035ffa04 next=035ffc48 next-continuation=035ffc48 {0,7,330,285} [content=0359ed50] [sc=035ff990]< text(0)@035ffa8c[0,4,t] next=035ffb1c {0,0,330,285} [state=41600020] sc=035ffa3c pst=:-moz-non-element< "\nabc" > frame(br)(1)@035ffb1c {330,225,0,0} [state=00000020] [content=035aebf0] > > the ...
Style System Overview - Archive of obsolete content
[design flaw in frame/sc relationship] three functions for creating style contexts on nsistyleset, wrapped by similarly named ones on nsiprescontext: resolvestylecontextfor: for elements.
Code snippets - Archive of obsolete content
r.put(g); delete and restore a record components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); components.utils.import("resource://services-sync/record.js"); // for example: let id = "iasokuozpixz" let collection = "bookmarks"; let resource = new resource(weave.service.storageurl + collection + "/" + id); let del = new cryptowrapper(collection, id); del.deleted = true; del.encrypt(); // save the old value.
Creating a Help Content Pack - Archive of obsolete content
it serves as a wrapper around the entire contents of the file, marking it as rdf.
generateCRMFRequest() - Archive of obsolete content
this value specifies which kra certificate should be used to wrap the private key being escrowed.
Twitter - Archive of obsolete content
since jetpack's twitter library is a very thin wrapper around twitter's api, most everything there applies here, and not much applies here that doesn't apply there.
Mozilla Application Framework in Detail - Archive of obsolete content
flexible programming interfaces such as the web shell api, the java wrapper api and the gecko activex control make gecko easily embeddable into applications and devices.
Nanojit - Archive of obsolete content
then it wraps the lirbufwriter in zero or more other lirwriter objects, all of which implement the same interface as lirbufwriter.
RDF Datasource How-To - Archive of obsolete content
you may want to choose this implementation if your primary goal is to "wrap" a legacy data store.
String Quick Reference - Archive of obsolete content
note: may involve changing existing apis old way: wrap with nscautostring() // foo is a prunichar* string // call // void handlestring(const nsstring& str); handlestring(nsautostring(foo)); new way: wrap with nsdependentstring // foo is a prunichar* string // fix caller to be // void handlestring(const nsastring& str); handlestring(nsdependentstring(foo)); stack-based strings what: use of special stack-oriented classes why: to avoid excess heap...
Table Layout Strategy - Archive of obsolete content
so we specify it (this breaks in some other browsers) <col width="0*"><col><tbody></tbody>foobar <table border width="200px"> <col width="0*"><col> <tbody> <tr><td>foo</td><td>bar</td></tr> </tbody> </table> this shrink wrapping width has usually the suffix 0proportional effective columns <tbody></tbody>foobarbazzap <table width="200px" border> <tbody> <tr><td>foo</td><td colspan="2" width="120px">bar</td></tr> <tr><td>baz</td><td>zap</td></tr> </tbody> </table> the colspan here is bogus, so the third column should not get any width.
Actionscript Acceptance Tests - Archive of obsolete content
the test file can not be wrapped in a package or define classes as the file will be wrapped in a function when used in the ats.
The new nsString class implementation (1999) - Archive of obsolete content
sstrimpl& adest,pruint32 adestoffset,print32 thequadchar); static void delete(nsstrimpl& adest,pruint32 adestoffset,pruint32 acount); static void truncate(nsstrimpl& adest,pruint32 adestoffset); static print32 compare(const nsstrimpl& adest,const nsstrimpl& asource, print32 acount,prbool aignorecase); }; nsstring the nsstring class is still with us as a subclass (wrapper) of nsstrimpl.
Example Sticky Notes - Archive of obsolete content
="0.6" stroke="#ffffff" stroke-width="1px"> <svg:circle cx="25px" cy="12px" r="12" fill="#ff0000" transform="translate(0,0)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#00ff00" transform="translate(7,12)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#0000ff" transform="translate(-7,12)"/> </svg:g> </svg:svg> <children/> </content> <implementation> <!-- here and futher cdata wrappers around javascript code are not mandatory but recommended.
XML in Mozilla - Archive of obsolete content
o 1.9.1 w3c "proposal" xpointer framework obsolete since gecko 1.9.1 w3c recommendation xpointer element() scheme obsolete since gecko 1.9.1 w3c recommendation xpointer xmlns() scheme obsolete since gecko 1.9.1 w3c recommendation xpointer fixptr() scheme obsolete since gecko 1.9.1 this scheme is simply a wrapper for fixptr xpointer xpath1() scheme obsolete since gecko 1.9.1 internet-draft document.load(), document.async part of dom level 3 load & save module, a w3c working draft xhtml we have reasonable xhtml support, most things should work.
Windows stub installer - Archive of obsolete content
note that there are several macro strings--a macro name wrapped in dollar ($) signs--which may be used in the .jsts, including: $version$ which is replaced at packages time with the browser version.
gestalt - Archive of obsolete content
description the gestalt method is a wrapper for the gestalt function of the macintosh toolbox.
textbox.type - Archive of obsolete content
there are several attributes that allow the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.
Attribute (XUL) - Archive of obsolete content
opup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets template timeout title toolbarname tooltip tooltiptext tooltiptextnew top type uri useraction validate value var visuallyselected wait-cursor width windowtype wrap wraparound ...
Deprecated and defunct markup - Archive of obsolete content
er> (clickable tray in <scrollbar> which holds <thumb>; do not use alone) also used as part of <scale> --neil 03 march 2011 <spinner> (spinbox; <spinbuttons> with a textbox whereby spinning affects value in textbox; not usable) <spring> (use @flex instead) <strut> (replaced by @debug?) <tabcontrol> (contained tabbox and tabpanel) <text> (like <label> or <description> but does not wrap; like <label crop="end">; had been used in menus/toolbars) <textfield> (like <textbox>) <thumb> (<button> with deprecated <gripper>; implements sliding box in center of scrolbar) <title> (to add a caption on a <titledbox> <titledbox> (box with a frame) <titledbutton> (attempt to combine text and images before <button>) <toolbarpaletteitem> required to embed non-buttons in custom...
PopupKeys - Archive of obsolete content
the following table lists the keys that are checked, and what the menu keyboard listener does in response: cursor up/down move the highlight within the menu up or down, wrapping around if necessary.
contentWindow - Archive of obsolete content
« xul reference contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object ...
inputField - Archive of obsolete content
« xul reference inputfield type: textbox element in mozilla, the xul textbox is implemented as a wrapper around an html input element.
Property - Archive of obsolete content
ate statusbar statustext stringbundle strings style subject suppressonselect tabcontainer tabindex tabs tabscrolling tabpanels tag textlength textvalue timeout title toolbarname toolbarset tooltip tooltiptext top treeboxobject type uri useraction value valuenumber view webbrowserefind webnavigation webprogress width wizardpages wraparound year yearleadingzero related dom element properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild ...
Providing Command-Line Options - Archive of obsolete content
changeme: change "myapp" to your command line flag (no argument) if (cmdline.handleflag("myapp", false)) { openwindow(chrome_uri, null); cmdline.preventdefault = true; } }, // changeme: change the help info as appropriate, but // follow the guidelines in nsicommandlinehandler.idl // specifically, flag descriptions should start at // character 24, and lines should be wrapped at // 72 characters with embedded newlines, // and finally, the string should end with a newline helpinfo : " -myapp open my application\n" + " -viewapp <uri> view and edit the uri in my application,\n" + " wrapping this description\n" }; var nsgetfactory = xpcomutils.generatensgetfactory([commandlinehandler]); ...
Attribute Substitution - Archive of obsolete content
it may be desirable to have longer text wrap by placing it as the content of a description element.
The Joy of XUL - Archive of obsolete content
the library was initially integrated by writing an xpcom wrapper to adapt its interface.
Things I've tried to do with XUL - Archive of obsolete content
wrap the whole thing in a <vbox height="300"> or something.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
wrap elements other than <toolbarbutton> in <toolbaritem>.
Custom toolbar button - Archive of obsolete content
paste it into the new file: #custom-button-1, #wrapper-custom-button-1 {list-style-image: url("chrome://custombutton/content/button-1.png");} /* common style for all custom buttons */ .custombutton {-moz-image-region: rect( 0px 24px 24px 0px);} .custombutton:hover {-moz-image-region: rect(24px 24px 48px 0px);} [iconsize="small"] .custombutton {-moz-image-region: rect( 0px 40px 16px 24px);} [iconsize="small"] .custombutton:hover {-m...
Input Controls - Archive of obsolete content
example 2 : source view <textbox multiline="true" value="this is some text that could wrap onto multiple lines."/> like the html textarea, you can use the rows and cols attributes to set the size.
More Button Features - Archive of obsolete content
html elements will be ignored, so you need to wrap them inside a description element.
The Box Model - Archive of obsolete content
the elements will not wrap at all so the more elements you add, the wider the window will be.
XUL accessibility guidelines - Archive of obsolete content
for labels that may wrap to a second line, do not use the description element.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
button <button label="<!--button text-->" /> <button id="butwrap1"> <label control="butwrap1"> <!--wrapped label--> </label> </button> <button id='butwrap2'> <label control="butwrap2" value="<!--this-->" /> <label control="butwrap2" value="is" /> <label control="butwrap2" value="a" /> <label control="butwrap2" value="button" /> </button> <button image="images/img.xbm" tooltiptext="<!--button text-->"/> note that in the third ...
browser - Archive of obsolete content
contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object currenturi type: nsiuri this read-only property contains the currently loaded url.
editor - Archive of obsolete content
contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object docshell type: nsidocshell this read-only property contains the nsidocshell object for the document.
iframe - Archive of obsolete content
contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object docshell type: nsidocshell this read-only property contains the nsidocshell object for the document.
tabbrowser - Archive of obsolete content
contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object currenturi type: nsiuri this read-only property contains the currently loaded url.
toolbaritem - Archive of obsolete content
this element should wrap all customizable items (unless they're instances of toolbarbutton).
window - Archive of obsolete content
!-- icon from chrome --> <html:link rel="icon" href="chrome://myextension/content/path/to/favicon.png"/> <!-- from a remote site --> <html:link rel="icon" href="http://www.mozilla.org/favicon.ico"/> since firefox 3.6 the above listed code does not work correctly - it produces the following message: "warning: xul box for box element contained an inline link child, forcing all its children to be wrapped in a block".
XULRunner Hall of Fame - Archive of obsolete content
30b a xulrunner-based wrapper for 30boxes.com xul explorer "a lightweight xul ide...
XULRunner tips - Archive of obsolete content
tory unzip the package copy the following files: chrome/inspector.jar to the chrome directory of your xulrunner application components/inspector-cmdline.js to your components directory defaults/preferences/inspector.js to your preferences directory open your chrome.manifest file and add these lines: content inspector jar:inspector.jar!/content/inspector/ xpcnativewrappers=no locale inspector en-us jar:inspector.jar!/locale/inspector/ skin inspector modern/1.0 jar:inspector.jar!/skin/modern/inspector/ skin inspector classic/1.0 jar:inspector.jar!/skin/classic/inspector/ overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/dom/popupoverlay.xul overlay chrome://inspector/content...
nsIContentPolicy - Archive of obsolete content
[javascript implementations only] access properties of any sort on any object without using xpcnativewrapper (either explicitly or implicitly).
xbDesignMode.js - Archive of obsolete content
* * contributor(s): doron rosenberg <doron@netscape.com> (original author) * * * * ***** end license block ***** */ /* xbdesignmode a javascript wrapper for browsers that support designmode */ function xbdesignmode(aiframe){ this.meditordocument = null; this.miframeelement = null; // argument is a string, therefore an id if ( (typeof(aiframe) == "string") && (document.getelementbyid(aiframe).tagname.tolowercase()=="iframe") ){ this.miframeelement = document.getelementbyid(aiframe); } else if( (typeof(aiframe)=="object") && (a...
Gecko Compatibility Handbook - Archive of obsolete content
in older browsers, this results in the td cell tightly wrapping around the input element.
Introduction to Public-Key Cryptography - Archive of obsolete content
object signing uses standard techniques of public-key cryptography to let users get reliable information about code they download in much the same way they can get reliable information about shrink-wrapped software.
CSS - Archive of obsolete content
ArchiveWebCSS
property is a microsoft extension that specifies the color of the track element of a scrollbar.-ms-text-autospacethe -ms-text-autospace css property is a microsoft extension that specifies the autospacing and narrow space width adjustment of text.-ms-touch-selectthe -ms-touch-select css property is a microsoft extension that toggles the gripper visual elements that enable touch text selection.-ms-wrap-flowthe -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact inline content within block-level elements.-ms-wrap-marginthe -ms-wrap-margin css property is a microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes.-ms-wrap-throughthe -ms-wrap-through css property is a microsoft extension that specifies how content should w...
Processing XML with E4X - Archive of obsolete content
variables and expressions can be used to create attribute values by simply wrapping them with braces ({}) and omitting quotation marks that would normally go around an attribute value, as the following example illustrates: var a = 2; var b = <foo bar={a}>"hi"</foo>; upon execution the variable is evaluated and quotes are automatically added where appropriate.
Archived JavaScript Reference - Archive of obsolete content
stead.reflect.enumerate()the static reflect.enumerate() method used to return an iterator with the enumerable own and inherited properties of the target object, but has been removed in ecmascript 2016 and is deprecated in browsers.string.prototype.quote()the non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").
LiveConnect Reference - Archive of obsolete content
javascript objects are wrapped in an instance of the class jsobject and passed to java, allowing java to manipulate javascript objects.
JavaClass - Archive of obsolete content
backward compatibility javascript 1.3 and earlier you must create a wrapper around an instance of java.lang.class before you pass it as a parameter to a java method -- javaclass objects are not automatically converted to instances of java.lang.class.
Writing JavaScript for XHTML - Archive of obsolete content
again, you will have to write your own wrapper to respect any given combination of mime type and browser.
XQuery - Archive of obsolete content
notes for developers wishing to access xquery in their own extensions at present, the extension works simply by using liveconnect to work with berkeley db xml's java api (and via a java wrapper class which circumvents liveconnect's current inability to handle some types of java exceptions properly).
XUL Parser in Python - Archive of obsolete content
it's really just a wrapper around python's xmllib xml parser, but i had to sort of fool around with it.
Game distribution - Game development
saying this, desktop platforms can be used for distribution quite easily with the availability of wrappers that can help you prepare native builds of your game see packaging games.
Building up a basic demo with the PlayCanvas engine - Game development
we're wrapping the y scale value in math.abs to pass the absolute values (greater or equal to 0); sin varies between -1 and 0, and for negative values the cylinder scaling can render unexpectedly (in this case it looks black half the time.) now onto the movement part.
Square tilemaps implementation: Static maps - Game development
in this case, we need to map the column and row to an array index: var index = row * map.cols + column; wrapping up, an example of a tilemap object could look like the following.
Cross Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex-wrap flex-direction flex further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: mastering wrapping of flex items ...
Flex Container - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items flex flex-direction flex-flow flex-wrap justify-content further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: mastering wrapping of flex items ...
Grid - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 100px 100px; } <div class="wrapper"> <div>one</div> <div>two</d...
Grid Cell - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3,1fr); grid-auto-rows: 100px; } <div class="wrapper"> <div>one</div> <div>two</div> <...
Grid Tracks - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: 200px 1fr 3fr; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>f...
Gutters - MDN Web Docs Glossary: Definitions of Web-related terms
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #fff8f8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3,1.2fr); grid-auto-rows: 45%; grid-column-gap: 20px; grid-row-gap: 20px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
semantics in html in html, for example, the <h1> element is a semantic element, which gives the text it wraps around the role (or meaning) of "a top level heading on your page." <h1>this is a top level heading</h1> by default, most browser's user agent stylesheet will style an <h1> with a large font size to make it look like a heading (although you could style it to look like anything you wanted).
String - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, a string is one of the primitive values and the string object is a wrapper around a string primitive.
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
specification xlink 1.0 xlink 1.1 (currently a working draft) see also xml in mozilla code snippets:getattributens - a wrapper for dealing with some browsers not supporting this dom method code snippets:xml:base function - a rough attempt to find a full xlink-based on an xlink:href attribute (or <xi:include href=>) and its or an ancestor's xml:base.
MDN Web Docs Glossary: Definitions of Web-related terms
ort voip w w3c wai wcag web performance web server web standards webassembly webdav webextensions webgl webidl webkit webm webp webrtc websockets webvtt whatwg whitespace world wide web wrapper x xforms xhr (xmlhttprequest) xhtml xinclude xlink xml xpath xquery xslt other 404 502 alpn at-rule attack byte-order mark character set client cryptosystem debug digital signa...
Assessment: Accessibility troubleshooting - Learn web development
the navigation menu part of the site (wrapped in <div class="nav"></div>) could be made more accessible by putting it in a proper html5 semantic element.
CSS and JavaScript accessibility best practices - Learn web development
emphasised text inline markup that confers specific emphasis to the text that it wraps: <p>the water is <em>very hot</em>.</p> <p>water droplets collecting on surfaces is called <strong>condensation</strong>.</p> you might want to add some simple coloring to your emphasised text: strong, em { color: #a60000; } you will however rarely need to style emphasis elements in any significant way.
HTML: A good basis for accessibility - Learn web development
another consideration when creating layouts is using html5 semantic elements as seen in the above example (see content sectioning) — you can create a layout using only nested <div> elements, but it is better to use appropriate sectioning elements to wrap your main navigation (<nav>), footer (<footer>), repeating content units (<article>), etc.
HTML: A good basis for accessibility - Learn web development
another consideration when creating layouts is using html5 semantic elements as seen in the above example (see content sectioning) — you can create a layout using only nested <div> elements, but it is better to use appropriate sectioning elements to wrap your main navigation (<nav>), footer (<footer>), repeating content units (<article>), etc.
Test your skills: HTML accessibility - Learn web development
assume that these inputs will be part of a larger form, and wrap them in an element that associates them all together as a single related group.
Advanced styling effects - Learn web development
the css shapes specification enables the wrapping of text around a non-rectangular shape.
Debugging CSS - Learn web development
in our example file there are two words that have been wrapped in an <em> element.
Handling different text directions - Learn web development
for example, you can float an image left to cause text to wrap round the image.
Images, media, and form elements - Learn web development
n when styling particular controls button, input, select, textarea { box-sizing: border-box; padding: 0; margin: 0; } other useful settings in addition to the rules mentioned above, you should also set overflow: auto on <textarea>s to stop ie showing a scrollbar when there is no need for one: textarea { overflow: auto; } putting it all together into a "reset" as a final step, we can wrap up the various properties discussed above into the following "form reset" to provide a consistent base to work from.
Organizing your CSS - Learn web development
wrapping up this is the final part of our learning css guide, and as you can see there are many ways in which your exploration of css can continue from this point.
Overflowing content - Learn web development
if you have a long word in a small box, you might consider using the word-break or overflow-wrap properties.
Test your skills: Selectors - Learn web development
cause text wrapped in a span to have a font-size of 200%.
CSS selectors - Learn web development
for example, ::first-line always selects the first line of text inside an element (a <p> in the below case), acting as if a <span> was wrapped around the first formatted line and then selected.
Test your skills: floats - Learn web development
the box wrapping the float and text is displaying behind the float.
Test Your Skills: Fundamental layout comprehension - Learn web development
the image that is inside the article should have text wrapped around it.
Multiple-column layout - Learn web development
our starting point contains some very simple html; a wrapper with a class of container inside which is a heading and some paragraphs.
Responsive design - Learn web development
.container { display: grid; grid-template-columns: 1fr 1fr 1fr; } note: the grid layout version is even simpler as we can define the columns on the .wrapper: example, source code.
Getting started with CSS - Learn web development
wrapping up in this tutorial, we have taken a look at a number of ways in which you can style a document using css.
Styling links - Learn web development
playable code <div class="body-wrapper" style="font-family: 'open sans light',helvetica,arial,sans-serif;"> <h2>html input</h2> <textarea id="code" class="html-input" style="width: 90%;height: 10em;padding: 10px;border: 1px solid #0095dd;"><p>there are several browsers available, such as <a href="#">mozilla firefox</a>, <a href="#">google chrome</a>, and <a href="#">microsoft edge</a>.</p></textarea> <h2>css input</h2> <t...
Styling lists - Learn web development
playable code <div class="body-wrapper" style="font-family: 'open sans light',helvetica,arial,sans-serif;"> <h2>html input</h2> <textarea id="code" class="html-input" style="width: 90%;height: 10em;padding: 10px;border: 1px solid #0095dd;"><ul> <li>first, light the candle.</li> <li>next, open the box.</li> <li>finally, place the three magic items in the box, in this exact order, to complete the spell: <ol> <li>t...
Example 2 - Learn web development
solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : ...
Example 3 - Learn web development
solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : ...
Example 4 - Learn web development
solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : ...
Example 5 - Learn web development
solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : ...
How to build custom form controls - Learn web development
if the content overflows, we display an ellipsis */ display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow: ellipsis; vertical-align: top; } we don't need an extra element to design the down arrow; instead, we're using the :after pseudo-element.
UI pseudo-classes - Learn web development
to fix this we style the parent <div> to become a flex container, but also tell it to wrap its contents onto new lines if the content becomes too long: fieldset > div { margin-bottom: 20px; display: flex; flex-flow: row wrap; } the effect this has is that the label and input sit on separate lines because they are both width: 100%, but the <span> has a width of 0 so can sit on the same line as the input.
CSS basics - Learn web development
(for example, there are many color values in addition to red.) note the other important parts of the syntax: apart from the selector, each ruleset must be wrapped in curly braces.
The web and web standards - Learn web development
html, css, and javascript html, css, and javascript are the main three technologies you'll use to build a website: hypertext markup language, or html, is a markup language consisting of different elements you can wrap (mark up) content in to give it meaning (semantics) and structure.
Creating hyperlinks - Learn web development
anatomy of a link a basic link is created by wrapping the text or other content, see block level links, inside an <a> element and using the href attribute, also known as a hypertext reference, or target, that contains the web address.
Debugging HTML - Learn web development
it isn't clear where the first <strong> element should be closed, so the browser has wrapped each separate block of text with its own strong tag, right down to the bottom of the document!
Adding vector graphics to the Web - Learn web development
inlining svg is the only approach that lets you use css interactions (like :focus) and css animations on your svg image (even in your regular stylesheet.) you can make svg markup into a hyperlink by wrapping it in an <a> element.
Images in HTML - Learn web development
active learning: creating a figure in this active learning section, we'd like you to take the finished code from the previous active learning section, and turn it into a figure: wrap it in a <figure> element.
Video and audio content - Learn web development
summary and that's a wrap; we hope you had fun playing with video and audio in web pages!
Choosing the right approach - Learn web development
this can sometimes result in an extra function wrapper needing to be created, which can be slightly frustrating in some circumstances.
Build your own function - Learn web development
in the next article we'll wrap up functions by explaining another essential related concept — return values.
Looping code - Learn web development
the differentiator here is that the condition comes after everything else, wrapped in parentheses and preceded by a while keyword.
Making decisions in your code — conditionals - Learn web development
remember that color values are strings, so need to be wrapped in quotes.
Storing the information you need — Variables - Learn web development
when you give a variable a string value, you need to wrap it in single or double quote marks; otherwise, javascript tries to interpret it as another variable name.
Working with JSON - Learn web development
we have wrapped the code in an event handler that runs when the load event fires on the request object (see onload) — this is because the load event fires when the response has successfully returned; doing it this way guarantees that request.response will definitely be available when we come to try to do something with it.
Ember interactivity: Events, classes and state - Learn web development
note: a decorator is basically a wrapper function, which wraps and calls other functions or properties, providing additional functionality along the way.
Componentizing our React app - Learn web development
your form.js file should read like this: import react from "react"; function form(props) { return ( <form> <h2 classname="label-wrapper"> <label htmlfor="new-todo-input" classname="label__lg"> what needs to be done?
Getting started with React - Learn web development
suppose we wanted to wrap our heading in a <header> tag, for semantic reasons?
React interactivity: Events and state - Learn web development
your form.js file should now read like this: import react, { usestate } from "react"; function form(props) { const [name, setname] = usestate(""); function handlechange(e) { setname(e.target.value); } function handlesubmit(e) { e.preventdefault(); props.addtask(name); setname(""); } return ( <form onsubmit={handlesubmit}> <h2 classname="label-wrapper"> <label htmlfor="new-todo-input" classname="label__lg"> what needs to be done?
Creating our first Vue component - Learn web development
vue templates are currently only allowed a single root element — one element needs to wrap everything inside the template section (this will change when vue 3 comes out).
Adding a new todo form: Vue events, methods, and models - Learn web development
.native: listens for a native event on the root (outer-most wrapping) element on your component.
Implementing feature detection - Learn web development
flexwrap for the flex-wrap property, which isn't present in some implementations.
Accessibility information for UI designers and developers
to help these users, you could offer a setting to turn off animations, or wrap the css in the prefers-reduce-motion media query.
Gecko info for Windows accessibility vendors
articular type: store a pointer to the start_item if the current item has a flows_to relation, follow that relation otherwise, go to the next item in depth first search order if the current item matches your criteria, then return current_item if the current_item == start_item, return null (no item found) if the end has been reached, go back to the start if wrapping is desired, otherwise return null (no item found) go to step 2 checkable, required and invalid states are supported gecko defines three state constants using previously unused states: const unsigned long state_checkable = state_marqueed; // useful on menuitem, listitem // and treeitem.
Creating Sandboxed HTTP Connections
it is usually best to use a javascript wrapper that implements all the required methods and calls the specified callback function when the connection has completed.
Debugging Table Reflow
ous=0 constraint=3 widths=360 540 -1 -1 -1 -1 -1 -1 540 360 **end col dump** **start col dump** colindex=3 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1 -1 -1 -1 -1 360 **end col dump** ***end table dump*** the first column has already the minimum content width, the table column can't shrink below that, the desired content width of 540 twips, that's the space to layout cell 1 without wrapping the text and the 1230 which correspond to the style="width:80px" at the first cell.
Debugging on Windows
here are some entries that will make your life easier: ;; mozilla (1.7beta and later) nsautostring=<mdata,su> nsstring=<mdata,su> nscstring=<mdata,s> nscautostring=<mdata,s> nsrect=x=<x,d> y=<y,d> width=<width,d>; height=<height,d> nsstaticatomwrapper=<mstaticatom->mstring,s> nsiatom=<mstring,su> ; the following are not necessary in vc8 nscomptr<*>=<mrawptr,x> nsrefptr=<mrawptr,x> nsautoptr=<mrawptr,x> after you have made the changes and saved the file, you will need to restart visual c++ for the changes to take effect.
Makefile - variables
olkit_search moz_url_classifier moz_widget_toolkit android, beos, cocoa, gtk2, os2, qt, windows moz_xpctools moz_xul moz_x11 test variable description enable_tests boolean value that should wrapper all unit tests to allow disabling on demand[1].
Makefiles - Best practices and suggestions
targets = foo bar tans timestampdir = .ts all: $(timestampdir) $(targets) %: %.c $(cc) -o $@ $< $(timestampdir): $(mkdir) $@ # "clean" target garbage += $(targets) garbage_dirs += $(timestampdir) wrapper check/unit tests with a enable_tests conditional so tests can be disabled on demand.
Eclipse CDT
for example, if you are using a mac and you search for callers of nsdisplaylistbuilder::isintransform, the results will not include the caller in nsobjectframe.cpp because that caller is wrapped in "#ifndef xp_macosx".
SVG Guidelines
most of time, cdata isn't needed, for example, the content in <style> tags doesn't need to be wrapped in a cdata section as the content inside the tag is already correctly parsed as css.
Error codes returned by Mozilla APIs
o (0x80570027) ns_error_xpc_interface_not_scriptable (0x80570028) ns_error_xpc_interface_not_from_nsisupports (0x80570029) ns_error_xpc_cant_get_jsobject_of_dom_object (0x8057002a) ns_error_xpc_cant_set_read_only_constant (0x8057002b) ns_error_xpc_cant_set_read_only_attribute (0x8057002c) ns_error_xpc_cant_set_read_only_method (0x8057002d) ns_error_xpc_cant_add_prop_to_wrapped_native (0x8057002e) ns_error_xpc_call_to_scriptable_failed (0x8057002f) ns_error_xpc_jsobject_has_no_function_named (0x80570030) ns_error_xpc_bad_id_string (0x80570031) ns_error_xpc_bad_initializer_name (0x80570032) ns_error_xpc_has_been_shutdown (0x80570033) ns_error_xpc_cant_modify_prop_on_wn (0x80570034) ns_error_xpc_bad_convert_js_zero_isnot_null (0x80570035) ...
Communicating with frame scripts
where absolutely necessary, frame scripts can pass wrappers called cross process object wrappers (also known as cpows) to chrome, and chrome can use these wrappers to get synchronous access to content objects.
Performance best practices for Firefox front-end engineers
a promise-based wrapper for indexeddb, indexeddb.jsm, is available for chrome code.
Overview of Mozilla embedding APIs
typically, instances of this class are stack allocated, and wrap ascii arguments which must be converted into ucs2.
Roll your own browser: An embedding how-to
(news release, screenshot) mozilla examples gtkmozembed widget: gtk widget wrapper for the mozilla gecko engine.
IPDL Best Practices
implement (preferably reference counted) classes to wrap the shared data instead of letting several objects reference surfacedescriptors or their content directly.
Creating a New Protocol
it is acceptable to use synchronous calls on jpw wrappers for testing purposes.
Introduction to Layout in Mozilla
overview basic data flow key data structures detailed walk-through incrementalism future tech-talks wrap-up, q&a basic data flow source document arrives via network apis incrementally “pumped” through the single-threaded layout engine parse, compute style, render; repeat css used for rendering all content content theoretically separate from “presentation” key data structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context non-geometric information may be shared by adjacent frames reference counted, owned by frame ...
JavaScript Tips
xul tips when inserting code with an xul overlay, wrap functions and variables inside an object with a unique name to avoid conflicting with existing or future function and variable names.
Http.jsm
http.jsm http.jsm provides httprequest - a wrapper for xmlhttprequest that provides convenient and simplified api for dealing with http requests.
NetUtil.jsm
this method wraps the nsiioservice.newuri().
Examples
always wrap that function in a try catch and make that catch return promise.reject(ex) otherwise it will not trigger the rejection function of the promise.then.
Using JavaScript code modules
always put variables in a wrapper class and export the wrapper (such as bar in the above example).
JavaScript code modules
http.jsm a wrapper for xmlhttprequest that provides convenient and simplified api for dealing with http requests.
Localizing with Koala
user: type your name and your e-mail address in the form: "firstname lastname <me@example.com>" (be sure to type the wrapping quotes: "") note that you no longer have to edit the location now, it automatically fills in when you check the "mercurial" checkbox (e.g.
Extras
for example with the style rule: <code style="white-space: nowrap;">*[title] { color: blue; }</code> <math class="cue" display="block"> <mrow> <mrow> <msub title="base-a log"> <mi>log</mi> <mi>a</mi> </msub> <mo>&applyfunction;</mo> <mi>x</mi> </mrow> <mo>=</mo> <mfrac> <mrow> <mi title="natural log">ln</mi> <mo>&applyfunction;</mo> <mi>x</mi> </mrow> <mrow> <mi title="natural log">ln</mi> <mo>&applyfunction;</mo> <mi>a</mi> </mrow> </mfrac> </mrow> </math> </...
Various MathML Tests
overview of presentation mathml elements testing tensor indices <mmultiscripts>: r i1 j2 k3 ; this with <none/>, a qp i a bit of calculus: ∫ a b f ( x ) dx ∂ ∂ x f ( x , y ) + ∂ ∂ y f ( x , y ) here is the alphabet with invisible portions wrapped by <mphantom> in between: a b c d e f g h i j k l m n o p q r s t u v w x y z .
mozilla::CondVar
mozilla::condvar is a bare wrapper around prcondvar.
mozilla::Monitor
mozilla::monitor is a bare wrapper around prmonitor.
mozilla::Mutex
mozilla::mutex is a bare wrapper around prlock.
mozilla::MutexAutoLock
important: when a mozilla::mutexautolock is the mutex raii wrapper most recently pushed on the stack, your code is guaranteed to own the underlying mozilla::mutex.
mozilla::MutexAutoUnlock
important: when a mozilla::mutexautounlock is the mutex raii wrapper most recently pushed on the stack, your code is guaranteed not to own the underlying mozilla::mutex.
Investigating leaks using DMD heap scan mode
known edges: 0x7f08975a24c0 [fragmentorelement (xhtml) head https://www.example.com] --[mattrsandchildren[i]]--> 0x7f0882fe3230 0x7f08967e7b20 [js object (htmlscriptelement)] --[unwrapdomobject(obj)]--> 0x7f0882fe3230 the first two lines mean that the script element 0x7f0882fe3230 contains a strong reference to the eventlistenermanager 0x7f0899b4e550.
AsyncTestUtils extended framework
if you need to wrap an existing url listener or need a callback or fancy promise, create an instance of asyncurllistener.
NSPR Contributor Guide
please do not contribute java, c or other language wrappers.
NSPR Poll Method
the bottom layer is a wrapper for the underlying network transport.
PRIntervalTime
the increasing interval value represented by printervaltime wraps.
PR ImportTCPSocket
using pr_importtcpsocket is much more convenient than writing an nspr i/o layer that wraps your native tcp sockets.
NSS Certificate Download Specification
it consists of a pkcs#7 contentinfo structure, wrapping a sequence of certificates.
Encrypt Decrypt MAC Keys As Session Objects
key(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error)...
Encrypt and decrypt MAC using token
key(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error)...
FIPS Mode - an explanation
except for "public keys", it must not allow any keys to leave it (to get outside of it) unless they are encrypted ("wrapped") in a special way.
NSS_3.11.10_release_notes.html
bug 387892: add entrust root ca certificate(s) to nss bug 396999: pk11_authenticate bug 397478: lock from ssl_initsymwrapkeyslock not freed on selfserv shutdown.
NSS 3.12.9 release notes
bug 609068: implement j-pake in freebl bug 607058: crash [@ nss_cms_decoder_work_data] bug 613394: november/december 2010 batch of nss root ca changes bug 610843: need way to recover softoken in child after fork() bug 617492: add pk11_keygenwithtemplate function to pk11wrap (for firefox sync) bug 610162: sha-512 and sha-384 hashes are incorrect for inputs of 512mb or larger when running under windows and other 32-bit platforms (fx 3.6.12 and 4.0b6) bug 518551: vfychain crashes in pkits tests.
NSS 3.15.4 release notes
added the -w command-line option to pp: don't wrap long output lines.
NSS 3.16.2 release notes
notable changes in nss 3.16.2 the btoa command has a new command-line option -w suffix, which causes the output to be wrapped in begin/end lines with the given suffix.
NSS 3.16 release notes
bug 981170: aeskeywrap_decrypt should not return secsuccess for invalid keys.
NSS 3.30 release notes
in ssl.h ssl_alertreceivedcallback - register a callback function, that will be called whenever an ssl/tls alert is received ssl_alertsentcallback - register a callback function, that will be called whenever an ssl/tls alert is sent ssl_setsessionticketkeypair - configures an asymmetric key pair, for use in wrapping session ticket keys, used by the server.
NSS 3.45 release notes
pts on solaris sparc so that libfreebl_64fpu_3.so builds bug 1554336 - optimize away unneeded loop in mpi.c bug 1559906 - fipstest: use ckm_tls12_master_key_derive instead of vendor specific mechanism bug 1558126 - tls_aes_256_gcm_sha384 should be marked as fips compatible bug 1555207 - helloretryrequestcallback return code for rejecting 0-rtt bug 1556591 - eliminate races in uses of pk11_setwrapkey bug 1558681 - stop using a global for anti-replay of tls 1.3 early data bug 1561510 - fix a bug where removing -arch xxx args from cc didn't work bug 1561523 - add a string for the new-ish error ssl_error_missing_post_handshake_auth_extension this bugzilla query returns all the bugs fixed in nss 3.45: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&que...
NSS 3.46 release notes
bugs fixed in nss 3.46 bug 1572164 - don't unnecessarily free session in nsc_wrapkey bug 1574220 - improve controls after errors in tstcln, selfserv and vfyserv cmds bug 1550636 - upgrade sqlite in nss to a 2019 version bug 1572593 - reset advertised extensions in ssl_constructextensions bug 1415118 - nss build with ./build.sh --enable-libpkix fails bug 1539788 - add length checks for cryptographic primitives (cve-2019-17006) bug 1542077 - mp_set_ulong and mp_set_int sho...
Encrypt Decrypt_MAC_Using Token
key(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error)...
NSS Sample Code Sample_3_Basic Encryption and MACing
key(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error)...
EncDecMAC using token object - sample 3
*/ mackey = generatesymkey(slot, ckm_generic_secret_key_gen, 160/8, &mackeyid, pwdata); if (mackey == null) { pr_fprintf(pr_stderr, "generatesymkey for macing returned null.\n"); rv = secfailure; goto cleanup; } /* get the encrypt key cka_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secs...
sample2
clude <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "...
FC_DeriveKey
pwrappedkey [in] pointer to the wrapped key.
FIPS mode of operation
fc_wrapkey: rsa key wrapping fc_unwrapkey: rsa key wrapping fc_derivekey: diffie-hellman, ec diffie-hellman random number generation functions fc_seedrandom fc_generaterandom: performs continuous random number generator test.
S/MIME functions
keyid mxr 3.7 and later nss_cmsrecipientinfo_createwithsubjkeyidfromcert mxr 3.7 and later nss_cmsrecipientinfo_destroy mxr 3.2 and later nss_cmsrecipientinfo_encode mxr 3.8 and later nss_cmsrecipientinfo_getcertandkey mxr 3.8 and later nss_cmsrecipientinfo_unwrapbulkkey mxr 3.7.2 and later nss_cmsrecipientinfo_wrapbulkkey mxr 3.7.2 and later nss_cmssigneddata_addcertchain mxr 3.2 and later nss_cmssigneddata_addcertlist mxr 3.2 and later nss_cmssigneddata_addcertificate mxr 3.2 and later nss_cmssigneddata_adddigest ...
Pork Tool Development
cppsourceloc wraps sourceloc, providing information about macro expansion.
Tutorial: Embedding Rhino
this is the same as runscript, but with the addition of two extra lines of code: object wrappedout = context.javatojs(system.out, scope); scriptableobject.putproperty(scope, "out", wrappedout); these lines add a global variable out that is a javascript reflection of the system.out variable: $ java runscript2 "out.println(42)" 42.0 undefined using javascript objects from java after evaluating a script it's possible to query the scope for variables and functions, extracting values an...
Rhino Examples
primitivewrapfactory primitivewrapfactory.java is an example of a wrapfactory that can be used to control the wrapping behavior of the rhino engine on calls to java methods.
The JavaScript Runtime
(this caveat does not apply to scripts that use liveconnect; the java values are wrapped and unwrapped as appropriate to conform to the above type constraints.) property access properties in javascript objects may be accessed using either string or numeric identifiers.
Scripting Java
rhino wraps java exceptions into error objects with the following properties: javaexception: the original exception thrown by the java method rhinoexception: the exception wrapped by the rhino runtime the instanceof operator can be used to query the type of an exception: try { java.lang.class.forname("nonexistingclass"); } catch (e) { if (e.javaexception instanceof java.lang.classnotfoundexce...
FOSS
wrappers / bindings c++ cocos2d-js - cocos2d-js is a cross-platform game engine which embeds spidermonkey, providing the same api for both web and native platforms.
Introduction to the JavaScript shell
this is a thin wrapper for js_dumpheap.
JSAPI User Guide
similarly, you can create a js::value wrapping a jsobject, double, or jsstring pointer to a js::value using js::objectvalue(jsobject&), js::doublevalue(double), or js::stringvalue(jsstring*).
JSFreeOp
these structures wrap parameters that are passed to the finalizers removing most of explicit dependencies on jscontext in the finalization code.
JSObjectOp
typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); the callbacks of this type are: jsextendedclass.outerobject jsextendedclass.innerobject jsextendedclass.wrappedobject jsobjectops.thisobject ...
JS_AddArgumentFormatter
when called from js_pushargumentsva, the formatter is invoked thus: formatter(cx, "aa...", js_false, &sp, &ap); where js_false for fromjs means to wrap the c values at ap according to the format specifier and store them at sp, updating ap and sp appropriately.
JS_DefineFunction
added in spidermonkey 17 call jsnative the native c/c++ function to be wrapped by the new function.
JS_IsArrayObject
on success, returns true and sets isarray indicating whether obj is an array object or a wrapper around one.
JS_NewFunction
(to create a new function implemented in javascript, use js_compilefunction instead.) call is a c/c++ function pointer that the new function wraps.
JS_NewScriptObject
return the javascript script object that wraps a compiled script.
JS_PSGS
description these macros encapsulate the definition of jsnative-backed jspropertyspecs, by defining the jsnativewrappers for them.
JS_ValueToBoolean
for versions greater than jsversion_1_2, all objects convert to js_true, even boolean wrapper objects like the one produced by new boolean(false).
JS_ValueToObject
if v is a boolean value, a number, or a string, the result is a new wrapper object of type boolean, number, or string.
JSAPI reference
for example, js_valuetoobject(cx, s) where s is a string creates a new string wrapper object.
SpiderMonkey 1.8.8
atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function.
SpiderMonkey 1.8
there are two new jsextendedclass hooks, jsextendedclass.iteratorobject and jsextendedclass.wrappedobject.
SpiderMonkey 17
atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function.
SpiderMonkey 31
embedders still need to build with nspr, as the new wrappers require using spidermonkey internal functions which are not exposed to the public api.
Secure Development Guidelines
e strncat() length parameter is very confusing banned api list examples of incorrect strncat usage buffer overflow strncat(buffer, string, sizeof(buffer)); off-by-one strncat(buffer, string, sizeof(buffer) – strlen(string)); correct usage strncat(buffer, string, sizeof(buffer) – strlen(string) – 1)); banned api list: recommendations create wrappers or replacements for standard functions with a bad design libc function name reason to ban it strcpy, strcat, gets, sprintf, vsprintf no bounds checking.
Feed content access API
that code looks like this: feedtestresultlistener.prototype = { handleresult: function(result) { var feed = result.doc; feed.queryinterface(components.interfaces.nsifeed); // open a new window var win = window.open("", "feedtest_window"); var doc = win.document.wrappedjsobject; doc.open(); // write the html header and page title doc.write("<html><head><title>feed: " + feed.title.text + "</title></head><body>"); doc.write("<h1>" + feed.title.text + "</h1><p>"); var itemarray = feed.items; var numitems = itemarray.length; // write the article information if (!numitems) { doc.write(...
Places Developer Guide
however, firefox developers can take advantage of several helper apis that are browser-specific: fuel - a collection of wrapper apis for easing access to a number of firefox utilities and services nsiplacestransactionsservice - a firefox service for modifying bookmarks in a transactional manner, providing facilities for undo/redo places utilities for javascript - accessors and helper functions for firefox and extensions creating bookmarks, folders and other items creating a bookmark // create an nsiuri for the url...
Aggregating the In-Memory Datasource
say you were writing a datasource2, and the way you chose to implement it was to "wrap" the in-memory datasource; i.e., myclass : public nsimyinterface, public nsirdfdatasource { private: nscomptr<nsirdfdatasource> minner; public: // nsirdfdatasource methods ns_imethod init(const char* auri) { return minner->init(auri); } ns_imethod geturi(char* *auri) { return minner->geturi(auri); } // etc., for each method in nsirdfdatasource!
Fun With XBL and XPConnect
ject: <property name="autocompletelistener"> <![cdata[ ({ onautocompleteresult: function(aitem, aoriginalstring, amatch) { if ( aitem ) { anonymouscontent[0].value = amatch; } } }) ]]> </property> as long as the js for the value of autocompletelistener evaluates to an object (and wrapping the expression with a set of parens like i did, does this), then the value of autocompletelistener is an object that implements my interface.
XPCOM array guide
MozillaTechXPCOMGuideArrays
typesafe arrays nscomarray<t> nscomarray<t> is a wrapper around nstarray<t>, so it has a similar api.
Building the WebLock UI
the locking ui once you have the basic xul wrapper set up for your interface, the next step is to define that part of the interface that locks and unlocks the browser.
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
to solve this, there is a special nsiscriptableinputstream interface and "scriptable stream" wrapper.
How To Pass an XPCOM Object to a New Window
to access the xpcom object from the window's code, you can access the window.arguments[] array, as shown in the example below: components.utils.reporterror(string(window.arguments[0])); this will produce output similar to "[xpconnect wrapped nsimyxpcomobject]".
Components.classes
s.classes["@mozilla.org/supports-array;1"] .createinstance(components.interfaces.nsisupportsarray); which is a shortcut to var obj = components.classes["@mozilla.org/supports-array;1"] .createinstance(); obj.queryinterface(components.interfaces.nsisupportsarray); if you don't provide a specific interface to createinstance(), it will return an xpconnect wrapper for the component, which only exposes the methods of the nsisupports interface (and under certain circumstances the special wrappedjsobject property).
Components.utils.exportFunction
if you need unfiltered access to the original, you can waive xrays: // privileged scope: for example, a content script function loguser(user) { // console.log(user.getuser()); // error console.log(user.wrappedjsobject.getuser()); // "bill" } exportfunction(loguser, contentwindow, { defineas: "loguser" }); // less-privileged scope: for example, a page script var user = {getuser: function() {return "bill";}} var test = document.getelementbyid("test"); test.addeventlistener("click", function() { window.loguser(user); }, false); passing functions as arguments if functions are given as argume...
Components.utils.makeObjectPropsNormal
ensures that the specified object's methods are all in the object's scope, and aren't cross-component wrappers.
Using components
ccomponents_classes] results=[object nsxpccomponents_results] issuccesscode=function issuccesscode() { [native code] } constructor=[object nsxpccomponents_constructor] queryinterface=function queryinterface() { [native code] } interfacesbyid=[object nsxpccomponents_interfacesbyid] classesbyid=[object nsxpccomponents_classesbyid] stack=js frame :: scratchpad/4 :: cdump :: line 8 manager=[xpconnect wrapped nsicomponentmanager] id=[object nsxpccomponents_id] exception=[object nsxpccomponents_exception] reporterror=function reporterror() { [native code] } cancreatewrapper=function cancreatewrapper() { [native code] } cancallmethod=function cancallmethod() { [native code] } cangetproperty=function cangetproperty() { [native code] } cansetproperty=function cansetproperty() { [native code] } ...
XPConnect
wrappers what sorts of wrappers xpconnect generates and uses xpconnect security membranes tools xpcshell join the xpcom community choose your preferred method for joining the discussion: mailing list newsgroup rss feed irc: #developers (learn more)tools: javascr...
Observer Notifications
the subject will be the download id wrapped in nsisupportspruint32, for one download removed, or null for multi download remove, for example when the download list is cleared.
nsACString
the methods defined on nsacstring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_cstring.
nsAString
the methods defined on nsastring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_string.
nsAString (External)
class declaration this header provides wrapper classes around the frozen string api which are roughly equivalent to the internal string classes.
nsDependentCSubstring
class declaration nstdependentsubstring_chart a string class which wraps an external array of string characters.
nsDependentSubstring
class declaration nstdependentsubstring_chart a string class which wraps an external array of string characters.
nsEmbedCString
remarks the methods defined on nsembedcstring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_cstring.
nsEmbedString
remarks the methods defined on nsembedstring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_string.
RefPtr
this is done using the functions addref() and release(), which respectively modify a variable of type nsautorefcnt, which basically is a wrapper around a count of the number of references refering to the class.
XPCOM glue classes
this is done using the functions addref() and release(), which respectively modify a variable of type nsautorefcnt, which basically is a wrapper around a count of the number of references refering to the class.nsstringclass declarationnsstring externalclass declarationnsstringcontainer (external)class declarationnssupportsweakreferenceinherit from this c++ class to add canonical support for nsisupportsweakreference.nsxpidlcstringclass declarationnsxpidlstringclass declarationpromiseflatcstring (external)class declarationpromiseflatstri...
jsdIStackFrame
retrieve the underlying context wrapped by this jsdicontext.
mozIRegistry
it is built as a simple c wrapper for the functions in nsreg.h.
mozIStorageValueArray
mozistoragestatementwrapper storage statement wrapper ...
mozITXTToHTMLConv
kstructphrase unsigned long enables conversion of text attributes, such as converting "*some text*" to boldfaced "some text" by wrapping in the html <strong> element.
nsIAlertsService
note: if you are calling this function from javascript, you should wrap it in a try/catch because it can fail on mac os x prior to firefox 22.
nsICommandLineHandler
the text should have embedded newlines which wrap at 76 columns, and should include a newline at the end.
nsIConverterInputStream
xpcom/io/nsiconverterinputstream.idlscriptable a unichar input stream that wraps an input stream.
nsIDOMWindowInternal
pened and the specified resource is loaded into its browsing context.">open(in domstring url, in domstring name, in domstring options) nsidomwindow nsisupports aextraargument) void close() void updatecommands(in domstring action) boolean find([optional] in domstring str,[optional] in boolean casesensitive, [optional] in boolean backwards, [optional] in boolean wraparound, [optional] in boolean wholeword, [optional] in boolean searchinframes, [optional] in boolean showdialog) domstring atob(in domstring aasciistring) domstring btoa(in domstring abase64data) nsivariant showmodaldialog(in nsivariant aargs, [optional] in domstring aoptions) void postmessage(in domstring message, in domstring targetorigin) attributes ...
nsIHttpServer
; } 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.nsilocalfile); file.initwithpath(filepath); return server.registerfile(path, file); }, registerdirectory...
nsIMessageBroadcaster
this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
nsIMessageListener
objects an object whose properties are any cross process object wrappers exposed by the sender as the third argument to the message-sending function.
nsIMessageSender
this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
nsIMessageWakeupService
currently, services must expose a wrappedjsobject in order to support this; however, once bug 593407 is fixed, the service to be woken up must implement nsiframemessagelistener.
nsIMsgHeaderParser
aemailaddresses missing description anames missing description afullnames missing description count missing description exceptions thrown missing exception missing description native code only!reformatheaderaddresses given a string which contains a list of header addresses, returns a new string with the same data, but inserts missing commas, parses and reformats it, and wraps long lines with newline-tab.
nsIMsgWindow
note that the html is wrapped in <html> and <body> tags for you.
nsIPluginHost
ntags = pluginhost.getplugintags(); for (let i = 0; i < plugintags.length; ++i) { let plugintag = plugintags[i]; let mimetypes = plugintag.getmimetypes(); console.warn('plugintag:', plugintag.name, 'mimetypes:', mimetypes); // go through all the mime types and get the handler service for (let j = 0; j < mimetypes.length; ++j) { let type = mimetypes[j]; let wrappedhandlerinfo = mimeservice.getfromtypeandextension(type, null); console.log('handler info for type', type, wrappedhandlerinfo); } } resultingagentstring ...
nsIPrefLocalizedString
modules/libpref/public/nsipreflocalizedstring.idlscriptable this interface is simply a wrapper interface for nsisupportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
nsIPrivateBrowsingService
to get access to the service from javascript, use: var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); c++ callers should use the contract id @mozilla.org/privatebrowsing-wrapper;1 instead.
nsIPropertyBag
goodies obtained from window.navigator are: appcodename:"mozilla" appname:"netscape" appversion:"5.0 (windows)" battery:batterymanager buildid:"20140529161749" cookieenabled:true donottrack:"yes" geolocation:geolocation language:"en-us" mimetypes:mimetypearray mozalarms:null mozapps:xpcwrappednative_nohelper mozcameras:cameramanager mozconnection:mozconnection mozcontacts:contactmanager mozid:null mozkeyboard:xpcwrappednative_nohelper mozpay:null mozpermissionsettings:null mozphonenumberservice:phonenumberservice mozpower:mozpowermanager moztcpsocket:null online:true oscpu:"windows nt 5.1" platform:"win32" plugins:pluginarray product:"gecko" productsub:"20100101" useragent:"mozilla/...
nsISearchSubmission
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description postdata nsiinputstream the post data associated with a search submission, wrapped in a mime input stream.
nsIStructuredCloneContainer
methods deserializetovariant() deserialize the object this container holds, returning it wrapped as an nsivariant.
nsITaskbarProgress
this class wraps around the native functionality to do this.
nsIWebBrowserFind
wrapfind boolean whether the search wraps around to the start (or end) of the document if no match was found between the current position and the end (or beginning).
nsIXmlRpcFault
xml-rpc server fault codes are returned wrapped in this; access it using nsixpconnect.getpendingexception->data.
nsIZipReader
ns path to file in zip, and it uses forward slashes remember) var entry = zr.getentry(entrypointer); // should return true on `entry instanceof ci.nsizipentry` console.log('entrypointer', entrypointer); /* console output * "entrypointer" "bootstrap.js" scratchpad/1:18 */ console.info('entry', entry); /* console output * "entry" xpcwrappednative_nohelper { queryinterface: queryinterface(), compression: getter, size: getter, realsize: getter, crc32: getter, isdirectory: getter, lastmodifiedtime: getter, issynthetic: getter, permissions: getter, compression: 8 } scratchpad/1:19 */ if (!entry.isdirectory) { var inputstream = zr.getinputstream(entrypointer); reusablestreaminstance.init(inputs...
NS_CStringAppendData
remarks this function is defined inline as a wrapper around ns_cstringsetdatarange.
NS_CStringCutData
remarks this function is defined inline as a wrapper around ns_cstringsetdatarange .
NS_CStringInsertData
remarks this function is defined inline as a wrapper around ns_cstringsetdatarange.
NS_StringAppendData
remarks this function is defined inline as a wrapper around ns_stringsetdatarange note: gcc requires the -fshort-wchar option to compile this example since prunichar is an unsigned short.
NS_StringCutData
remarks this function is defined inline as a wrapper around ns_stringsetdatarange.
NS_StringInsertData
remarks this function is defined inline as a wrapper around ns_stringsetdatarange .
Setting HTTP request headers
please also note that the code itself usually is wrapped inside a exports.main = function() { ...
XPCOM Thread Synchronization
this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around nspr's.
XPCOM tasks
this is probably best done with a c wrapper around an xpcom enumerator.
Creating a gloda message query
in the future, the steel layer should provide wrappers to make manipulation clean and fun.
LDAP Support
it expects the following format: the desired ldap attribute should be wrapped in square brackets.
Creating a Custom Column
this function is a simple one liner along the lines of: function addcustomcolumnhandler() { gdbview.addcolumnhandler("colreplyto", columnhandler); } wrap up as you have seen it is quite easy to add your own custom column handler.
Activity Manager examples
// wrap copyservice in a nsvariant component nscomptr<nsiwritablevariant> initiator = do_createinstance(ns_variant_contractid); initiator->setasisupports(reinterpret_cast<nsisupports*>(copyservice)); // subject of the delete operation is the imap folder // wrap it in a nsvariant component nscomptr<nsiwritablevariant> srcfolder = do_createinstance(ns_variant_contractid); srcfolder->setasisupports(reinter...
Virtualenv
here are a few such tools: carton: make a self-extracting virtualenv from directories or urls of packages; http://pypi.python.org/pypi/carton velcro: a script that sets up a python project for local installation; https://bitbucket.org/kumar303/velcro/ virtualenvwrapper: a set of extensions to ian bicking’s virtualenv tool for creating isolated python development environments; http://www.doughellmann.com/projects...tualenvwrapper the mozilla-central virtualenv in order to make use of various python modules located throughout mozilla-central, a virtualenv is created as part of the build process: http://mxr.mozilla.org/mozilla-central/source/js/src/build...
Using Objective-C from js-ctypes
* blocks are regular objective-c objects in obj-c, and can be sent messages; * thus block instances need are creted using the core.wrapid() function.
Declaring and Using Callbacks
however, if the first argument is a function, js-ctypes creates a special object (known internally as a cclosure) that wraps the javascript function within an ordinary c function.
ctypes
instead, they convert to objects of the wrapper types ctypes.int64 and ctypes.uint64, which are javascript objects rather than cdata objects.
Debugger.Script - Firefox Developer Tools
the result refers to the global directly, not via a wrapper or a windowproxy (“outer window”, in firefox).
Debugger - Firefox Developer Tools
a cross-compartment wrapper of an object; we apply the prior rules to the wrapped object.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
dbg.adddebuggee(w.wrappedjsobject); // enable allocation tracking in dbg's debuggees.
Debugger-API - Firefox Developer Tools
[object wrapper][wrapper] functions help manipulate object references that cross privilege boundaries.
Edit Shape Paths in CSS - Firefox Developer Tools
a solid line shows the outline of the shape that is wrapping the text.
Examine and edit CSS - Firefox Developer Tools
displaying pseudo-elements the rule view displays the following pseudo-elements, if they are applied to the selected element: ::after ::backdrop ::before ::first-letter ::first-line ::selection :-moz-color-swatch :-moz-number-spin-box :-moz-number-spin-down :-moz-number-spin-up :-moz-number-text :-moz-number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-track :-moz-selection if the selected element has pseudo-elements applied to it, they are displayed before the selected element but hidden by a disclosure triangle: clicking the triangle displays them: viewing common pseudo-classes there's a button to the right of the filter box: click the ...
Animation inspector example: CSS transitions - Firefox Developer Tools
{ padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } .icon { width: 50px; height: 50px; filter: grayscale(100%); transition: transform 750ms ease-in, filter 750ms ease-in-out; } .note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#selected { filter: grayscale(0%); transform: scale(1.5); } .icon#selected+span { opacity: 1; width: 300px; } javascript content function toggleselection(e) { if (e.button != 0) { return; } if (e.target.classlist.contains("icon")) { var wasselected = (e.targ...
Animation inspector example: Web Animations API - Firefox Developer Tools
">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } #icon { width: 50px; height: 50px; filter: grayscale(100%); } #note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; } javascript content var iconkeyframeset = [ { transform: 'scale(1)', filter: 'grayscale(100%)'}, { filter: 'grayscale(100%)', offset: 0.333}, { transform: 'scale(1.5)', offset: 0.666 }, { transform: 'scale(1.5)', filter: 'grayscale(0%)'} ]; var notekeyframeset = [ { opacity: '0', width: '0'}, { opacity: '1', width: '300px'} ]; ...
View Source - Firefox Developer Tools
wrap long lines (toggle) wraps long lines to the width of the page.
AesCbcParams - Web APIs
the aescbcparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-cbc algorithm.
AesGcmParams - Web APIs
the aesgcmparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-gcm algorithm.
AudioNode - Web APIs
WebAPIAudioNode
while the actual processing is done internally by the browser and cannot be altered, you could write a wrapper around an audio node to provide custom properties and methods.
Basic animations - Web APIs
stify-content: center; align-self: center; align-items: center; font-size: -webkit-xxx-large; font-weight: 900; color: #fff; transition: .5s; opacity: .1; border-radius: 7px } .keypress { position: fixed; width: 100vw; height: 100vh; top: 0; left: 0; display: flex; flex-wrap: wrap; justify-content: space-around; opacity: 1; user-select: none } .keypress>div:hover { opacity: 1 } .touch { background: #8bc34a } .off { background: #f44336 } .hide { opacity: 0 } </style> </html> javascript function tmz() { var e = new date(t), i = new date, n =...
CryptoKeyPair - Web APIs
for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokeypair' in that specification.
Document.documentURIObject - Web APIs
privileged code must be careful not to try getting or setting this property on a non-wrapped content object (e.g., on a wrappedjsobject of an xpcnativewrapper).
Document.getElementsByTagNameNS() - Web APIs
(to accommodate explorer, one could call an xpath wrapper instead of the xpath in the function below (as explorer supports xpath with a different api), such as this wrapper class.) function getelementsbytagnamenswrapper (ns, elname, doc, context) { if (!doc) { doc = document; } if (!context) { context = doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"]', context, null, xpathresult.ordered_node_...
Document.open() - Web APIs
WebAPIDocumentopen
as a result, you can no longer call document.write() into an untrusted document from chrome, even using wrappedjsobject.
EXT_shader_texture_lod - Web APIs
ext(sampler2d sampler, vec2 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec3 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec4 p, vec2 dpdx, vec2 dpdy) vec4 texturecubegradext(samplercube sampler, vec3 p, vec3 dpdx, vec3 dpdy) examples enabling the extensions: gl.getextension('ext_shader_texture_lod'); shader code that avoids artifacts when wrapping texture coordinates: <script type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications ...
EcKeyImportParams - Web APIs
the eckeyimportparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ecdsa or ecdh.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
this is then wrapped in a <pre> element.
Element.scrollWidth - Web APIs
example <!doctype html> <html> <head> <title>example</title> <style> div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } #adiv { width: 100px; } button { margin-bottom: 2em; } </style> </head> <body> <div id="adiv"> foobar-foobar-foobar-foobar </div> <button id="abutton"> check for overflow </button> <div id="anotherdiv"> foobar-foobar-foobar...
FileException - Web APIs
to simplify things a bit, wrap your worker code in a try/catch.
HTMLImageElement.alt - Web APIs
</p> </div> css the main feature of the css here is the use of clip-path and shape-outside to wrap the text around the icon in an appealing way.
HTMLImageElement.srcset - Web APIs
also provided is the word-break attribute, using the break-all value to tell the browser to wrap the string within the width available regardless of where in the string the wrap must occur.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
javascript promises and the mutation observer api both use the microtask queue to run their callbacks, but there are other times when the ability to defer work until the current event loop pass is wrapping up.
HmacImportParams - Web APIs
the hmacimportparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when generating a key for the hmac algorithm.
KeyboardEvent.code - Web APIs
it also handles ensuring that the ship wraps across the boundaries of the play field instead of vanishing.
Location - Web APIs
WebAPILocation
an>:<span id="port" title="port">8888</span></span><span id="pathname" title="pathname">/foo/bar</span><span id="search" title="search">?q=baz</span><span id="hash" title="hash">#bang</span></span> css html, body {height:100%;} html {display:table; width:100%;} body {display:table-cell; text-align:center; vertical-align:middle; font-family:georgia; font-size:230%; line-height:1em; white-space:nowrap;} [title] {position:relative; display:inline-block; box-sizing:border-box; /*border-bottom:.5em solid;*/ line-height:2em; cursor:pointer;} [title]:before {content:attr(title); font-family:monospace; position:absolute; top:100%; width:100%; left:50%; margin-left:-50%; font-size:40%; line-height:1.5; background:black;} [title]:hover:before, :target:before {background:black; color:yellow;} [title...
MediaDevices.getUserMedia() - Web APIs
t get ahold of the legacy getusermedia, if present var getusermedia = navigator.webkitgetusermedia || navigator.mozgetusermedia; // some browsers just don't implement it - return a rejected promise with an error // to keep a consistent interface if (!getusermedia) { return promise.reject(new error('getusermedia is not implemented in this browser')); } // otherwise, wrap the call to the old navigator.getusermedia with a promise return new promise(function(resolve, reject) { getusermedia.call(navigator, constraints, resolve, reject); }); } } navigator.mediadevices.getusermedia({ audio: true, video: true }) .then(function(stream) { var video = document.queryselector('video'); // older browsers may not have srcobject if ("srcobject" in video) ...
MediaRecorder() - Web APIs
the recorded media data will be stored in an mp4 wrapper (so if you gather the chunks of media data and save them to disk, they will be in an mp4 file).
Recording a media element - Web APIs
the "download" button will download the received data (although it's in a raw, unwrapped form that isn't very useful).
Node.isConnected - Web APIs
WebAPINodeisConnected
nsole.log(test.isconnected); // returns false document.body.appendchild(test); console.log(test.isconnected); // returns true shadow dom a shadow dom example: // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create some css to apply to the shadow dom var style = document.createelement('style'); console.log(style.isconnected); // returns false style.textcontent = ` .wrapper { position: relative; } .info { font-size: 0.8rem; width: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white; border-radius: 10px; opacity: 0; transition: 0.6s all; positions: absolute; bottom: 20px; left: 10px; z-index: 3 } `; // attach the created style element to the shadow dom shadow.appendchild(style); console.log(style.i...
Node.normalize() - Web APIs
WebAPINodenormalize
syntax element.normalize(); example let wrapper = document.createelement("div"); wrapper.appendchild( document.createtextnode("part 1 ") ); wrapper.appendchild( document.createtextnode("part 2 ") ); // at this point, wrapper.childnodes.length === 2 // wrapper.childnodes[0].textcontent === "part 1 " // wrapper.childnodes[1].textcontent === "part 2 " wrapper.normalize(); // now, wrapper.childnodes.length === 1 // wrapper.childnodes[0].textcontent === "part 1 part 2 " specifications specification status comment domthe definition of 'node: normalize' in th...
Node - Web APIs
WebAPINode
we use a wrapper function named grep to do the searching: function grep(parentnode, pattern) { const matches = [] let endscan = false eachnode(parentnode, function(node){ if (endscan) { return false } // ignore anything which isn't a text node if (node.nodetype !== node.text_node) { return } if (typeof pattern === "string") { if (-1 !== node.textcontent.indexof(patter...
OES_standard_derivatives - Web APIs
glsl built-in functions the following new functions can be used in glsl shader code, if this extension is enabled: gentype dfdx(gentype) gentype dfdy(gentype) gentype fwidth(gentype) examples enabling the extensions: gl.getextension('oes_standard_derivatives'); gl.getextension('ext_shader_texture_lod'); shader code that avoids artifacts when wrapping texture coordinates: <script type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications ...
PaymentRequest.canMakePayment() - Web APIs
it wraps the call to canmakepayment() in feature detection, and calls an appropriate callback depending on the resolution of the promise.
Pointer Lock API - Web APIs
if so, it makes the ball wrap around to the opposite edge.
RsaHashedImportParams - Web APIs
the rsahashedimportparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when importing any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
RsaOaepParams - Web APIs
the rsaoaepparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the rsa_oaep algorithm.
SVGFEConvolveMatrixElement - Web APIs
svg_edgemode_wrap 2 corresponds to the wrap value.
SVGFEGaussianBlurElement - Web APIs
svg_edgemode_wrap 2 corresponds to the wrap value.
SubtleCrypto.encrypt() - Web APIs
{ let encoded = getmessageencoding(); // counter will be needed for decryption counter = window.crypto.getrandomvalues(new uint8array(16)); return window.crypto.subtle.encrypt( { name: "aes-ctr", counter, length: 64 }, key, encoded ); } let iv = new uint8array(16); let key = new uint8array(16); let data = new uint8array(12345); //crypto functions are wrapped in promises so we have to use await and make sure the function that //contains this code is an async function //encrypt function wants a cryptokey object const key_encoded = await crypto.subtle.importkey( "raw", key.buffer, 'aes-ctr' , false, ["encrypt", "decrypt"]); const encrypted_content = await window.crypto.subtle.encrypt( { name: "aes-ctr", counter: iv, len...
SubtleCrypto.exportKey() - Web APIs
keys are not exported in an encrypted format: to encrypt keys when exporting them use the subtlecrypto.wrapkey() api instead.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
the request() method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
WakeLock - Web APIs
WebAPIWakeLock
the wakelock.request method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
Writing a WebSocket server in C# - Web APIs
string text = encoding.utf8.getstring(decoded); console.writeline("{0}", text); } else console.writeline("mask bit not set"); console.writeline(); } } } } client.html <!doctype html> <style> textarea { vertical-align: bottom; } #output { overflow: auto; } #output > p { overflow-wrap: break-word; } #output span { color: blue; } #output span.error { color: red; } </style> <h2>websocket test</h2> <textarea cols=60 rows=6></textarea> <button>send</button> <div id=output></div> <script> // http://www.websocket.org/echo.html var button = document.queryselector("button"), output = document.queryselector("#output"), textarea = document.queryselector(...
The WebSocket API (WebSockets) - Web APIs
it consists of a c wrapper around websockets and webrtc that abstracts away cross-browser differences, facilitating the creation of multi-user networking functionality for games and other apps.
Movement, orientation, and motion: A WebXR example - Web APIs
if the image's dimensions aren't both powers of two (see the ispowerof2() function), mipmapping is disabled and wrapping is clamped to the edges.
Advanced techniques: Creating and sequencing audio - Web APIs
function nextnote() { const secondsperbeat = 60.0 / tempo; nextnotetime += secondsperbeat; // add beat length to last beat time // advance the beat number, wrap to zero currentnote++; if (currentnote === 4) { currentnote = 0; } } we want to create a reference queue for the notes that are to be played, and the functionality to play them using the functions we've previously created: const notesinqueue = []; function schedulenote(beatnumber, time) { // push the note on the queue, even if we're not playing.
Using Web Workers - Web APIs
worker feature detection for slightly more controlled error handling and backwards compatibility, it is a good idea to wrap your worker accessing code in the following (main.js): if (window.worker) { ...
Window.content - Web APIs
WebAPIWindowcontent
see also working with windows in chrome code when accessing content documents from privileged code, be aware of xpcnativewrappers.
Window.open() - Web APIs
WebAPIWindowopen
return value a windowproxy object, which is basically a thin wrapper for the window object representing the newly created window, and has all its features available.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
// passing the 'this' object with .call won't work // because this will change the value of this inside settimeout itself // while we want to change the value of this inside myarray.mymethod // in fact, it will be an error because settimeout code expects this to be the window object: settimeout.call(myarray, myarray.mymethod, 2000); // error: "ns_error_xpc_bad_op_on_wn_proto: illegal operation on wrappednative prototype object" settimeout.call(myarray, myarray.mymethod, 2500, 2); // same error as you can see there are no ways to pass the this object to the callback function in the legacy javascript.
XDomainRequest - Web APIs
var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.onprogress = function () { //progress }; xdr.ontimeout = function () { //timeout }; xdr.onerror = function () { //error occurred }; xdr.onload = function() { //success(xdr.responsetext); } settimeout(function () { xdr.send(); }, 0); } note: the xdr.send() call is wrapped in a timeout (see window.settimeout() to prevent an issue with the interface where some requests are lost if multiple xdomainrequests are being sent at the same time.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
let error = cc["@mozilla.org/dom-error;1"].createinstance(ci.nsidomdomerror); error.wrappedjsobject.init(errname); return error; // xxx: errtype goes unused } function dumpsecurityinfo(xhr, error) { let channel = xhr.channel; try { dump("connection status:\n"); if (!error) { dump("\tsucceeded\n"); } else { dump("\tfailed: " + error.name + "\n"); } let secinfo = channel.securityinfo; // print general connection security state du...
Using the alertdialog role - Accessibility
the tab order inside the alert dialog must wrap.
ARIA: figure role - Accessibility
this is wrapped by a <div> element that identifies the content as a figure using role="figure".
ARIA: dialog role - Accessibility
for most dialogs, the expected behavior is that the dialog's tab order wraps, which means that when the user tabs through the focusable elements in the dialog, the first focusable element will be focused after the last one has been reached.
WAI-ARIA Roles - Accessibility
this should be used on an element that wraps an element with an insertion role, and one with a deletion role.aria: switch rolethe aria switch role is functionally identical to the checkbox role, except that instead of representing "checked" and "unchecked" states, which are fairly generic in meaning, the switch role represents the states "on" and "off."aria: tab rolethe aria tab role indicates an interactive element inside a tablist that, ...
Architecture - Accessibility
implementation classes here are some notes on the classes we use: nshypertextaccessible is for any container that may wrap both text and embedded object: nsiaccessibletext is supported if there is potentially any text in the container nsiaccessiblehypertext is supported if there is potentially text and embedded objects together in the container.
Accessibility documentation index - Accessibility
this should be used on an element that wraps an element with an insertion role, and one with a deletion role.
Understandable - Accessibility
3.1.2 language of parts (aa) in cases where the content of a page includes words or phrases that are in a different language to the primary language, use the lang attribute on an element wrapped around the term in question (e.g.
:host() - CSS: Cascading Style Sheets
WebCSS:host()
in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const sha...
:host-context() - CSS: Cascading Style Sheets
in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const sha...
:host - CSS: Cascading Style Sheets
WebCSS:host
in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const sha...
unicode-range - CSS: Cascading Style Sheets
we could also have done this by wrapping the ampersand in a <span> and applying a different font just to that, but that is an extra element and rule set.
overflow-inline - CSS: Cascading Style Sheets
sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css p { white-space: nowrap; } @media (overflow-inline: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-inline' in that specification.
Box alignment in Flexbox - CSS: Cascading Style Sheets
on the cross axis the row-gap property will create spacing between adjacent flex lines, therefore flex-wrap must also be set to wrap for this to have any effect.
Color picker tool - CSS: Cascading Style Sheets
= document.createelement('div'); var preview_color = document.createelement('div'); preview_box.classname = 'preview'; preview_color.classname = 'preview-color'; this.preview_color = preview_color; preview_box.appendchild(preview_color); this.node.appendchild(preview_box); }; colorpicker.prototype.newinputcomponent = function newinputcomponent(title, topic, onchangefunc) { var wrapper = document.createelement('div'); var input = document.createelement('input'); var info = document.createelement('span'); wrapper.classname = 'input'; wrapper.setattribute('data-topic', topic); info.textcontent = title; info.classname = 'name'; input.setattribute('type', 'text'); wrapper.appendchild(info); wrapper.appendchild(input); this.node.appendchild(wrapper); inpu...
Basic Concepts of Multicol - CSS: Cascading Style Sheets
in the above example the content is wrapped in paragraph p tags with default styling.
CSS Display - CSS: Cascading Style Sheets
legacy> guides css flow layout (display: block, display: inline) block and inline layout in normal flow flow layout and overflow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flexbox aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flexbox mixins mastering wrapping of flex items ordering flex items relationship of flexbox to other layout methods backwards compatibility of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values ...
Typical use cases of Flexbox - CSS: Cascading Style Sheets
i have contained my <button> and <input> field in a wrapper which i have given a border and set to display: flex.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
the boxes around the words before the <strong> element and after the <strong> element are referred to as anonymous boxes, boxes introduced to ensure that everything is wrapped in a box, but ones that we cannot target directly.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the start is where sentences start and the end is where a line of text ends before it would begin to wrap onto a new line.
In Flow and Out of Flow - CSS: Cascading Style Sheets
you can see the background colour of the following paragraph running underneath, it is only the line boxes of that paragraph that have been shortened to cause the effect of wrapping content around the float.
CSS Fragmentation - CSS: Cascading Style Sheets
fragmentation occurs when an inline box wraps onto multiple lines.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .box1 { grid-column: 1; grid-row: 2; } <div class="wrapp...
Basic Shapes - CSS: Cascading Style Sheets
this means that the centre of the ellipse is on the left edge of the box giving us a half ellipse shape to wrap our text around.
Shapes from box values - CSS: Cascading Style Sheets
by using box values for shapes we can wrap our content around the edges defined by these values.
Shapes From Images - CSS: Cascading Style Sheets
the content now wraps around the star shape.
CSS Text - CSS: Cascading Style Sheets
WebCSSCSS Text
reference properties hanging-punctuation hyphens letter-spacing line-break overflow-wrap tab-size text-align text-align-last text-indent text-justify text-size-adjust text-transform white-space word-break word-spacing specifications specification status comment css logical properties and values level 1 editor's draft updates some properties to be independent of the directionality of the text.
CSS Layout cookbook - CSS: Cascading Style Sheets
grid layout grid wrapper for aligning grid content within a central wrapper, while also allowing items to break out.
Layout mode - CSS: Cascading Style Sheets
float layout, designed to cause an item to position itself left or right with the rest of the content in normal flow wrapping around it.
Microsoft CSS extensions - CSS: Cascading Style Sheets
ms-scrollbar-highlight-color -ms-scrollbar-shadow-color -ms-scrollbar-track-color -ms-scroll-chaining -ms-scroll-limit -ms-scroll-limit-x-max -ms-scroll-limit-x-min -ms-scroll-limit-y-max -ms-scroll-limit-y-min -ms-scroll-rails -ms-scroll-snap-points-x -ms-scroll-snap-points-y -ms-scroll-snap-x -ms-scroll-snap-y -ms-scroll-translation -ms-text-autospace -ms-touch-select -ms-wrap-flow -ms-wrap-margin -ms-wrap-through zoom pseudo-elements ::-ms-browse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value media features -ms-high-contrast css-related dom apis mscontentzoomfactor msgetpropertyenabled msgetregion...
align-items - CSS: Cascading Style Sheets
baseline<overflow-position> = unsafe | safe<self-position> = center | start | end | self-start | self-end | flex-start | flex-end examples css #container { height:200px; width: 240px; align-items: center; /* can be changed in the live sample */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } div > div { box-sizing: border-box; border: 2px solid #8c8c8c; width: 50px; display: flex; align-items: center; justify-content: center; } #item1 { background-color: #8cffa0; min-height: 30px; } #item2 { background-color: #a0c8ff; min-height: 50px; } #item3 { background-color: #ffa08c;...
animation - CSS: Cascading Style Sheets
WebCSSanimation
0z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#restart'); } .grid { width: 100%; height: 100%; display: flex; background: #eee; font: 1em monospace; } .row { display: flex; flex: 1 auto; flex-direction: row; flex-wrap: wrap; justify-content: space-between; } .col { display: flex; flex: 1 auto; flex-direction: column; } .cell { box-sizing: border-box; margin: .5em; padding: 0; background-color: #fff; overflow: hidden; text-align: left; } .flx { flex: 1 0; } .note { background: #fff3d4; padding: 1em; margin: .5em; font: .8em sans-serif; text-align: left; flex: none; } .over...
box-decoration-break - CSS: Cascading Style Sheets
clone each box fragment is rendered independently with the specified border, padding, and margin wrapping each fragment.
break-inside - CSS: Cascading Style Sheets
fusce iaculis urna id neque dapibus, eu lacinia lectus dictum.</p> <figure> <img src="https://udn.realityripple.com/samples/fe/4508d88f78.png"> <figcaption>the firefox logo — fox wrapped around the world</figcaption> </figure> <p>praesent condimentum dui dui, sit amet rutrum diam tincidunt eu.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
"91">i love</text> <text x="96" y="109" class="em">clipping</text> </g> </svg> </div> </div> </div> </div> </div> html,body { height: 100%; box-sizing: border-box; background: #eee; } .grid { width: 100%; height: 100%; display: flex; font: 1em monospace; } .row { display: flex; flex: 1 auto; flex-direction: row; flex-wrap: wrap; } .col { flex: 1 auto; } .cell { margin: .5em; padding: .5em; background-color: #fff; overflow: hidden; text-align: center; flex: 1; } .note { background: #fff3d4; padding: 1em; margin: .5em .5em 0; font: .8em sans-serif; text-align: left; white-space: nowrap; } .note + .row .cell { margin-top: 0; } .container { display: inline-block; border: 1px dotted...
<color> - CSS: Cascading Style Sheets
as an <angle>, it implicitly wraps around such that -120deg=240deg, 480deg=120deg, -1turn=1turn, etc.
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-width - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valuethe absolute length, zero or largeranimation typea length formal syntax <length> | auto examples setting column width in pixels html <p class="content-box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
columns - CSS: Cascading Style Sheets
WebCSScolumns
formal definition initial valueas each of the properties of the shorthand:column-width: autocolumn-count: autoapplies toblock containers except table wrapper 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 t...
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
the float is contained by the bordered box, which wraps it and the text alongside.
display - CSS: Cascading Style Sheets
WebCSSdisplay
yntax of display css flow layout (display: block, display: inline) block and inline layout in normal flow flow layout and overflow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flexbox aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flexbox mixins mastering wrapping of flex items ordering flex items relationship of flexbox to other layout methods backwards compatibility of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values ...
filter - CSS: Cascading Style Sheets
WebCSSfilter
though there is no maximum value; the effect of values above 360deg wraps around.
flex-basis - CSS: Cascading Style Sheets
="flex flex2">2: flex-basis test</li> <li class="flex flex3">3: flex-basis test</li> <li class="flex flex4">4: flex-basis test</li> <li class="flex flex5">5: flex-basis test</li> </ul> <ul class="container"> <li class="flex flex6">6: flex-basis test</li> </ul> css .container { font-family: arial, sans-serif; margin: 0; padding: 0; list-style-type: none; display: flex; flex-wrap: wrap; } .flex { background: #6ab6d8; padding: 10px; margin-bottom: 50px; border: 3px solid #2e86bb; color: white; font-size: 14px; text-align: center; position: relative; } .flex:after { position: absolute; z-index: 1; left: 0; top: 100%; margin-top: 10px; width: 100%; color: #333; font-size: 12px; } .flex1 { flex-basis: auto; } .flex1:after { content: 'au...
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
<div class="box" style="background-color:lightblue;">b</div> <div class="box" style="background-color:yellow;">c</div> <div class="box1" style="background-color:brown;">d</div> <div class="box1" style="background-color:lightgreen;">e</div> <div class="box" style="background-color:brown;">f</div> </div> css #content { display: flex; justify-content: space-around; flex-flow: row wrap; align-items: stretch; } .box { flex-grow: 1; border: 3px solid rgba(0,0,0,.2); } .box1 { flex-grow: 2; border: 3px solid rgba(0,0,0,.2); } result specifications specification status comment css flexible box layout modulethe definition of 'flex-grow' in that specification.
font-weight - CSS: Cascading Style Sheets
</div> css /* mutator sans is created by letterror (https://github.com/letterror/mutatorsans) and is used here under the terms of its license: https://github.com/letterror/mutatorsans/blob/master/license */ @font-face { src: url('https://mdn.mozillademos.org/files/16011/mutatorsans.ttf'); font-family:'mutatorsans'; font-style: normal; } label { font: 1rem monospace; white-space: nowrap; } .container { max-height: 150px; overflow-y: auto; } .sample { text-transform: uppercase; font: 1.5rem 'mutatorsans', sans-serif; } html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; flex-direction: column; } header { margin-bottom: 1.5rem; } .container { flex-grow: 1; } .container > p { margin-top: 0; margin-bottom: 0;...
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
examples flex layout html <div id="flexbox"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #flexbox { display: flex; flex-wrap: wrap; width: 300px; gap: 20px 5px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: 1 1 auto; width: 100px; height: 50px; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #grid { grid-gap: 20px 5px; } #grid { d...
mask-position - CSS: Cascading Style Sheets
| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples setting mask position css #wrapper { border: 1px solid black; width: 250px; height: 250px; } #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-repeat: no-repeat; mask-position: top right; /* can be changed in the live sample */ margin-bottom: 10px; } html <div id="wrapper"> <div id="masked"> </...
mix-blend-mode - CSS: Cascading Style Sheets
0"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ellipse> </svg> </div> </div> </div> </div> </div> </div> html,body { height: 100%; box-sizing: border-box; background: #eee; } .grid { width: 100%; display: flex; font: 1em monospace; } .row { display: flex; flex: 1 auto; flex-direction: row; flex-wrap: wrap; height: auto; } .col { display: flex; flex: 1 auto; flex-direction: column; height: auto; } .cell { margin: .5em; padding: .5em; background-color: #fff; overflow: hidden; text-align: center; } .note { background: #fff3d4; padding: 1em; margin: .5em .5em 0; font: .8em sans-serif; text-align: left; white-space: nowrap; } .note + .row .cell { margin-top: ...
object-fit - CSS: Cascading Style Sheets
t-fit: scale-down</h2> <img class="scale-down" src="https://udn.realityripple.com/samples/ae/248a9938d9.png" alt="mdn logo"> <img class="scale-down narrow" src="https://udn.realityripple.com/samples/ae/248a9938d9.png" alt="mdn logo"> </section> css h2 { font-family: courier new, monospace; font-size: 1em; margin: 1em 0 0.3em; } div { display: flex; flex-direction: column; flex-wrap: wrap; align-items: flex-start; height: 940px; } img { width: 150px; height: 100px; border: 1px solid #000; } .narrow { width: 100px; height: 150px; margin-top: 10px; } .fill { object-fit: fill; } .contain { object-fit: contain; } .cover { object-fit: cover; } .none { object-fit: none; } .scale-down { object-fit: scale-down; } result specifications ...
place-content - CSS: Cascading Style Sheets
writingm.addeventlistener("change", function (evt) { document.getelementbyid("container").style.writingmode = evt.target.value; }); var direction = document.getelementbyid("direction"); direction.addeventlistener("change", function (evt) { document.getelementbyid("container").style.direction = evt.target.value; }); css #container { display: flex; height:240px; width: 240px; flex-wrap: wrap; background-color: #8c8c8c; writing-mode: horizontal-tb; /* can be changed in the live sample */ direction: ltr; /* can be changed in the live sample */ place-content: flex-end center; /* can be changed in the live sample */ } div > div { border: 2px solid #8c8c8c; width: 50px; background-color: #a0c8ff; } .small { font-size: 12px; height: 40px; } .large { font-size: ...
place-items - CSS: Cascading Style Sheets
listener('change', function (evt) { container.style.placeitems = evt.target.value; }); display.addeventlistener('change', function (evt) { container.classname = evt.target.value; }); css #container { height:200px; width: 240px; place-items: center; /* you can change this value by selecting another option in the list */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } result specifications specification status comment css box alignment module level 3the definition of 'place-items' in that specification.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
de absolute, and normal computing to zero except on multi-column elementsanimation typea length, percentage or calc(); formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> examples flex layout html <div id="flexbox"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #flexbox { display: flex; flex-wrap: wrap; width: 300px; row-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: 1 1 auto; width: 100px; height: 50px; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> </div> css #grid { grid-row-gap: 20px; } #grid { display: grid; height: 200px; grid-template-columns: 200px; grid-template-rows: ...
scroll-snap-coordinate - CSS: Cascading Style Sheets
<div>2</div> <div>3</div> </div> </div> <div> <p>at coordinate (50, 0)</p> <div class="scrollcontainer coordinate50"> <div>1</div> <div>2</div> <div>3</div> </div> </div> </div> css #container { display: flex; } #container > div:nth-child(-n+2) { margin-right: 20px; } .scrollcontainer { width: 100px; overflow: auto; white-space: nowrap; scroll-snap-type: mandatory; font-size: 0; } .scrollcontainer > div { width: 100px; height: 100px; display: inline-block; line-height: 100px; text-align: center; font-size: 50px; } .coordinate0 > div { scroll-snap-coordinate: 0 0; } .coordinate25 > div { scroll-snap-coordinate: 25px 0; } .coordinate50 > div { scroll-snap-coordinate: 50px 0; } .scrollcontainer > div:nth...
scroll-snap-destination - CSS: Cascading Style Sheets
<div>2</div> <div>3</div> </div> </div> <div> <p>at coordinate (50, 0)</p> <div class="scrollcontainer destination50"> <div>1</div> <div>2</div> <div>3</div> </div> </div> </div> css #container { display: flex; } #container > div:nth-child(-n+2) { margin-right: 20px; } .scrollcontainer { width: 100px; overflow: auto; white-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; scroll-snap-destination: 20px 0; font-size: 0; } .destination0 { scroll-snap-destination: 0 0; } .destination25 { scroll-snap-destination: 25px 0; } .destination50 { scroll-snap-destination: 50px 0; } .scrollcontainer > div { width: 100px; height: 100px; display: inline-block; line-height: 100px; text-al...
scroll-snap-points-x - CSS: Cascading Style Sheets
lueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax none | repeat( <length-percentage> )where <length-percentage> = <length> | <percentage> examples setting horizontal scroll snap points html <div id="container"> <div>1</div> <div>2</div> <div>3</div> </div> css #container { width: 200px; overflow: auto; white-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; font-size: 0; } #container > div { width: 200px; height: 200px; display: inline-block; line-height: 200px; text-align: center; font-size: 100px; } #container > div:nth-child(even) { background-color: #87ea87; } #container > div:nth-child(odd) { background-color: #87ccea; } result specifications not par...
scroll-snap-stop - CSS: Cascading Style Sheets
css /* setup */ :root, body { height: 100%; display: flex; align-items: center; justify-content: space-between; flex-flow: column nowrap; font-family: monospace; } .container { display: flex; overflow: auto; outline: 1px dashed lightgray; flex: none; } .container.x { width: 100%; height: 128px; flex-flow: row nowrap; } .container.y { width: 256px; height: 256px; flex-flow: column nowrap; } /* definite scroll snap */ .mandatory-scroll-snapping > div { scroll-snap-stop: always; } .proximity-scroll-snapping ...
scroll-snap-type - CSS: Cascading Style Sheets
rtl</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> </div> css /* setup */ html, body, .holster { height: 100%; } .holster { display: flex; align-items: center; justify-content: space-between; flex-flow: column nowrap; font-family: monospace; } .container { display: flex; overflow: auto; outline: 1px dashed lightgray; flex: none; } .container.x { width: 100%; height: 128px; flex-flow: row nowrap; } .container.y { width: 256px; height: 256px; flex-flow: column nowrap; } /* scroll-snap */ .x.mandatory-scroll-snapping { scroll-snap-type: x mandatory; } .y.mandatory-scroll-snapping { ...
table-layout - CSS: Cascading Style Sheets
html <table> <tr><td>ed</td><td>wood</td></tr> <tr><td>albert</td><td>schweitzer</td></tr> <tr><td>jane</td><td>fonda</td></tr> <tr><td>william</td><td>shakespeare</td></tr> </table> css table { table-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } result specifications specification status comment css level 2 (revision 1)the definition of 'table-layout' in that specification.
text-indent - CSS: Cascading Style Sheets
each-line indentation affects the first line of the block container as well as each line after a forced line break, but does not affect lines after a soft wrap break.
matrix3d() - CSS: Cascading Style Sheets
</div> css html { width: 100%; } body { height: 100vh; /* centering content */ display: flex; flex-flow: row wrap; justify-content: center; align-content: center; } .foo { width: 50%; padding: 1em; color: white; background: #ff8c66; border: 2px dashed black; text-align: center; font-family: system-ui, sans-serif; font-size: 14px; /* setting up animation for better demonstration */ animation: motionscale 2s alternate linear infinite; } @keyframes motionscale { from { /* ...
Getting Started - Developer guides
to mitigate this problem, you could wrap your if...then statement in a try...catch: function alertcontents() { try { if (httprequest.readystate === xmlhttprequest.done) { if (httprequest.status === 200) { alert(httprequest.responsetext); } else { alert('there was a problem with the request.'); } } } catch( e ) { alert('caught exception: ' + e.description); } } step 4 – working w...
DOM onevent handlers - Developer guides
(the html specification names these: onblur, onerror, onfocus, onload, and onscroll.) event handler's parameters, this binding, and the return value when the event handler is specified as an html attribute, the specified code is wrapped into a function with the following parameters: event — for all event handlers except onerror.
Overview of events and handlers - Developer guides
as a second example, much modern javascript integrated into web pages is wrapped into an event function call to ensure that the code is only executed when the html has been processed and is available for alteration or decoration.
Rich-Text Editing in Mozilla - Developer guides
devedge provides a javascript helper class, xbdesignmode, which is a wrapper for the designmode feature which hides the differences between ie and mozilla.
Making content editable - Developer guides
as of firefox 60, firefox will be updated to wrap the separate lines in <div> elements, matching the behavior of chrome, modern opera, edge, and safari.
Using HTML sections and outlines - Developer guides
collections of links such as social media profiles or a blogroll should not be wrapped in the <nav> element.
HTML attribute reference - HTML: Hypertext Markup Language
wrap <textarea> indicates whether the text should be wrapped.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
note: do not use <br> to create margins between paragraphs; wrap them in <p> elements and use the css margin property to control their size.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
you have to set a form owner, either by wrapping it in a <form> or set the attribute form to the id of the form.
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
example a paragraph of text that includes <code>: <p>the function <code>selectall()</code> highlights all the text in the input field so the user can, for example, copy or delete the text.</p> the output generated by this html looks like this: notes to represent multiple lines of code, wrap the <code> element within a <pre> element.
<dd>: The Description Details element - HTML: Hypertext Markup Language
WebHTMLElementdd
nowrap if the value of this attribute is set to yes, the definition text will not wrap.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
del::before, del::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } del::before { content: " [deletion start] "; } del::after { content: " [deletion end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
<dl> <dt>name</dt> <dd>godzilla</dd> <dt>born</dt> <dd>1952</dd> <dt>birthplace</dt> <dd>japan</dd> <dt>color</dt> <dd>green</dd> </dl> tip: it can be handy to define a key-value separator in the css, such as: dt::after { content: ": "; } wrapping name-value groups in <div> elements whatwg html allows wrapping each name-value group in a <dl> element in a <div> element.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
the <legend> shrink-wraps, and also establishes a formatting context.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
ins::before, ins::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } ins::before { content: " [insertion start] "; } ins::after { content: " [insertion end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
mark::before, mark::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } mark::before { content: " [highlight start] "; } mark::after { content: " [highlight end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
wrap is a hint indicating how the overflow must happen.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
one <rb> element should wrap each separate atomic segment of the base text.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
one <rp> element should enclose each of the opening and closing parentheses that wrap the <rt> element that contains the annotation's text.
<s> - HTML: Hypertext Markup Language
WebHTMLElements
s::before, s::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } s::before { content: " [start of stricken text] "; } s::after { content: " [end of stricken text] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
as an example, a navigation menu should be wrapped in a <nav> element, but a list of search results and a map display and its controls don't have specific elements, and could be put inside a <section>.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<nobr> the non-standard, obsolete html <nobr> element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
164 <nobr>: the non-breaking text element (obsolete) element, html, non-standard, obsolete, reference, web, nobr the non-standard, obsolete html <nobr> element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.
Set-Cookie - HTTP
a <cookie-value> can optionally be wrapped in double quotes and include any us-ascii characters excluding control characters, whitespace, double quotes, comma, semicolon, and backslash.
HTTP Public Key Pinning (HPKP) - HTTP
to ensure the authenticity of a server's public key used in tls sessions, this public key is wrapped into a x.509 certificate which is usually signed by a certificate authority (ca).
Closures - JavaScript
instead, you can access them using the three public functions that are returned from the anonymous wrapper.
JavaScript data types and data structures - JavaScript
for more details see symbol and the symbol object wrapper in javascript.
Grammar and types - JavaScript
the boolean object is a wrapper around the primitive boolean data type.
Text formatting - JavaScript
'\u{2f804}' // the same with simple unicode escapes '\ud87e\udc04' string objects the string object is a wrapper around the string primitive data type.
Working with objects - JavaScript
(note that you may need to wrap the object literal in parentheses if the object appears where a statement is expected, so as not to have the literal be confused with a block statement.) object initializers are expressions, and each object initializer results in a new object being created whenever the statement in which it appears is executed.
Deprecated and obsolete features - JavaScript
string methods html wrapper methods like string.prototype.fontsize and string.prototype.big.
Arrow function expressions - JavaScript
you must wrap the object literal in parentheses: var func = () => ({ foo: 1 }); line breaks an arrow function cannot contain a line break between its parameters and its arrow.
AggregateError() constructor - JavaScript
the aggregateerror() constructor creates an error for several errors that need to be wrapped in a single error.
AggregateError - JavaScript
the aggregateerror object represents an error when several errors need to be wrapped in a single error.
Array.prototype.reduce() - JavaScript
insequence(arr, input) { return arr.reduce( (promisechain, currentfunction) => promisechain.then(currentfunction), promise.resolve(input) ) } // promise function 1 function p1(a) { return new promise((resolve, reject) => { resolve(a * 5) }) } // promise function 2 function p2(a) { return new promise((resolve, reject) => { resolve(a * 2) }) } // function 3 - will be wrapped in a resolved promise by .then() function f3(a) { return a * 3 } // promise function 4 function p4(a) { return new promise((resolve, reject) => { resolve(a * 4) }) } const promisearr = [p1, p2, f3, p4] runpromiseinsequence(promisearr, 10) .then(console.log) // 1200 function composition enabling piping // building-blocks to use for composition const double = x => x + x const t...
BigInt.asIntN() - JavaScript
the bigint.asintn static method is used to wrap a bigint value to a signed integer between -2width-1 and 2width-1-1.
BigInt.asUintN() - JavaScript
the bigint.asuintn static method is used to wrap a bigint value to an unsigned integer between 0 and 2width-1.
BigInt.prototype.valueOf() - JavaScript
the valueof() method returns the wrapped primitive value of a bigint object.
Boolean - JavaScript
the boolean object is an object wrapper for a boolean value.
Intl.NumberFormat() constructor - JavaScript
possible values are: "symbol" to use a localized currency symbol such as €, this is the default value, "narrowsymbol" to use a narrow format symbol ("$100" rather than "us$100"), "code" to use the iso currency code, "name" to use a localized currency name such as "dollar", currencysign in many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
JSON.parse() - JavaScript
we wrap the text // in parens to eliminate the ambiguity.
Math.log2() - JavaScript
note that it returns imprecise values on some inputs (like 1 << 29), wrap into math.round() if working with bit masks.
Number.prototype.valueOf() - JavaScript
the valueof() method returns the wrapped primitive value of a number object.
Number - JavaScript
number is a primitive wrapper object used to represent and manipulate numbers like 37 or -9.25.
Object() constructor - JavaScript
the object constructor creates an object wrapper for the given value.
Object.create() - JavaScript
exceptions the proto parameter has to be either null or an object excluding primitive wrapper objects.
Promise() constructor - JavaScript
the promise constructor is primarily used to wrap functions that do not already support promises.
Promise - JavaScript
the constructor is primarily used to wrap functions that do not already support promises.
Proxy() constructor - JavaScript
syntax new proxy(target, handler) parameters target a target object to wrap with proxy.
Proxy.revocable() - JavaScript
syntax proxy.revocable(target, handler); parameters target a target object to wrap with proxy.
String() constructor - JavaScript
however, the constructor produces an instance of the type string (an object wrapper) and that's why you rarely want to use the string constructor at all.
WebAssembly.Table.prototype.get() - JavaScript
return value a function reference — this is an exported webassembly function, a javascript wrapper for an underlying wasm function.
WebAssembly.Table.prototype.set() - JavaScript
this must be an exported webassembly function, a javascript wrapper for an underlying wasm function.
WebAssembly.Table - JavaScript
the webassembly.table() object is a javascript wrapper object — an array-like structure representing a webassembly table, which stores function references.
Lexical grammar - JavaScript
*/ console.log('hello world!'); } comment(); you can also use it in the middle of a line, if you wish, although this can make your code harder to read so it should be used with caution: function comment(x) { console.log('hello ' + x /* insert the value of x */ + ' !'); } comment('world'); in addition, you can use it to disable code to prevent it from running, by wrapping code in a comment, like this: function comment() { /* console.log('hello world!'); */ } comment(); in this case, the console.log() call is never issued, since it's inside a comment.
switch - JavaScript
we can easily fix this by wrapping our case clauses with brackets: const action = 'say_hello'; switch (action) { case 'say_hello': { // added brackets let message = 'hello'; console.log(message); break; } // added brackets case 'say_hi': { // added brackets let message = 'hi'; console.log(message); break; } // added brackets default: { // added brackets console.log('empty action received.
Strict mode - JavaScript
you can also take the approach of wrapping the entire contents of a script in a function and having that outer function use strict mode.
<math> - MathML
WebMathMLElementmath
every valid mathml instance must be wrapped in <math> tags.
MathML documentation index - MathML
WebMathMLIndex
every valid mathml instance must be wrapped in <math> tags.
Image file type and format guide - Web media technologies
<picture> is used as a wrapper for a number of <source> elements, each specifying a version of the image in a different format or under different media conditions, as well as an <img> element which defines where to display the image and the fallback to the default or "most compatible" version.
Progressive loading - Progressive web apps (PWAs)
you could try to make your apps more bulletproof by making them work without javascript — either using <noscript> to show the image with final src already assigned, or by wrapping <img> tags with <a> elements pointing at the target images, so the user can click and access them when desired.
The building blocks of responsive design - Progressive web apps (PWAs)
we opened up the brick.js file and wrapped the whole lot in the following: if (window.matchmedia("(max-width: 480px)").matches) { // the whole of brick.js goes here!
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- to hide the path, it is usually wrapped in a <defs> element --> <!-- <defs> --> <path id="mypath" fill="none" stroke="red" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <!-- </defs> --> <text> <textpath href="#mypath"> quick brown fox jumps over the lazy dog.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
218 text-anchor svg, svg attribute the text-anchor attribute is used to align (start-, middle- or end-alignment) a string of pre-formatted text or auto-wrapped text where the wrapping area is determined from the inline-size property relative to a given point.
Using templates and slots - Web Components
the <template> uses <slot> and its name attribute to make three named slots: <slot name="element-name"> <slot name="description"> <slot name="attributes"> the <template> wraps the named slots in a <details> element.
WebAssembly Concepts - WebAssembly
the different code types can call each other as required — the webassembly javascript api wraps exported webassembly code with javascript functions that can be called normally, and webassembly code can import and synchronously call normal javascript functions.
Compiling from Rust to WebAssembly - WebAssembly
runs wasm-bindgen on that webassembly, generating a javascript file that wraps up that webassembly file into a module npm can understand.
Understanding WebAssembly text format - WebAssembly
this article explains how that text format works, in terms of the raw syntax, and how it is related to the underlying bytecode it represents — and the wrapper objects representing wasm in javascript.