.. (לתיקייה המכילה) | ||
In the exercise we are required to add a link to another HTML page. | |
Yes. |
Do we have to use the Custom Event mechanism? Can we instead subscribe event handlers to built-in events (i.e., non-custom events)? | |
You have to use the Custom Event mechanism. The purpose of this exercise is to familiarize you with this mechanism and the design pattern it allows. This following article demonstrates the benefits of using custom events compared to other techniques: http://www.sitepoint.com/javascript-custom-events/ In brief, the author raises the following question - what if we wanted to extend the behavior of our event? Which technique would be more intuitive and maintainable to accomplish this? Note: you can (and should) subscribe event handlers to built-in JavaScript events in your implementation. |
Can we use external CSS libraries such as Bootstrap and Normalize.css? | |
Yes. Specifically for Bootstrap, please make sure you add only its CSS library (and not its JavaScript library). |
Should the readenter and readleave events be triggered for a fixed list of paragraphs (by specifying the paragraphs' identifiers explicitly)? | |
No. These events should be triggered for each paragraph in your homepage automatically. That is, if a new paragraph is added to your HTML file, then the readenter and readleave events will be triggered for that paragraph, without adjusting your JS code. Tip: read about the getElementsByTagName() method at this link: http://www.w3schools.com/jsref/met_doc_getelementsbytagname.asp |
From which of the following moments the elapsed reading time (shown in each log entry) begins to be measured?
| |
The first option is the correct one. However, it may not have been clear enough from the assignment, therefore both options are admissible. |
How should I handle validation warnings issued by the W3C validator ( http://validator.w3.org/ )? | |
Usually fixing these warnings does not entail much effort, but you may ignore them. |