Skip to content

Mark deprecated/non-standard HTMLElement interfaces as deprecated #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/scala/org/scalajs/dom/html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@ object html {
type Applet = raw.HTMLAppletElement
type Audio = raw.HTMLAudioElement
type Area = raw.HTMLAreaElement
@deprecated("Non-standard", "0.9.8")
type AreasCollection = raw.HTMLAreasCollection
type Base = raw.HTMLBaseElement
@deprecated("Obsolete.", "DOM Level 2")
type BaseFont = raw.HTMLBaseFontElement
@deprecated("Non standard.", "forever")
type BGSound = raw.HTMLBGSoundElement
@deprecated("Non-standard", "0.9.8")
type BlockElement = raw.HTMLBlockElement
type Body = raw.HTMLBodyElement
type Button = raw.HTMLButtonElement
type BR = raw.HTMLBRElement
type Canvas = raw.HTMLCanvasElement
type Collection = raw.HTMLCollection
type DataList = raw.HTMLDataListElement
@deprecated("Non-standard.", "0.9.8")
type DD = raw.HTMLDDElement

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
Why are the DD and DT considered non-standard?

Actually, this is valid HTML5 elements.
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd and https://www.w3.org/TR/html52/grouping-content.html#the-dt-element

Can we re-introduce those missing elements in the next release? 

@deprecated("Obsolete.", "HTML 4")
type Directory = raw.HTMLDirectoryElement
type Div = raw.HTMLDivElement
type DList = raw.HTMLDListElement
@deprecated("Non-standard.", "0.9.8")
type DT = raw.HTMLDTElement
type Document = raw.HTMLDocument
type Element = raw.HTMLElement
Expand Down Expand Up @@ -69,6 +73,7 @@ object html {
type Paragraph = raw.HTMLParagraphElement
type Param = raw.HTMLParamElement
type Pre = raw.HTMLPreElement
@deprecated("Non-standard", "0.9.8")
type Phrase = raw.HTMLPhraseElement
type Progress = raw.HTMLProgressElement
type Quote = raw.HTMLQuoteElement
Expand All @@ -82,7 +87,13 @@ object html {
type TableCaption = raw.HTMLTableCaptionElement
type TableCell = raw.HTMLTableCellElement
type TableCol = raw.HTMLTableColElement
@deprecated(
"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableDataCellElement",
"0.9.8")
type TableDataCell = raw.HTMLTableDataCellElement
@deprecated(
"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableHeaderCellElement",
"0.9.8")
type TableHeaderCell = raw.HTMLTableHeaderCellElement
type TableRow = raw.HTMLTableRowElement
type TableSection = raw.HTMLTableSectionElement
Expand Down
12 changes: 12 additions & 0 deletions src/main/scala/org/scalajs/dom/raw/Html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,9 @@ abstract class HTMLTableElement extends HTMLElement {
*/
@js.native
@JSGlobal
@deprecated(
"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableDataCellElement",
"0.9.8")
abstract class HTMLTableDataCellElement extends HTMLTableCellElement

/**
Expand Down Expand Up @@ -918,6 +921,7 @@ abstract class HTMLParagraphElement extends HTMLElement {
}

@js.native
@deprecated("Non-standard", "0.9.8")
trait HTMLAreasCollection extends HTMLCollection {
def remove(index: Int = js.native): Unit = js.native

Expand Down Expand Up @@ -1126,6 +1130,7 @@ abstract class HTMLSelectElement extends HTMLElement {
}

@js.native
@deprecated("Non-standard.", "0.9.8")
trait HTMLBlockElement extends HTMLElement {
var width: Double = js.native
var cite: String = js.native
Expand Down Expand Up @@ -1176,6 +1181,7 @@ abstract class HTMLMetaElement extends HTMLElement {

@js.native
@JSGlobal
@deprecated("Non-standard.", "0.9.8")
abstract class HTMLDDElement extends HTMLElement {
var noWrap: Boolean = js.native
}
Expand Down Expand Up @@ -1381,6 +1387,7 @@ abstract class HTMLMapElement extends HTMLElement {
*
* MDN
*/
@deprecated("Non-standard", "0.9.8")
def areas: HTMLAreasCollection = js.native
}

Expand Down Expand Up @@ -2024,6 +2031,9 @@ abstract class HTMLQuoteElement extends HTMLElement {
*/
@js.native
@JSGlobal
@deprecated(
"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableHeaderCellElement",
"0.9.8")
abstract class HTMLTableHeaderCellElement extends HTMLTableCellElement

/**
Expand Down Expand Up @@ -3002,6 +3012,7 @@ abstract class HTMLPreElement extends HTMLElement {

@js.native
@JSGlobal
@deprecated("Non-standard.", "0.9.8")
abstract class HTMLPhraseElement extends HTMLElement {
var dateTime: String = js.native
}
Expand Down Expand Up @@ -3850,6 +3861,7 @@ object HTMLMediaElement extends js.Object {

@js.native
@JSGlobal
@deprecated("Non-standard.", "0.9.8")
abstract class HTMLDTElement extends HTMLElement {
var noWrap: Boolean = js.native
}
Expand Down