Answers.Body: <p>The epub <a href="http://www.idpf.org/epub/301/spec/epub-contentdocs.html#confreq-cd-scripted-spine" rel="nofollow">3.0 spec</a> forbids scripts from changing the DOM of the document, so this will not be possible. Here's the relevant bit:</p>
  
  <blockquote>
    <p>It must not allow a container-constrained script to modify the DOM of
    the parent Content Document or other contents in the EPUB Publication,
    and must not allow it to manipulate the size of its containing
    rectangle. (Note: Even if a script is not container-constrained, the
    Reading System may impose restrictions on modifications (see also the
    dom-manipulation feature).)</p>
  </blockquote>
  
  <p>This is required for security purposes. It sounds like in order to do what you're talking about, you'll need an app rather than an ebook.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-21T22:28:52.000Z
Answers.Text: Thanks. May I ask what sort of security purposes ? Also, do you mean an ebook reading app ? I'll look into it but I am also curious about learning whether this is something that may be included as a feature in future versions of ebooks. Or whether there are any active discussions in the ebook community about having such a feature, which I think would enhance reader experience in all sorts of fascinating ways.
Answers.UserDisplayName: QPTR
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-22T20:14:44.010Z
Answers.Text: My understanding is that having scripts that can modify the file they exist in can permit scripts to do things they shouldn't be able to do, but I'm by no means a security expert. The IDPF says " Authors should also note that scripting in an EPUB Publication can create security considerations that are different from scripting within a Web browser. For example, typical same-origin policies are not applicable to content that has been downloaded to a User's local system." By apps, I mean building an app for your content rather than making it an ebook.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-20T23:34:33.660Z
Answers.LastActivityDate: 2014-06-20T23:34:33.660Z
Answers.UserDisplayName: Tom
Answers.Body: <p>There's no support for that currently.  EPUB is intended to be a one-way delivery system, that is why it's contents are packaged in a predictable format with strict specifications.  In order to alter the contents of an Epub you must unzip the file into its constituent parts.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-21T04:56:31.323Z
Answers.LastActivityDate: 2014-06-21T04:56:31.323Z
Answers.UserDisplayName: maxwell
Body: <p>I was wondering if there is any feature present in EPUB3 or other e-reading formats, either via scripting or some other route, that enables the reader/user to upload audio/video/images (or link to external sources of these) on their own to an e-book (depending upon e-reader support) thus creating a unique e-book of their own ? If not, is this capability something we'll see in future versions ebooks ? From my current understanding, it looks like that it is possible to add multimedia using media overlays in epub3, but I am not sure if this is something that a reader can do as well. Using javascript it seems like it could potentially be done, that is allowing the reader to add multimedia that then becomes part of the ebook, would really like to hear people's thoughts on it. Thanks.</p>
  
Tags: <kindle><ebook-readers><epub>
Title: Reader interactivity in epub3/other ebook formats
UserDisplayName: QPTR
ThreadText: # Reader interactivity in epub3/other ebook formats
  
  (Asked by: username_0 on 2014-06-20)
  
  I was wondering if there is any feature present in EPUB3 or other e-reading formats, either via scripting or some other route, that enables the reader/user to upload audio/video/images (or link to external sources of these) on their own to an e-book (depending upon e-reader support) thus creating a unique e-book of their own ? If not, is this capability something we'll see in future versions ebooks ? From my current understanding, it looks like that it is possible to add multimedia using media overlays in epub3, but I am not sure if this is something that a reader can do as well. Using javascript it seems like it could potentially be done, that is allowing the reader to add multimedia that then becomes part of the ebook, would really like to hear people's thoughts on it. Thanks.
  
  **Tags:** kindle, ebook-readers, epub
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-06-20. Score: 4
  
  The epub [3.0 spec](http://www.idpf.org/epub/301/spec/epub-contentdocs.html#confreq-cd-scripted-spine) forbids scripts from changing the DOM of the document, so this will not be possible. Here's the relevant bit:
  
  > It must not allow a container-constrained script to modify the DOM of
  > the parent Content Document or other contents in the EPUB Publication,
  > and must not allow it to manipulate the size of its containing
  > rectangle. (Note: Even if a script is not container-constrained, the
  > Reading System may impose restrictions on modifications (see also the
  > dom-manipulation feature).)
  
  This is required for security purposes. It sounds like in order to do what you're talking about, you'll need an app rather than an ebook.
  
  > **Comments:**
  > **username_0**: Thanks. May I ask what sort of security purposes ? Also, do you mean an ebook reading app ? I'll look into it but I am also curious about learning whether this is something that may be included as a feature in future versions of ebooks. Or whether there are any active discussions in the ebook community about having such a feature, which I think would enhance reader experience in all sorts of fascinating ways.  
  > **username_1**: My understanding is that having scripts that can modify the file they exist in can permit scripts to do things they shouldn't be able to do, but I'm by no means a security expert. The IDPF says " Authors should also note that scripting in an EPUB Publication can create security considerations that are different from scripting within a Web browser. For example, typical same-origin policies are not applicable to content that has been downloaded to a User's local system." By apps, I mean building an app for your content rather than making it an ebook.  
  
  ---
  
  ### Answer by username_2 on 2014-06-21. Score: 4
  
  There's no support for that currently. EPUB is intended to be a one-way delivery system, that is why it's contents are packaged in a predictable format with strict specifications. In order to alter the contents of an Epub you must unzip the file into its constituent parts.
  
  
  ---
  
  