Level 117 Level 119
Level 118

[Quiz] Web Developers II


70 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
What are the possible values for dropeffect?
none — a dragged item cannot be dropped here. This is the default value for everything except text boxes.
How are visual cues handled for dropeffect
Each of these values causes a different cursor to be displayed when an item is dragged over the drop target.
What functionality is provided for the different dropeffect value?
None, it is up to you to actually cause the actions indicated by the cursor. In other words,
The cursor changes. Everything else you must program yourself.
What is the only thing you get for free with these values?
What must you set in order to use the dropeffect property,
You must set it in the ondragenter event handler for the drop target.
Set the effectallowed.
What must you set for dropeffect property to be able to do anything worthwhile?
What does effectallowed do?
Indicates which dropeffect is allowed for the dragged item.
What are the possible values for effectallowed?
uninitialized — no action has been set for the dragged item.
Where must effectallowed be set
Inside the ondragstart event handler.
You must set both dropeffect and effectallowed to "move"
what must you do to allow a user to move text from a text box into a <div>.
Why won't the text automatically move itself?
Because the default behavior for the drop event on a <div> is to do nothing.
What happens if you override the default behavior
The text is automatically removed from the text box.
What must you do next?
It is then up to you to insert it into the <div> to finish the action.
What happens if you change dropeffect and effectallowed to "copy"
The text in the text box would not automatically be removed.
When is text draggable
Only after a section has been highlighted,
Anytime
When are images and links draggable
A draggable property
What does html5 have on all elements indicating if the element can be dragged?
Which html objects have draggable set to true by default?
All html images and links have draggable automatically set to true. Everything else has a default value of false.
<!-- turn off dragging for this image -->
Give an example of setting draggable on, or off.
<audio> and <video>.
what two media-related elements does html5 introduces to enable cross-browser audio and video embedding into a browser baseline without any plug -ins?
What do <audio> and <video> elements allow web developers to do?
easily embed media files into a page and provide javascript hooks into common functionality.
<!-- embed a video -->
What are the available elements for audio an video?
What are the minimum required attributes that need to be specified for these?
Each of these elements requires, at a minimum, the src attribute indicating the media file to load.
What additional attributes may you specify?
you can also specify width and height attributes to indicate the intended dimensions of the video player and a poster attribute that is an image uri to display while the video content is being
How do you add controls to your video
The controls attribute, if present, indicates that the browser should display a ui enabling the user to interact directly with the media.
Any content between the opening and the closing tags is what?
considered alternate content to display if the media player is unavailable.
You may optionally specify multiple different media sources.
How can you provide for browsers that do not support specific media formats?
How do you specify other media formats?
Omit the src attribute from the element and instead include one or more <source> elements.
What additional properties are available for media?
Autoplay boolean gets or sets the autoplay flag.
Abort downloading has been aborted.
What are the additional media events and when do they fire?
eval() method , DOM
.JSON can be passed directly to _______ method and doesn't require the creation of a _______.
JSON syntax allows the representation of which three types of values?
Simple values( String, number, Boolean, and null but not undefined), Objects and Arrays.
How does one declare a variable in JSON?
one does not! There are no variables, functions, or object instances in JSON.
Structured data.
JSON is all about representing what?
double quotes
JSON strings must use what in order to be valid?
Parsed
JSON's rise to popularity may have been because the data could be _______ into a usable object in JavaScript
stringify() & parse()
The JSON object has two methods:_______ & _______
stringify, string
In simple usage, _______serializes JavaScript objects into a JSON what?
toJSON() method
The _______ method handles custom JSON serialization beyond what JSON.stringify() can handle.
reviver
JSON.stringify() accepts two optional additional arguments for filtering & indentation. Likewise JSON.parse() accepts an optional additional argument called a _______ function which is a function called on each key-value pair.
Describe Lazy Loading Functions, and its advantages?
If the results of the function with branching is the same for every instance it is called, the code is overwritten for subsequent calls of the function so that branching occurs only once(i.e, the f…
How can lazy loading be accomplished?
There are two ways: 1) manipulate the function the first time the code is called the function is overwritten with another function so that future function calls need not go through the execution branch…
Function Currying
also called partial function application, functions are created with one or more arguments already set.
set the attributes: [[Configurable]]==false, [[Writable]]==false, [[Enumerable]], [[Value]], [[Set]] of the objects.
What mechanism in ECMAScript5 is used to avoid one object overwriting another object's code, i.e. create Tamper-Proof Objects?
First level of object protection,
By default, JavaScript is extensible additional properties and methods can be added to an object. How can objects be made Nonextensible? What method is used to determine whether an object is extensible?
What are Sealed Objects?
Next level of object protection: Objects aren't extensible and existing members have their [[Configurable]] attribute set to false. properties and methods cannot be deleted. data properties cannot be altered. Properties values can be changed.
Method to seal an object: seal(); Object.seal(person);
What is the method to seal an object?
What method is used to determine if an object is sealed?
Object.isSealed(): Method to determine whether an object is sealed or not sealed.
What are the characteristics of Frozen Objects?
the strictest type of tamper-proof object. aren't extensible and are sealed, and also data properties have their [[Writable]] attribute set to false.
Object.freeze(); method to freeze objects
What method is used to determine if an object is frozen?
Object.isFrozen(); detects frozen objects
What method(s) are used to determine if an object is frozen?
What objects are often frozen? why do so?
main library objects. Freezing prevents accidental or intensional changes to the library.
Yes. values returned: true and false
Do isSealed () and isExtensible() operate on frozen objects? If so, what are the return values? If not, why not?
setTimeout() and setInterval()
What methods are used to schedule execution of code in JavaScript?
How can one secure an event to occur as scheduled?
It's not possible to secure an event to occur at a specific time because JavaScript runs in a single-threaded time environment. The browser prioritizes the jobs in a queue. The event gets executed as …
T or F: Timers specify the interval when the timer's code is executed.
F: the specified interval indicates when the timer's code is added to the queue not when execution occurs. Execution occurs when the processor is idle.
What are Yielding Processes?
For the purpose of limiting long-running scripts when it runs longer than a certain amount of time or more than certain number of statements.
what is array chunking?
With arrays, a technique of processing arrays in small chunks with timers when the processing can be done asynchronously, or processed nonsequentially.
Under what condition is splitting long-running scripts recommended?
It's is best to split a job into smaller ones for functions taking over 50 milliseconds to complete.
What is Function Throttling?
It is the basic idea of not allowing certain code to execute without a break.
Events are a type of design pattern called _______ .
observer pattern. The it is made up of two types of objects: subject and observer. The subject is responsible for publishing events. The observer simply observes the subject by subscribing to these events.
what are custom events?
Custom events create objects that manage events, allowing for others to listen to those events.
what is a cursor tail?
image or multiple images that shadows mouse pointer movements on the page for drag and drop functionality.
navigator.onLine
What property and two events can be used for offline detection?
What is a manifest file used for? How can you associate this file with a web page?
A manifest file lists the files that the browser should download and cache in the application cache.
document.cookie
What property can be used to get and set cookies? What format should be used when setting the property?
Why shouldn't you store large amounts of data in cookies?
For every request from the browser, every cookie matching the requested domain and path is sent in the header of the request. The larger the cookie information, the longer it will take to complete the request to the server.
clear, getItem(name), key(index), removeItem(name) and setItem(name, value).
What are the methods of the Storage type? How can you determine the number of name-value pairs in the Storage object?
Until the browser is closed.
How long does the sessionStorage object store data?
What is the difference between globalStorage and localStorage?
globalStorage allows you to specify the domains which will have access to the data, while localStorage only gives access to data set from the domain using the same protocol on the same port.