Questions tagged [dart-html]

Dart HTML allows access to basic browser features like the DOM, FileSystem, Websockets and other things.

Dart HTML provides access to basic browser features like the DOM, FileSystem, Websockets and other things. It doesn't provide the same interfaces to the DOM that JavaScript has, but provides a much richer interface to the DOM. Some browser features, like SVG, WebGL and Web Audio have their own libraries.

dart:html library

Connect Dart & HTML

474 questions
0
votes
3 answers

Make picture from base64 on client-side

How to make a picture from a base64-string to send it to server by using HttpRequest.request? For example, I have the following…
Roman
  • 2,145
  • 4
  • 26
  • 33
0
votes
1 answer

DWT togglebutton: does it even work?

I'm not sure if we are just 20 people in the world using dart right now and maybe just 10% of us try to use widgets..anyway, I seem not to understand if I'm doing something wrong with DWT or there is a bug. Here is a very simple example. I don't…
maugch
  • 1,276
  • 3
  • 22
  • 46
0
votes
1 answer

caret position in an editable div (dartlang)

I try to find the caret position in an editable div. Also it should be nice to get the selected text in this div. I try to assimilate this: Editable Div Caret Position But it dosen’t work. I'll be happy to give any Idea. Thanks in advance Some code…
Frank
  • 67
  • 10
0
votes
2 answers

how to set the border in a DART TableElement

in a Grid example of 2012 the grid border is simply set with: TableElement _table; _table = new Element.tag("table"); _table.border="1"; unfortunaltly border is no longer (running vers. 1.1.1) a setter in DART's TableElement class.…
Martin
  • 1,430
  • 10
  • 19
0
votes
1 answer

Simulate a click() programmatically on a Div

I'm trying to fire an event programmatically. My problem is that I have two SVG on two DIVs and I want to be able to change the border of the DIV I have clicked. To do that I thought to pass the DIV inside my classes and then trigger a click on it…
maugch
  • 1,276
  • 3
  • 22
  • 46
0
votes
1 answer

Add image to SVG element in dart

I am trying to show an (interchangeable) image as background to an ellipse or other various things I will manipulate later. The problem is that I can't find how to load the image properly. My code: DivElement div =…
maugch
  • 1,276
  • 3
  • 22
  • 46
0
votes
1 answer

Dart: scope of querySelector

I have a situation where I have 2 "views" (screens/pages) in my Dart web app, and I would like to asynchronously fetch the HTML for View #2 and then bind it to Dart DOM elements while the user is still viewing View #1. This way, when the user clicks…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
0
votes
1 answer

Best Practice for different pages in an DART app

What´s the best practice for different pages in an app, which are for example called from a menue. Would you create for a new page this page in DOM and destroy the old one or is it better to hide the oldones (could be more of course)? Or is there…
mica
  • 3,898
  • 4
  • 34
  • 62
0
votes
0 answers

Security Error in Dart VM

I need add iframe with YouTube embed source via Dart but it throws an exception: void main() { String videoID = "1nXRkk7Szu4"; IFrameElement frame = new IFrameElement(); frame.width = "560"; frame.height = "315"; frame.src =…
0
votes
1 answer

a weird behavior in a Dart http method doesn't supports 'GET' and works only in google's browsers

I use a method to send data to the server side but when I use GET method the request fails to reach that server and I don't know why even the block of my code seems logic, that was the first problem the second one it's only working with Google…
Saïd Tahali
  • 189
  • 10
0
votes
1 answer

ExecCommand on div in Dart M8

As of Dart M8 the Element.document field has been removed. In a rich editor (as in Chris Buckett's editor example) we used to do the following for changing the weight of some text to bold: var el = query("#editme"); el.contentEditable =…
budde
  • 182
  • 12
0
votes
2 answers

Change the tint/hue of an ImageElement on canvas

I'm working on some particle animations for my game engine, and I want to know if is possible to change the hue, gamma and other image properties of a ImageElement object of the canvas, keeping the shape of the image. What I've tried so far is…
0
votes
1 answer

How to access contentDocument of embed element in Dart?

I load an SVG within an HTML file with the embed element. But now I want to change the color of an gradient within this SVG. In JavaScript there is the contentDocument which I can access to query for the gradient that I am looking for. It appears…
Karsten Becker
  • 502
  • 5
  • 11
0
votes
1 answer

Sending a list of HttpRequest(s) to the same URL

When I write this Dart code : for(int i=0;i
Serge Tahé
  • 1,869
  • 2
  • 19
  • 20
0
votes
2 answers

dart clipboardData always null

The following main.html test

hello world