Skip to content
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

Add prepend methods to Element in dart:html #7500

Closed
DartBot opened this issue Dec 19, 2012 · 11 comments
Closed

Add prepend methods to Element in dart:html #7500

DartBot opened this issue Dec 19, 2012 · 11 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Dec 19, 2012

This issue was originally filed by @tomaszkubacki


[feature request]
Add prepend methods to reflect jquery functionality.

Please add following methods to Element in dart:html

void prepend(Element e)
Adds the specified element before the first child of this element.

void prependHtml(String text)
Parses the specified text as HTML and adds the resulting node before the first child of this element.
 

@iposva-google
Copy link
Contributor

Added Area-HTML, Triaged labels.

@efortuna
Copy link
Contributor

Added this to the M4 milestone.

@blois
Copy link
Contributor

blois commented Apr 3, 2013

Removed this from the M4 milestone.
Added this to the Later milestone.
Removed Type-Defect label.
Added Type-Enhancement, jquery labels.

@DartBot
Copy link
Author

DartBot commented Apr 20, 2013

This comment was originally written by george.moscho...@gmail.com


That would be very useful!

@efortuna
Copy link
Contributor

Set owner to @efortuna.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@alan-knight
Copy link
Contributor

This seems fairly trivial
  prepend(x) => insertBefore(x, childNodes.first);
but also not difficult for the user.


Removed the owner.

@alan-knight
Copy link
Contributor

Also insertAdjacentHtml('afterBegin', node)

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Jan 14, 2015
@kevmoo kevmoo removed the jquery label Jun 16, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@alexbecker
Copy link

I don't think this is difficult enough for the user to be worth including, seeing as @alan-knight's implementation is wrong (when childNodes is empty).

@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

9 participants