[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 287901] New: JavaScript document.open can not replace current
From:       Martin Koller <kollix () aon ! at>
Date:       2011-11-30 11:56:42
Message-ID: bug-287901-5021 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=287901

           Summary: JavaScript document.open can not replace current
                    document
           Product: konqueror
           Version: 0.0.1
          Platform: Unlisted Binaries
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: khtml ecma
        AssignedTo: konq-bugs@kde.org
        ReportedBy: kollix@aon.at


Version:           0.0.1 (using KDE 4.6.5) 
OS:                Linux

Trying to run the following JavaScript tutorial from
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_open
does not replace the visible button with the text "Learning about the HTML DOM
is fun!"

It works in firefox, and also with konqi/WebKit

code:

<html>
<head>
<script type="text/javascript">
function createDoc()
  {
  var doc=document.open("text/html","replace");
  var txt="<html><body>Learning about the HTML DOM is fun!</body></html>";
  doc.write(txt);
  doc.close();
  }
</script>
</head>

<body>
<input type="button" value="New document" onclick="createDoc()" />
</body>
</html> 



Reproducible: Always

Steps to Reproduce:
click on the link above and then click on the "New document" button.

Actual Results:  
empty document

Expected Results:  
The text "Learning about the HTML DOM is fun!"

OS: Linux (i686) release 2.6.34.10-0.4-desktop
Compiler: gcc
openSuse 11.3

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konq-bugs mailing list
Konq-bugs@kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic