C777 Unit 4: HTML5 APIs

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/78

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

79 Terms

1
New cards

What is a collection of standards and programming instructions that enable access to a software application?

application programming interface (API)

2
New cards

Which API is used for rendering visual images on the fly via scripting?

Canvas API

3
New cards

Which element is a transparent container for graphics?

<canvas>

4
New cards

What two attributes does the element have?

height and width

5
New cards

What primitive shape does canvas support?

rectangle

6
New cards

What is the standard specifying how objects in a Web document can be referred to and manipulated?

Document Object Model (DOM)

7
New cards

Which language is used to access HTML elements via the DOM?

JavaScript

8
New cards

Which method returns a context object, which provides properties and methods that can be used to draw and manipulate images on the canvas?

getContext()

9
New cards

Which method draws a filled rectangle?

fillRect(x,y,width,height)

10
New cards

Which method draws a rectangular outline?

strokeRect(x,y,width,height)

11
New cards

Which method clears the specified area and makes it fully transparent?

clearRect(x,y,width,height)

12
New cards

Which method begins a drawing path or resets the current path?

beginPath()

13
New cards

Which method ends the current drawing path?

closePath()

14
New cards

Which method moves the drawing pointer to a specified position?

moveTo(x,y)

15
New cards

Which method draws a curving line with a center, a given radius, a starting and ending angle (in radians), and instruction to draw in a clockwise or counterclockwise direction?

arc(x,y,radius,startAngle,endAngle,anticlockwise)

16
New cards

Which method draws a straight line from the current drawing position to the specified position?

lineTo(x,y)

17
New cards

Which method adds a line to the path drawn?

stroke()

18
New cards

Which method fills the area with the color set by the fillStyle property?

fill()

19
New cards

Which property sets the fill color or style?

fillStyle

20
New cards

Which property sets the thickness of the path drawn, in pixels?

lineWidth

21
New cards

Which API enables the rendering of interactive 3D and 2D graphics in an HTML canvas without the need for plug-ins?

WebGL API

22
New cards

How is WebGL used with the HTML5 element?

canvas.getContext("webgl")

23
New cards

Which API permits the user to continue working with Web sites and documents even when a network connection is unavailable?

offline web applications

24
New cards

What provides a directory on a computer where applications can be stored and run without access to the original application?

application cache

25
New cards

What file provides a list of files needed for a web application to work offline?

manifest

26
New cards

How do you identify the manifest file to which a Web page should link?

we use manifest attribute

<!DOCTYPE html>

<html manifest="example.appcache">

<head>

<title>Offline Enabled Page</title>

</head>

<body>

...

</body>

</html>

27
New cards

Which API provides the ability to determine a user's location?

geolocation API

28
New cards

Which method retrieves the current geographic location of the user?

getCurrentPosition()

29
New cards

Which method retrieves periodic updates about the current geographic location of the user?

watchPosition()

30
New cards

Which method cancels an ongoing watchPosition() call?

clearWatch()

31
New cards

Which API allows a user to grab an object on a computer screen and move it to a different location on the screen?

Drag-and-drop API

32
New cards

Which event specifies where the dragged data can be dropped?

dragover

33
New cards

Which attribute make an element draggable?

draggable="true"

34
New cards

Which method prevents default action where data elements cannot be dropped in other elements?

preventDefault()

35
New cards

Which event is called when a page element is dropped after being dragged?

drop

36
New cards

Which event listener triggers the drag event?

ondragstart

37
New cards

Which API provides a standard way to interact with files on the client machine using a Web browser?

File API

38
New cards

Which statement is the simplest way to reference several files at once?

we use the cache inside of manifest file

39
New cards

Which interface provides a directory list of file objects. You can list information such as the file name, MIME type and size?

FileList

40
New cards

Which interface provides read-only access to individual files, such as images?

FileReader

41
New cards

What data type is a collection of data stored as a single entity and provides the ability to divide a file into byte ranges?

Blob (Binary Large Object)

42
New cards

Which API allows you to add, change and delete URLs and titles in the browser history field?

History API

43
New cards

Which method sends the browser back one page in the history?

history.back()

44
New cards

Which method sends the browser forward one page in the history?

history.forward()

45
New cards

Which method sends the browser forward (positive number) or backward (negative number) the specified number of pages in the history?

history.go(number)

46
New cards

Which method changes the URL in the browser window by adding a URL to the history stack?

history.pushState(state object, title, url)

47
New cards

Which method replaces the current URL in the history with a new one, instead of adding another URL to the history stack?

history.replaceState(state object, title, url)

48
New cards

What property returns the number of URLs in the history for this browser window?

history.length

49
New cards

What property returns the state object at the top of the history stack?

history.state

50
New cards

What property is called when the history changes for a document in the browser window?

window.onpopstate

51
New cards

What object is used to request data from a web server?

XMLHttpRequest

52
New cards

How do you create a new XMLHttpRequest object?

xmlhttp=new XMLHttpRequest();

53
New cards

What technique is used to transmit data between a server and a web application without disturbing page display?

AJAX

54
New cards

What JavaScript library make it much easier to incorporate scripting on your website?

jQuery

55
New cards

Which jQuery command selects instances of the specified element based on the element name?

$("a")

56
New cards

Which jQuery command selects the elements with the specified ID attribute?

$("#custname")

57
New cards

Which jQuery command selects all elements with the specified class?

$(".demo")

58
New cards

Which jQuery command selects all HTML elements in the document?

$("*")

59
New cards

Which jQuery command selects the current HTML element?

$(this)

60
New cards

Which jQuery command selects all instances of the specified element with the specified class?

$("a.demo")

61
New cards

Which jQuery command selects the first instance of the specified element on a page?

$("a:first")

62
New cards

Which jQuery command selects all elements with the specified attribute?

$("[href]")

63
New cards

Which jQuery command selects all instances of an element element with the specified attribute and value?

$("a[target='_blank']")

64
New cards

Which jQuery command specifies that the code will not run until the document has finished loading?

document.ready

65
New cards

Which jQuery method sets or returns the text content of selected elements?

text()

66
New cards

Which jQuery method sets or returns the content of selected elements (including HTML markup)?

html()

67
New cards

Which jQuery method sets or returns the values of form fields?

val()

68
New cards

Which jQuery method is used to get and set attribute values?

attr()

69
New cards

Which jQuery method inserts content at the end of the selected elements?

append()

70
New cards

What statement selects an HTML element using the ID attribute?

document.getElementById("MyLocation")

71
New cards

Which jQuery method inserts content at the beginning of the selected elements?

prepend()

72
New cards

Which jQuery method inserts content after the selected elements?

after()

73
New cards

Which jQuery method inserts content before the selected elements?

before()

74
New cards

Which jQuery method removes the selected element and its child elements?

remove()

75
New cards

Which jQuery method removes the child elements from the selected element?

empty()

76
New cards

What statement determines if the browser supports geolocation?

if (navigator.geolocation)

77
New cards

What statement iterates through a set of files?

for (var i = 0, x = files.length; i < x; ++i)

78
New cards

What characteristic of all browsers means you do not need to develop multiple versions of your scripts tailored for each browser?

all browsers are DOM-compliant

79
New cards

What technologies make up HTML5 APIs

HTML5, CSS and JavaScript