def __init__(self, context):
if self.title is None:<EOL><INDENT>raise NotImplementedError<EOL><DEDENT>self.is_loaded = False<EOL>self._doc_root = Document(id="<STR_LIT>", view=self)<EOL>self._head = Head(id="<STR_LIT>", parent=self._doc_root)<EOL>self.root = Body(id="<STR_LIT>", parent=self._doc_root)<EOL>self.context = context<EOL>for library in self.libraries:<EOL><INDENT>print("<STR_LIT>")<EOL>for stylesheet in library.stylesheets:<EOL><INDENT>self._head.load_stylesheet(id(stylesheet), stylesheet)<EOL><DEDENT>for script in library.scripts:<EOL><INDENT>self._head.load_script(script)<EOL><DEDENT><DEDENT>if self.stylesheet is not None:<EOL><INDENT>self._head.load_stylesheet('<STR_LIT>', self.stylesheet)<EOL><DEDENT>self._event_cache = []<EOL>self.context.register('<STR_LIT>', self._unpack_events)<EOL>
Constructor of the view.

:param context: Application instantiating the view.
:raises NotImplementedError: When ``View.title`` is not set.