Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#16888 closed defect (invalid)

innerHTML not function

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: tbd
Component: General Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:


<section id="insert"></section>

<script> require(["dojo/ready", "dojo/dom"], function(ready, dom) { ready(function() { var fragment = "<b>test<i>test</i></b>"; var node = dom.byId("insert"); node.innerHMTL = fragment; dom works document.getElementById("insert").innerHTML = fragment; console.log(node.innerHMTL); }); }); </script>

If I use console - breakpoint, and type first node.innerHMTL and then node.innerHMTL = value, it works. But this fake doesnt work in code.

Attachments (1)

innerhtml.html (848 bytes) - added by [email protected] 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by bill

Owner: set to [email protected]
Status: newpending

I don't understand what you are saying. Use the "attach file" button to attach a full test case, and then list the expected results vs. the actual results.

Changed 8 years ago by [email protected]

Attachment: innerhtml.html added

comment:2 Changed 8 years ago by [email protected]

Status: pendingnew

Attachment (innerhtml.html) added by ticket reporter.

comment:3 Changed 8 years ago by [email protected]

I want insert HTML fragment into section element. Same as query and innerHTML method.

comment:4 Changed 8 years ago by bill

Status: newpending

It looks OK, except I guess that <section> elements won't work on older browsers. What browser are you running on, and what happens when you run the code?

comment:5 Changed 8 years ago by [email protected]

Status: pendingnew

Chrome Version 25.0.1364.172 m. Going to check it on other browsers.

comment:6 Changed 8 years ago by [email protected]

I have tested it in Opera and same problem. Nothing was inserted into section element. See only empty screen and you? Do you see the text text? I have tested it on 2 computers. One with Tomcat and one with Apache.

I have a problem with Tomcat server and require method too. See this link please.

comment:7 Changed 8 years ago by bill

Resolution: invalid
Status: newclosed

OK. You spelled innerHTML wrong. You typed innerHMTL.

comment:8 Changed 8 years ago by [email protected]

omg :-) I shame on myself. You have right. I am using different keyboards now and then make char mistakes and Copy paste finish it :-). Thanks for help.

Note: See TracTickets for help on using tickets.