2024-04-19 12:47 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002420NetSurfJavascriptpublic2016-02-16 14:07
ReporterVincent Sanders 
Assigned ToMichael Drake 
SeverityminorReproducibilityalways 
StatusclosedResolutionfixed 
Product Version3.4 
Target Version3.4Fixed in Version3.4 
Summary0002420: creation of html elements in javascript uses the wrong prototype
Descriptionnote jmb discovered all of this, i am just writing it down so there is a record


because we concatenate bits of stuff together, one of which is the element name
and said element name is not the same as the corresponding bit of the IDL interface name

so: document.createElement("p") should create an HTMLParagraphElement instance

but, because we look for \xff\xffNETSURF_DUKTAPE_PROTOTYPE_HTMLPELEMENT, we generate an HTMLUnknownElement, instead

so, something, somewhere, needs to know that when asked for a "p", Bob responds with an HTMLParagraphElement

dir>directory
a>anchor
blockquote>quote
caption>tablecaption
col>tablecol
colgroup>tablecol
del>mod
dl>dlist
h{1,2,3,4,5,6}>heading
img>image
ins>mod
ol>olist
p>paragraph
q>quote
tbody>tablesection
td>tabledatacell
tfoot>tablesection
th>tableheadercell
thead>tablesection
tr>tablerow
ul>ulist

then, any other *known* element name, that has no other specialisation > htmlelement

_dom_html_document_create_element_internal seems to have a giant switch statement that does this conversion

we need a similar such mapping to get to the correct javascript class
TagsNo tags attached.
Fixed in CI build #3335
Reported in CI build #
URL of problem page
Attached Files

-Relationships
+Relationships

-Notes
Vincent Sanders

~0001236

Vincent Sanders (administrator)

Confirmed fixed in 3.4 release
+Notes

-Issue History
Date Modified Username Field Change
2016-01-31 19:30 Vincent Sanders New Issue
2016-01-31 19:30 Vincent Sanders Status new => assigned
2016-01-31 19:30 Vincent Sanders Assigned To => Daniel Silverstone
2016-02-01 15:22 Michael Drake Fixed in CI build # => 3335
2016-02-01 15:22 Michael Drake Assigned To Daniel Silverstone => Michael Drake
2016-02-01 15:22 Michael Drake Status assigned => resolved
2016-02-01 15:22 Michael Drake Resolution open => fixed
2016-02-16 14:07 Vincent Sanders Note Added: 0001236
2016-02-16 14:07 Vincent Sanders Status resolved => closed
2016-02-16 14:07 Vincent Sanders Fixed in Version => 3.4
+Issue History